Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / accessibility / aria-scrollbar-role.html
bloba231093c0877653bf91f2e95b3e8bfa20282f617
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../resources/js-test.js"></script>
5 </head>
6 <body id="body">
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>
11 <p id="description"></p>
12 <div id="console"></div>
14 <script>
16 description("This tests that the ARIA scrollbar role works correctly");
18 if (window.accessibilityController) {
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'");
26 document.getElementById("scroller1").setAttribute("aria-orientation", "horizontal");
27 shouldBe("scroller.orientation", "'AXOrientation: AXHorizontalOrientation'");
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'");
38 </script>
40 </body>
41 </html>