Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / selection-states.html
1 <html>
2 <head>
3     <script src="../resources/js-test.js"></script>
4 </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 </select>
13
14 <p>This tests that we report the correct selection-related states.</p>
15
16 <p id="notDRT">This test should only be run inside of DumpRenderTree.</p>
17
18 <p id="console"></p>
19
20 <script>
21     if (window.testRunner && window.accessibilityController) {
22         document.getElementById("notDRT").style.visibility = "hidden";
23
24         document.getElementById("selectElement").focus();
25
26         shouldBeTrue('accessibilityController.focusedElement.isMultiSelectable');
27         shouldBeTrue('accessibilityController.focusedElement.childAtIndex(0).isSelectable');
28         shouldBeTrue('accessibilityController.focusedElement.childAtIndex(0).isSelected');
29         shouldBeTrue('accessibilityController.focusedElement.childAtIndex(1).isSelectable');
30         shouldBeFalse('accessibilityController.focusedElement.childAtIndex(1).isSelected');
31         shouldBeFalse('accessibilityController.focusedElement.childAtIndex(2).isSelectable');
32         shouldBeFalse('accessibilityController.focusedElement.childAtIndex(2).isSelected');
33     }
34 </script>
35 </body>
36 </html>