blob: d1e018ea1dedf69b6a0551a7328f300af39a031a [file] [log] [blame]
commit-queue@webkit.org0257f0fd2012-12-10 17:30:23 +00001<html>
2<head>
mark.lam@apple.coma931ab22013-09-08 01:18:24 +00003 <script src="../resources/js-test-pre.js"></script>
commit-queue@webkit.org0257f0fd2012-12-10 17:30:23 +00004</head>
5
6<body id="body">
7
8<select id="selectElement" multiple title="selectElement">
9 <option SELECTED>Option 1</option>
10 <option>Option 2</option>
11 <option DISABLED>Option 3</option>
12 <option aria-disabled="true">Option 4</option>
13 <option aria-disabled="false">Option 5</option>
14</select>
15
16<p>This tests that we report the correct enabled state on a listbox.</p>
17
18<p id="notDRT">This test should only be run inside of DumpRenderTree.</p>
19
20<p id="console"></p>
21
22<script>
23 if (window.testRunner && window.accessibilityController) {
24 document.getElementById("notDRT").style.visibility = "hidden";
25
26 testRunner.dumpAsText();
27
28 document.getElementById("selectElement").focus();
29
30 shouldBeTrue('accessibilityController.focusedElement.isEnabled');
31 shouldBeTrue('accessibilityController.focusedElement.childAtIndex(0).isEnabled');
32 shouldBeTrue('accessibilityController.focusedElement.childAtIndex(1).isEnabled');
33 shouldBeFalse('accessibilityController.focusedElement.childAtIndex(2).isEnabled');
34 shouldBeFalse('accessibilityController.focusedElement.childAtIndex(3).isEnabled');
35 shouldBeTrue('accessibilityController.focusedElement.childAtIndex(4).isEnabled');
36 }
37</script>
38
mark.lam@apple.coma931ab22013-09-08 01:18:24 +000039<script src="../resources/js-test-post.js"></script>
commit-queue@webkit.org0257f0fd2012-12-10 17:30:23 +000040</body>
41</html>