| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <script src="../../resources/js-test-pre.js"></script> |
| <script> |
| |
| function runTest() |
| { |
| if (window.accessibilityController) { |
| |
| document.getElementById("body").focus(); |
| obj = accessibilityController.focusedElement; |
| shouldBe("obj.childAtIndex(0).childAtIndex(0).role", "'AXRole: AXListItem'"); |
| |
| document.getElementById("obj1").focus(); |
| obj1 = accessibilityController.focusedElement; |
| shouldBe("obj1.role", "'AXRole: AXToggleButton'"); |
| |
| document.getElementById("obj2").focus(); |
| obj2 = accessibilityController.focusedElement; |
| shouldBe("obj2.role", "'AXRole: AXToggleButton'"); |
| |
| document.getElementById("obj3").focus(); |
| obj3 = accessibilityController.focusedElement; |
| shouldBe("obj3.role", "'AXRole: AXButton'"); |
| } |
| } |
| </script> |
| </head> |
| <body id="body" onload="runTest()"> |
| |
| <div role="list"> |
| <div role="listitem" aria-label="item 1" aria-pressed="false"><img src='#' width=100 height=100></div> |
| </div> |
| |
| <input type="button" id="obj1" role="button" aria-pressed="true"> |
| <input type="button" id="obj2" role="button" aria-pressed="false"> |
| <input type="button" id="obj3" role="button"> |
| |
| <p id="description"></p> |
| <div id="console"></div> |
| |
| <script> |
| description("This tests that the role exposed when a button has the attribute aria-pressed is toggle buttons in GTK."); |
| |
| </script> |
| <script src="../../resources/js-test-post.js"></script> |
| </body> |
| </html> |