Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / aria-option-role.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../resources/js-test-pre.js"></script>
5 </head>
6 <body id="body">
7
8 <div role="listbox">
9 <div role="option">option 1</div>
10 <div role="option" aria-label="label 2">option 2</div>
11 </div>
12
13 <p id="description"></p>
14 <div id="console"></div>
15
16 <script>
17
18     description("This tests that the aria 'option' role works as expected. That is, it becomes a static text element with no children.");
19
20     if (window.accessibilityController) {
21
22           var body = document.getElementById("body");
23           body.focus();
24
25           var listBox = accessibilityController.focusedElement.childAtIndex(0);
26           var firstChild = listBox.childAtIndex(0);
27           var secondChild = listBox.childAtIndex(1);
28           debug("firstChild.role is " + firstChild.role);
29           debug("firstChild.title is " + firstChild.title);
30
31           debug("secondChild.role is " + secondChild.role);
32           if (accessibilityController.platformName == "atk")
33               debug("secondChild.title is " + secondChild.title);
34           else
35               debug("secondChild.description is " + secondChild.description);
36
37           shouldBe("firstChild.childrenCount", "0");
38           shouldBe("secondChild.childrenCount", "0");
39     }
40
41 </script>
42
43 <script src="../resources/js-test-post.js"></script>
44 </body>
45 </html>