Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / accessibility / listbox-enabled-states.html
blob1b2deca6d944757d5a7bb1932292687275147c7a
1 <html>
2 <head>
3 <script src="../resources/js-test.js"></script>
4 </head>
6 <body id="body">
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>
16 <p>This tests that we report the correct enabled state on a listbox.</p>
18 <p id="notDRT">This test should only be run inside of DumpRenderTree.</p>
20 <p id="console"></p>
22 <script>
23 if (window.testRunner && window.accessibilityController) {
24 document.getElementById("notDRT").style.visibility = "hidden";
26 testRunner.dumpAsText();
28 document.getElementById("selectElement").focus();
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');
37 </script>
39 </body>
40 </html>