define([
	"../../../../dcl/dcl",
	"intern!object",
	"intern/chai!assert",
	"delite/register",
	"dojo/dom-class"
], function (dcl, registerSuite, assert, register, domClass) {

	var commonSuite = {
		defaultWidget: "",
		baseClass: "",
		labelForTarget: ""
	};

	commonSuite.testCases = {
		"Default State": function () {
			var d = this.async(1000);
			setTimeout(d.callback(function () {
				var cb = document.getElementById(commonSuite.defaultWidget);
				assert.isTrue(domClass.contains(cb, commonSuite.baseClass), "Unexpected baseClass.");
				assert.isFalse(cb.checked, "Unexpected default value for 'checked' property.");
				assert.isFalse(cb.disabled, "Unexpected default value for 'disabled' property");
				assert.strictEqual(cb.value, "on", "Unexpected default value for 'value' property");
				var elt = cb.querySelector("input[type='checkbox']");
				assert.ok(elt, "Missing wrapped input element.");

				// verify properties bounds in the template
				assert.strictEqual(cb.name, elt.name, "Unexpected value for wrapped input 'name' property.");
				assert.strictEqual(cb.value, elt.value, "Unexpected value for wrapped input 'value' property.");
			}), 300);
			return d;
		},

		"checked": function () {
			var cb1 = document.getElementById(commonSuite.defaultWidget),
				inp = cb1.firstChild,
				old = cb1.checked;
			cb1.checked = !old;
			assert.strictEqual(cb1.checked, !old, "Unexpected value for 'checked' property after set.");
			//sync template
			cb1.deliver();
			assert.strictEqual(cb1.checked, inp.checked, "Unexpected value for 'checked' property of wrapped input.");
		},

		value: function () {
			var cb = document.getElementById(commonSuite.defaultWidget);
			cb.value = "foo";
			//sync template
			cb.deliver();
			assert.strictEqual(cb.firstChild.getAttribute("value"), "foo", "Unexpected value for 'value' attribute.");
		},

		"labelFor": function () {
			var d = this.async(1000);
			setTimeout(d.callback(function () {
				var cb3 = document.getElementById(commonSuite.labelForTarget),
					lbl4 = document.getElementById("lbl4"),
					old = cb3.checked;
				lbl4.click();
				cb3.deliver();
				assert.strictEqual(!old, cb3.checked, "Unexpected value for 'checked' property after labelFor click.");
			}), 300);
			return d;
		},

		"changeEvent": function () {
			var cb3 = document.getElementById(commonSuite.labelForTarget),
				lbl4 = document.getElementById("lbl4"),
				fired = false;
			cb3.on("change", function () {
				fired = true;
			});
			cb3.focusNode.click();
			assert.isTrue(fired, "Missing 'change' event when input node is clicked.");
			fired = false;
			lbl4.click();
			assert.isTrue(fired, "Missing 'change' event when labelFor is clicked.");
		}
	};

	return commonSuite;
});
@@ -8,20 +8,8 @@
 %5B%0A%09%22
-../../../../
 dcl/

fix path to dcl (corrupted by webstorm d&d)