Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / aria-scrollbar-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 tabindex=0 id="scroller1" aria-valuenow="55" role="scrollbar" aria-orientation="vertical">scrollbar</div>
9 <div tabindex=0 id="scroller2" aria-valuenow="55" role="scrollbar">scrollbar</div>
10
11 <p id="description"></p>
12 <div id="console"></div>
13
14 <script>
15
16     description("This tests that the ARIA scrollbar role works correctly");
17
18     if (window.accessibilityController) {
19
20         document.getElementById("scroller1").focus();
21         var scroller = accessibilityController.focusedElement;
22         shouldBe("scroller.role", "'AXRole: AXScrollBar'");
23         shouldBe("scroller.intValue", "55");
24         shouldBe("scroller.orientation", "'AXOrientation: AXVerticalOrientation'");
25
26         document.getElementById("scroller1").setAttribute("aria-orientation", "horizontal");
27         shouldBe("scroller.orientation", "'AXOrientation: AXHorizontalOrientation'");
28
29         // Default orientation should be vertical for scrollbars
30         document.getElementById("scroller2").focus();
31         scroller = accessibilityController.focusedElement;
32         shouldBe("scroller.role", "'AXRole: AXScrollBar'");
33         shouldBe("scroller.intValue", "55");
34         shouldBe("scroller.orientation", "'AXOrientation: AXVerticalOrientation'");
35     }
36
37 </script>
38
39 <script src="../resources/js-test-post.js"></script>
40 </body>
41 </html>