4 <script src="../resources/js-test.js"></script>
13 <body style="width: 2000px">
15 <button class="bigbutton">One</button>
16 <button class="bigbutton">Two</button>
17 <button class="bigbutton">Three</button>
19 <div id="console"></div>
22 description("This test ensures that scrolling the window sends a notification.");
23 window.jsTestIsAsync = true;
25 if (window.testRunner && window.accessibilityController) {
26 testRunner.dumpAsText();
28 window.scrollTo(0, 0);
29 shouldBe("window.pageXOffset", "0");
31 accessibilityController.addNotificationListener(function (target, notification) {
32 if (target.role == 'AXRole: AXWebArea' && notification == 'ScrollPositionChanged') {
33 debug('Got notification on web area');
34 accessibilityController.removeNotificationListener();
35 shouldBe("window.pageXOffset", "500");
40 window.setTimeout(function() {
41 window.scrollTo(500, 0);