Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / accessibility / selection-states.html
blob820412e672c3527a3331a134cdd5ef2ad593da61
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 </select>
14 <p>This tests that we report the correct selection-related states.</p>
16 <p id="notDRT">This test should only be run inside of DumpRenderTree.</p>
18 <p id="console"></p>
20 <script>
21 if (window.testRunner && window.accessibilityController) {
22 document.getElementById("notDRT").style.visibility = "hidden";
24 testRunner.dumpAsText();
26 document.getElementById("selectElement").focus();
28 shouldBeTrue('accessibilityController.focusedElement.isMultiSelectable');
29 shouldBeTrue('accessibilityController.focusedElement.childAtIndex(0).isSelectable');
30 shouldBeTrue('accessibilityController.focusedElement.childAtIndex(0).isSelected');
31 shouldBeTrue('accessibilityController.focusedElement.childAtIndex(1).isSelectable');
32 shouldBeFalse('accessibilityController.focusedElement.childAtIndex(1).isSelected');
33 shouldBeFalse('accessibilityController.focusedElement.childAtIndex(2).isSelectable');
34 shouldBeFalse('accessibilityController.focusedElement.childAtIndex(2).isSelected');
36 </script>
37 </body>
38 </html>