blob: 70a7b3f1214021a2eb4184c2db175c7f29a74873 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script>
var successfullyParsed = false;
if (window.testRunner)
testRunner.dumpAsText();
</script>
</head>
<body>
<div id="check1" tabindex=0 role="checkbox" aria-checked="false">1</div>
<div id="check2" tabindex=0 role="checkbox" aria-checked="true">1</div>
<div id="check3" tabindex=0 role="checkbox" aria-checked="mixed">1</div>
<input type="checkbox" id="check4" checked><br>
<input type="checkbox" id="check5"><br>
<p id="description"></p>
<div id="console"></div>
<script>
description("This test makes sure that a checkbox (ARIA or otherwise) returns its status through accessibilityValue");
if (window.accessibilityController) {
document.getElementById("check1").focus();
shouldBe("accessibilityController.focusedElement.stringValue", "'AXValue: 0'");
document.getElementById("check2").focus();
shouldBe("accessibilityController.focusedElement.stringValue", "'AXValue: 1'");
document.getElementById("check3").focus();
shouldBe("accessibilityController.focusedElement.stringValue", "'AXValue: 2'");
document.getElementById("check4").focus();
shouldBe("accessibilityController.focusedElement.stringValue", "'AXValue: 1'");
document.getElementById("check5").focus();
shouldBe("accessibilityController.focusedElement.stringValue", "'AXValue: 0'");
}
successfullyParsed = true;
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>