| <script src="../resources/js-test.js"></script> |
| <body style="width: 2000px"> |
| <button class="bigbutton">One</button> |
| <button class="bigbutton">Two</button> |
| <button class="bigbutton">Three</button> |
| description("This test ensures that scrolling the window sends a notification."); |
| window.jsTestIsAsync = true; |
| if (window.testRunner && window.accessibilityController) { |
| shouldBe("window.pageXOffset", "0"); |
| accessibilityController.addNotificationListener(function (target, notification) { |
| if (target.role == 'AXRole: AXWebArea' && notification == 'ScrollPositionChanged') { |
| debug('Got notification on web area'); |
| accessibilityController.removeNotificationListener(); |
| shouldBe("window.pageXOffset", "500"); |
| window.setTimeout(function() { |