<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">

<title>Test Page for sap.m.CheckBox</title>
<script src="../shared-config.js"></script>
<script id="sap-ui-bootstrap" data-sap-ui-noConflict="true"
	data-sap-ui-libs="sap.m" src="../../../../resources/sap-ui-core.js">
</script>

<link rel="stylesheet" href="../../../../resources/sap/ui/thirdparty/qunit.css" type="text/css" media="screen">
<script src="../../../../resources/sap/ui/thirdparty/qunit.js"></script>
<script src="../../../../resources/sap/ui/qunit/qunit-junit.js"></script>

<script src="../../../../resources/sap/ui/qunit/QUnitUtils.js"></script>
<script src="../../../../resources/sap/ui/thirdparty/sinon.js"></script>
<script src="../../../../resources/sap/ui/thirdparty/sinon-qunit.js"></script>
<script>

jQuery.sap.require("sap.m.CheckBox");
jQuery.sap.require("sap.ui.core.ValueState");

	QUnit.module("Properties");

	/* --------------------------------------- */
	/* Test: Default Values                    */
	/* --------------------------------------- */

	QUnit.test("Default Values", function(assert) {

		var bEnabled = true;
		var bEditable = true;
		var bVisible = true;
		var bSelected = false;
		var sName = "";
		var sText = "";
		var sTextDirection = sap.ui.core.TextDirection.Inherit;
		var sWidth = "";

		// system under test
		var oCheckBox = new sap.m.CheckBox();

		// arrange
		oCheckBox.placeAt("content");
		sap.ui.getCore().applyChanges();

		// assertions
		assert.strictEqual(oCheckBox.getEnabled(), bEnabled, "Property 'enabled': Default value should be '" + bEnabled + "'");
		assert.strictEqual(oCheckBox.getEditable(), bEditable, "Property 'editable': Default value should be '" + bEditable + "'");
		assert.strictEqual(oCheckBox.getVisible(), bVisible, "Property 'visible': Default value should be '" + bVisible + "'");
		assert.strictEqual(oCheckBox.getSelected(), bSelected, "Property 'selected': Default value should be '" + bSelected + "'");
		assert.strictEqual(oCheckBox.getName(), sName, "Property 'name': Default value should be '" + sName + "'");
		assert.strictEqual(oCheckBox.getText(), sText, "Property 'text': Default value should be '" + sText + "'");
		assert.strictEqual(oCheckBox.getTextDirection(), sTextDirection, "Property 'textDirection': Default value should be '" + sTextDirection + "'");
		assert.strictEqual(oCheckBox.getWidth(), sWidth, "Property 'width': Default value should be '" + sWidth + "'");

		// cleanup
		oCheckBox.destroy();
	});


	/* ----------------------------------------------- */
	/* Test: 'visible=true'                            */
	/* ----------------------------------------------- */

	QUnit.test("'visible=true'", function(assert) {

		// system under test
		var oCheckBox = new sap.m.CheckBox({visible: true});

		// arrange
		oCheckBox.placeAt("content");
		sap.ui.getCore().applyChanges();

		// assertions
		assert.ok(oCheckBox.getDomRef(), "visible=true: CheckBox should have been rendered");

		// cleanup
		oCheckBox.destroy();
	});


	/* ----------------------------------------------- */
	/* Test: 'visible=false'                           */
	/* ----------------------------------------------- */

	QUnit.test("'visible=false'", function(assert) {

		// system under test
		var oCheckBox = new sap.m.CheckBox({visible: false});

		// arrange
		oCheckBox.placeAt("content");
		sap.ui.getCore().applyChanges();

		// assertions
		assert.ok(!oCheckBox.getDomRef(), "visible=false: CheckBox should not have been rendered");

		// cleanup
		oCheckBox.destroy();
	});


	/* ----------------------------------------------- */
	/* Test: 'enabled=true'                            */
	/* ----------------------------------------------- */

	QUnit.test("'enabled=true'", function(assert) {

		// system under test
		var bEnabled = true;
		var oCheckBox = new sap.m.CheckBox({enabled: bEnabled});

		// arrange
		oCheckBox.placeAt("content");
		sap.ui.getCore().applyChanges();

		// assertions
		assert.ok(!oCheckBox.$("CbBg").hasClass("sapMCbBgDis"), "enabled=" + bEnabled + ": CheckBox should not have class sapMCbBgDis");
		assert.strictEqual(oCheckBox.$("CB").attr("disabled"), undefined, "enabled=" + bEnabled + ": CheckBox should not have attribute 'disabled'");
		var iTabindex = oCheckBox.getTabIndex();
		assert.strictEqual(oCheckBox.$().attr("tabindex"), iTabindex.toString() , "enabled=" + bEnabled + ": CheckBox should have attribute 'tabindex=" + iTabindex +"'");

		// cleanup
		oCheckBox.destroy();
	});


	/* ----------------------------------------------- */
	/* Test: 'enabled=false'                           */
	/* ----------------------------------------------- */

	QUnit.test("'enabled=false'", function(assert) {

		// system under test
		var bEnabled = false;
		var oCheckBox = new sap.m.CheckBox({enabled: bEnabled});

		// arrange
		oCheckBox.placeAt("content");
		sap.ui.getCore().applyChanges();

		// assertions
		assert.ok(!oCheckBox.$().hasClass("sapMPointer"), "enabled=" + bEnabled + ": CheckBox should not have class sapMPointer");
		assert.ok(oCheckBox.$().hasClass("sapMCbBgDis"), "enabled=" + bEnabled + ": CheckBox should have class sapMCbBgDis");
		assert.strictEqual(oCheckBox.$("CB").attr("disabled"), "disabled", "enabled=" + bEnabled + ": CheckBox should have attribute 'disabled=disabled'");
		assert.strictEqual(oCheckBox.$().attr("aria-disabled"), "true", "Property 'aria-disabled' should be 'true'");

		// cleanup
		oCheckBox.destroy();
	});

	/* ----------------------------------------------- */
	/* Test: 'editable=false'                          */
	/* ----------------------------------------------- */

	QUnit.test("'editable=false'", function(assert) {

		// system under test
		var bEditable = false;
		var oCheckBox = new sap.m.CheckBox({editable: bEditable});

		// arrange
		oCheckBox.placeAt("content");
		sap.ui.getCore().applyChanges();

		// assertions
		assert.strictEqual(oCheckBox.getTabIndex(), 0 , "'getTabindex' should return 0");
		assert.equal(oCheckBox.$().hasClass("sapMCbRo"), true, ": The CheckBox should have class sapMCbRo");
		assert.strictEqual(oCheckBox.$("CB").attr("readonly"), "readonly", "The Checkbox should have attribute 'readonly=readonly'");
		assert.strictEqual(oCheckBox.$().attr("aria-readonly"), "true", "Property 'aria-readonly' should be 'true'");

		// cleanup
		oCheckBox.destroy();
	});


	/* ----------------------------------------------- */
	/* Test: 'selected=true'                           */
	/* ----------------------------------------------- */

	QUnit.test("'selected=true'", function(assert) {

		// system under test
		var oCheckBox = new sap.m.CheckBox({selected: true});

		// arrange
		oCheckBox.placeAt("content");
		sap.ui.getCore().applyChanges();

		// assertions
		assert.ok(oCheckBox.$("CbBg").hasClass("sapMCbMarkChecked"), "selected=true: CheckBox should have class sapMCbMarkChecked");
		assert.ok(oCheckBox.$("CB").is(":checked"), "selected=false: CheckBox should have attribute 'checked'");
		assert.strictEqual(oCheckBox.$().attr("aria-checked"), "true", "Property 'aria-checked': Default value should be 'true'");

		// cleanup
		oCheckBox.destroy();
	});


	/* ----------------------------------------------- */
	/* Test: 'selected=false'						   */
	/* ----------------------------------------------- */

	QUnit.test("'selected=false'", function(assert) {

		// system under test
		var oCheckBox = new sap.m.CheckBox({selected: false});

		// arrange
		oCheckBox.placeAt("content");
		sap.ui.getCore().applyChanges();

		// assertions
		assert.ok(!oCheckBox.$("CbBg").hasClass("sapMCbMarkChecked"), "selected=false: CheckBox should not have class sapMCbMarkChecked");
		assert.ok(!oCheckBox.$("CB").is(":checked"), "selected=false: CheckBox should not have attribute 'checked'");
		assert.strictEqual(oCheckBox.$().attr("aria-checked"), "false", "Property 'aria-checked': Default value should be 'false'");

		// cleanup
		oCheckBox.destroy();
	});

	/* ----------------------------------------------- */
	/* Test: 'ValueState=Error'						   */
	/* ----------------------------------------------- */

	QUnit.test("'ValueState=Error'", function(assert) {
		// system under test
		var oCheckBox = new sap.m.CheckBox({valueState: sap.ui.core.ValueState.Error});

		// arrange
		oCheckBox.placeAt("content");
		sap.ui.getCore().applyChanges();

		// assertions
		assert.ok(oCheckBox.$().hasClass("sapMCbErr"), "The CheckBox has value state error css class.");

		// cleanup
		oCheckBox.destroy();
	});


	/* ----------------------------------------------- */
	/* Test: 'ValueState=Warning'						   */
	/* ----------------------------------------------- */

	QUnit.test("'ValueState=Warning'", function(assert) {
		// system under test
		var oCheckBox = new sap.m.CheckBox({valueState: sap.ui.core.ValueState.Warning});

		// arrange
		oCheckBox.placeAt("content");
		sap.ui.getCore().applyChanges();

		// assertions
		assert.ok(oCheckBox.$().hasClass("sapMCbWarn"), "The CheckBox has value state warning css class.");

		// cleanup
		oCheckBox.destroy();
	});


	/* ----------------------------------------------- */
	/* Test: 'name'                                    */
	/* ----------------------------------------------- */

	QUnit.test("'name'", function(assert) {

		var sName = "my Name";

		// system under test
		var oCheckBox = new sap.m.CheckBox({name: sName});

		// arrange
		oCheckBox.placeAt("content");
		sap.ui.getCore().applyChanges();

		// assertions
		assert.strictEqual(oCheckBox.$("CB").attr("name"), sName, "Property 'name=" + sName + "': CheckBox input element should have attribute 'name=" + sName + "'");

		// cleanup
		oCheckBox.destroy();
	});



	/* ----------------------------------------------- */
	/* Test: getTabIndex (enabled=true)				   */
	/* ----------------------------------------------- */

	QUnit.test("'getTabIndex (enabled=true)'", function(assert) {

		// system under test
		var oCheckBox = new sap.m.CheckBox({enabled: true});

		// assertions
		assert.strictEqual(oCheckBox.getTabIndex(), 0 , "'getTabindex' should return 0");

		// cleanup
		oCheckBox.destroy();
	});


	/* ----------------------------------------------- */
	/* Test: getTabIndex (enabled=false				   */
	/* ----------------------------------------------- */

	QUnit.test("'getTabIndex (enabled=false)'", function(assert) {

		// system under test
		var oCheckBox = new sap.m.CheckBox({enabled: false});

		// assertions
		assert.strictEqual(oCheckBox.getTabIndex(), -1 , "'getTabindex' should return -1");

		// cleanup
		oCheckBox.destroy();
	});


	/* ----------------------------------------------------------------------- */
	/* Test: getTabIndex (tabIndex previously set explicitely via setTabIndex) */
	/* ----------------------------------------------------------------------- */

	QUnit.test("'getTabIndex (tabIndex previously set explicitely via setTabIndex)'", function(assert) {

		// system under test
		var oCheckBox = new sap.m.CheckBox();

		// arrange
		oCheckBox.setTabIndex(2);

		// assertions
		assert.strictEqual(oCheckBox.getTabIndex(), 2 , "'getTabindex' should return 2");

		// cleanup
		oCheckBox.destroy();
	});


	/* ----------------------------------------------- */
	/* Test: 'tabIndex' 							   */
	/* ----------------------------------------------- */

	QUnit.test("'tabIndex'", function(assert) {

		var iTabIndex = 2;

		// system under test
		var oCheckBox = new sap.m.CheckBox();

		// arrange
		oCheckBox.placeAt("content");
		oCheckBox.setTabIndex(iTabIndex);
		sap.ui.getCore().applyChanges();

		// assertions
		assert.strictEqual(oCheckBox.$().attr("tabindex"), iTabIndex.toString() , "Property 'tabIndex=" + iTabIndex + "': CheckBox should have attribute 'tabindex=" + iTabIndex + "'");

		// cleanup
		oCheckBox.destroy();
	});


	/* ----------------------------------------------- */
	/* Test: testSetLabelProperty  					   */
	/* ----------------------------------------------- */

	function testSetLabelProperty(property, value, mode) {

		var sPropertyCamelCase = property[0].toUpperCase() + property.slice(1);
		var sSetterMethod = "set" + sPropertyCamelCase;

		var oSpy = sinon.spy(sap.m.Label.prototype, sSetterMethod);


		// system under test
		switch (mode) {
			case "Constructor":
				// set property via contructor
				var args = {};
				args[property] = value;
				var oCheckBox = new sap.m.CheckBox(args);
				break;
			case "Setter":
				// set property via setter method
				var oCheckBox = new sap.m.CheckBox();
				oCheckBox[sSetterMethod](value);
				break;
			default: console.error(": wrong argument for parameter 'mode'")
		}

		// arrange
		oCheckBox.placeAt("content");
		sap.ui.getCore().applyChanges();

		// assertions
		assert.strictEqual(oSpy.lastCall.args[0], value, "Property '" + property + "=" + value + "'testSetLabelProperty: Corresponding setter method of label control should have been called accordingly");

		// cleanup
		oCheckBox.destroy();
		sap.m.Label.prototype[sSetterMethod].restore();
	}

	QUnit.test("Should render the text of a Checkbox after rendering the checkbox without setting label properties", function(assert) {
		// Arrange
		var oCheckBox = new sap.m.CheckBox();

		// System under Test
		oCheckBox.placeAt("content");
		sap.ui.getCore().applyChanges();

		// Act
		oCheckBox.setText("foo");
		sap.ui.getCore().applyChanges();

		// Assert
		assert.ok(oCheckBox.$("label").length);

		// Cleanup
		oCheckBox.destroy();
	});

	/* ----------------------------------------------- */
	/* Test: 'text' - via Constructor                  */
	/* ----------------------------------------------- */

	QUnit.test("'text' - via Constructor", function(assert) {

		testSetLabelProperty("text", "my Text", "Constructor");
	});


	/* ----------------------------------------------- */
	/* Test: 'text' - via Setter Method                */
	/* ----------------------------------------------- */

	QUnit.test("'text' - via Setter Method", function(assert) {

		testSetLabelProperty("text", "my Text", "Setter");
	});



	/* ----------------------------------------------- */
	/* Test: 'textDirection' - via Constructor         */
	/* ----------------------------------------------- */

	QUnit.test("'textDirection' - via Constructor", function(assert) {

		testSetLabelProperty("textDirection", "RTL", "Constructor");
		testSetLabelProperty("textDirection", "LTR", "Constructor");
		testSetLabelProperty("textDirection", "Inherit", "Constructor");
	});


	/* ----------------------------------------------- */
	/* Test: 'textDirection' - via Setter Method         */
	/* ----------------------------------------------- */

	QUnit.test("'textDirection' - via Setter Method", function(assert) {

		testSetLabelProperty("textDirection", "RTL", "Setter");
		testSetLabelProperty("textDirection", "LTR", "Setter");
		testSetLabelProperty("textDirection", "Inherit", "Setter");
	});

    /* ----------------------------------------------- */
    /* Test: 'textAlign' - via Constructor         */
    /* ----------------------------------------------- */

    QUnit.test("'textAlign' - via Constructor", function(assert) {
        testSetLabelProperty("textAlign", "Begin", "Constructor");
        testSetLabelProperty("textAlign", "End", "Constructor");
        testSetLabelProperty("textAlign", "Left", "Constructor");
        testSetLabelProperty("textAlign", "Right", "Constructor");
        testSetLabelProperty("textAlign", "Center", "Constructor");
        testSetLabelProperty("textAlign", "Initial", "Constructor");
    });


    /* ----------------------------------------------- */
    /* Test: 'textAlign' - via Setter Method         */
    /* ----------------------------------------------- */

    QUnit.test("'textAlign' - via Setter Method", function(assert) {
        testSetLabelProperty("textAlign", "Begin", "Setter");
        testSetLabelProperty("textAlign", "End", "Setter");
        testSetLabelProperty("textAlign", "Left", "Setter");
        testSetLabelProperty("textAlign", "Right", "Setter");
        testSetLabelProperty("textAlign", "Center", "Setter");
        testSetLabelProperty("textAlign", "Initial", "Setter");
    });


	/* ----------------------------------------------- */
	/* Test: 'width' - via Constructor                 */
	/* ----------------------------------------------- */

	QUnit.test("'width' - via Constructor", function(assert) {

		testSetLabelProperty("width", "100px", "Constructor");
	});


	/* ----------------------------------------------- */
	/* Test: 'width' - via Setter Method               */
	/* ----------------------------------------------- */

	QUnit.test("'width' - via Setter Method", function(assert) {

		testSetLabelProperty("width", "100px", "Setter");
	});



	QUnit.module("Basic CSS classes");

	/* ----------------------------------------------- */
	/* Test: Existence                                 */
	/* ----------------------------------------------- */

	QUnit.test("Existence", function(assert) {

		// system under test
		var oCheckBox = new sap.m.CheckBox();

		// arrange
		oCheckBox.placeAt("content");
		sap.ui.getCore().applyChanges();

		// assertions
		assert.ok(oCheckBox.$().hasClass("sapMCb"), "CheckBox should have class sapMCb");
		assert.ok(oCheckBox.$("CbBg").hasClass("sapMCbBg"), "CheckBox should have class sapMCbBg");

		// cleanup
		oCheckBox.destroy();
	});


	/* ----------------------------------------------- */
	/* function: sapMCbHoverable                       */
	/* ----------------------------------------------- */
	function testSapMCbHoverable(oThat, bDesktop, sMessage) {

		var stub = oThat.stub(sap.ui.Device, "system", {desktop : bDesktop});

		// system under test
		var oCheckBox = new sap.m.CheckBox();

		// arrange
		oCheckBox.placeAt("content");
		sap.ui.getCore().applyChanges();

		// assertions
		if (bDesktop){
			assert.ok(oCheckBox.$("CbBg").hasClass("sapMCbHoverable"), sMessage);
		} else {
			assert.ok(!oCheckBox.$("CbBg").hasClass("sapMCbHoverable"), sMessage);
		}

		// cleanup
		oCheckBox.destroy();
	}


	/* ----------------------------------------------- */
	/* Test: sapMCbHoverable (non-desktop environment) */
	/* ----------------------------------------------- */

	QUnit.test("sapMCbHoverable (non-desktop environment)", function(assert) {

		testSapMCbHoverable(this, false, "CheckBox should not have class sapMCbHoverable");
	});


	/* ----------------------------------------------- */
	/* Test: sapMCbHoverable (desktop environment)     */
	/* ----------------------------------------------- */

	QUnit.test("sapMCbHoverable (desktop environment)", function(assert) {
		testSapMCbHoverable(this, true, "CheckBox should have class sapMCbHoverable");
	});



	QUnit.module("Events");

	/* ----------------------------------------------- */
	/* Test: tap                                       */
	/* ----------------------------------------------- */

	QUnit.test("tap", function(assert) {

		// system under test
		var oCheckBox = new sap.m.CheckBox();
		var oSpy = this.spy();
		oCheckBox.attachSelect(oSpy);

		// arrange
		oCheckBox.placeAt("content");
		sap.ui.getCore().applyChanges();

		// assertions
		assert.equal(oCheckBox.getSelected(), false, "CheckBox should not be selected");
		assert.strictEqual(oCheckBox.$().attr("aria-checked"), "false", "Property 'aria-checked': Default value should be 'false'");

		qutils.triggerEvent("tap", oCheckBox.getId());
		assert.ok(oSpy.calledOnce, "Event 'select' should have been fired");
		assert.equal(oCheckBox.getSelected(), true, "CheckBox should be selected");
		assert.strictEqual(oCheckBox.$().attr("aria-checked"), "true", "Property 'aria-checked': Default value should be 'true'");

		qutils.triggerEvent("tap", oCheckBox.getId());
		assert.ok(oSpy.calledTwice, "Event 'select' should have been fired");
		assert.equal(oCheckBox.getSelected(), false, "CheckBox should not be selected");

		oCheckBox.setEditable(false);
		qutils.triggerEvent("tap", oCheckBox.getId());
		assert.ok(oSpy.calledTwice, "Event 'select' should have been fired");
		assert.equal(oCheckBox.getSelected(), false, "CheckBox should not be selected");

		// cleanup
		oCheckBox.destroy();
	});


	/* ----------------------------------------------- */
	/* Test: SPACE key                                 */
	/* ----------------------------------------------- */
	function testSpaceKey(sTestName, oOptions) {
		QUnit.test(sTestName, function(assert) {

			//Arrange
			var oSpy = this.spy();
			var oCheckBox = new sap.m.CheckBox({select : oSpy, selected : oOptions.selected});

			// System under Test
			oCheckBox.placeAt("qunit-fixture");
			sap.ui.getCore().applyChanges();

			oCheckBox.$().focus(); // set focus on checkbox

			sap.ui.test.qunit.triggerKeydown(oCheckBox.$(), jQuery.sap.KeyCodes.SPACE); // trigger Space on checkbox
			assert.strictEqual(oSpy.callCount, 1, "SPACE is pressed, select event was fired");
			assert.equal(oCheckBox.getSelected(), oOptions.expectedSelection, oOptions.expectedMessage);
			assert.strictEqual(oCheckBox.$().attr("aria-checked"), "" + oOptions.expectedSelection, oOptions.expectedMessageAria);

			// Clean up
			oCheckBox.destroy();
		});
	}

	testSpaceKey("Press Space on not selected checkBox", {
		selected : false,
		expectedSelection : true,
		expectedMessage: "CheckBox should be selected",
		expectedMessageAria: "Property 'aria-checked' should be 'true'"
	});

	testSpaceKey("Press Space on selected checkBox", {
		selected : true,
		expectedSelection : false,
		expectedMessage: "CheckBox should be deselected",
		expectedMessageAria: "Property 'aria-checked' should be 'false'"
	});


	/* ----------------------------------------------- */
	/* Test: ENTER key                                 */
	/* ----------------------------------------------- */
	function testEnterKey(sTestName, oOptions) {
		QUnit.test(sTestName, function(assert) {

			//Arrange
			var oSpy = this.spy();
			var oCheckBox = new sap.m.CheckBox({select : oSpy, selected : oOptions.selected});

			// System under Test
			oCheckBox.placeAt("qunit-fixture");
			sap.ui.getCore().applyChanges();

			oCheckBox.$().focus(); // set focus on checkbox

			sap.ui.test.qunit.triggerKeydown(oCheckBox.$(), jQuery.sap.KeyCodes.ENTER); // trigger Enter on checkbox
			assert.strictEqual(oSpy.callCount, 1, "Enter is pressed, select event was fired");
			assert.equal(oCheckBox.getSelected(), oOptions.expectedSelection, oOptions.expectedMessage);
			assert.strictEqual(oCheckBox.$().attr("aria-checked"), "" + oOptions.expectedSelection, oOptions.expectedMessageAria);

			// Clean up
			oCheckBox.destroy();
		});
	}

	testEnterKey("Press Enter on not selected checkBox", {
		selected : false,
		expectedSelection : true,
		expectedMessage: "CheckBox should be selected",
		expectedMessageAria: "Property 'aria-checked' should be 'true'"
	});

	testEnterKey("Press Enter on selected checkBox", {
		selected : true,
		expectedSelection : false,
		expectedMessage: "CheckBox should be deselected",
		expectedMessageAria: "Property 'aria-checked' should be 'false'"
	});

	QUnit.module("Accessibility");

	QUnit.test("getAccessibilityInfo", function(assert) {
		var oControl = new sap.m.CheckBox({text: "Text"});
		assert.ok(!!oControl.getAccessibilityInfo, "CheckBox has a getAccessibilityInfo function");
		var oInfo = oControl.getAccessibilityInfo();
		assert.ok(!!oInfo, "getAccessibilityInfo returns a info object");
		assert.strictEqual(oInfo.role, "checkbox", "AriaRole");
		assert.strictEqual(oInfo.type, sap.ui.getCore().getLibraryResourceBundle("sap.m").getText("ACC_CTR_TYPE_CHECKBOX"), "Type");
		assert.strictEqual(oInfo.description, "Text", "Description");
		assert.strictEqual(oInfo.focusable, true, "Focusable");
		assert.strictEqual(oInfo.enabled, true, "Enabled");
		assert.strictEqual(oInfo.editable, true, "Editable");
		oControl.setSelected(true);
		oControl.setEnabled(false);
		oControl.setEditable(false);
		oInfo = oControl.getAccessibilityInfo();
		assert.strictEqual(oInfo.description, "Text " + sap.ui.getCore().getLibraryResourceBundle("sap.m").getText("ACC_CTR_STATE_CHECKED"), "Description");
		assert.strictEqual(oInfo.focusable, false, "Focusable");
		assert.strictEqual(oInfo.enabled, false, "Enabled");
		assert.strictEqual(oInfo.editable, false, "Editable");
		oControl.destroy();
	});
</script>


</head>
	<body id="body" class="sapUiBody">
		<h1 id="qunit-header">QUnit Page for sap.m.CheckBox</h1>
		<h2 id="qunit-banner"></h2>
		<h2 id="qunit-userAgent"></h2>
		<div id="qunit-testrunner-toolbar"></div>
		<ol id="qunit-tests"></ol>
		<div id="content"></div>
		<div id="qunit-fixture"></div>
	</body>
</html>
