blob: a70a58d3d30721682d854014fdcbf6610929b587 [file] [log] [blame]
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body id="body">
<p>This tests the accessibility roles of multiselect elements and their option
elements.</p>
<p id="console"></p>
<p id="notDRT">This test should only be run inside of DumpRenderTree.</p>
<select id="selectElement" multiple title="selectElement">
<option SELECTED>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
</select>
<script>
if (window.testRunner && window.accessibilityController) {
document.getElementById("notDRT").style.visibility = "hidden";
testRunner.dumpAsText();
document.getElementById("selectElement").focus();
shouldBe('accessibilityController.focusedElement.role', '"list"');
shouldBe('accessibilityController.focusedElement.childAtIndex(0).role', '"text"');
}
</script>
</body>
</html>