| OLD | NEW |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../resources/js-test.js"></script> | 4 <script src="../resources/js-test.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body id="body"> | 6 <body id="body"> |
| 7 | 7 |
| 8 <div tabindex=0 id="scroller" aria-valuenow="55" role="scrollbar" aria-orientati
on="vertical">scrollbar</div> | 8 <div tabindex=0 id="scroller1" aria-valuenow="55" role="scrollbar" aria-orientat
ion="vertical">scrollbar</div> |
| 9 | 9 <div tabindex=0 id="scroller2" aria-valuenow="55" role="scrollbar">scrollbar</di
v> |
| 10 | 10 |
| 11 <p id="description"></p> | 11 <p id="description"></p> |
| 12 <div id="console"></div> | 12 <div id="console"></div> |
| 13 | 13 |
| 14 <script> | 14 <script> |
| 15 | 15 |
| 16 description("This tests that the ARIA scrollbar role works correctly"); | 16 description("This tests that the ARIA scrollbar role works correctly"); |
| 17 | 17 |
| 18 if (window.accessibilityController) { | 18 if (window.accessibilityController) { |
| 19 | 19 |
| 20 document.getElementById("scroller").focus(); | 20 document.getElementById("scroller1").focus(); |
| 21 var scroller = accessibilityController.focusedElement; | 21 var scroller = accessibilityController.focusedElement; |
| 22 shouldBe("scroller.role", "'AXRole: AXScrollBar'"); | 22 shouldBe("scroller.role", "'AXRole: AXScrollBar'"); |
| 23 shouldBe("scroller.intValue", "55"); | 23 shouldBe("scroller.intValue", "55"); |
| 24 shouldBe("scroller.orientation", "'AXOrientation: AXVerticalOrientation'
"); | 24 shouldBe("scroller.orientation", "'AXOrientation: AXVerticalOrientation'
"); |
| 25 | 25 |
| 26 document.getElementById("scroller").setAttribute("aria-orientation", "ho
rizontal"); | 26 document.getElementById("scroller1").setAttribute("aria-orientation", "h
orizontal"); |
| 27 shouldBe("scroller.orientation", "'AXOrientation: AXHorizontalOrientatio
n'"); | 27 shouldBe("scroller.orientation", "'AXOrientation: AXHorizontalOrientatio
n'"); |
| 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 |
| 28 } | 36 } |
| 29 | 37 |
| 30 </script> | 38 </script> |
| 31 | 39 |
| 32 </body> | 40 </body> |
| 33 </html> | 41 </html> |
| OLD | NEW |