Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / accessibility / scroll-window-horiz-sends-notification.html
blob4b1e5c7ad70c7c284cc1c3bb54bf600c2dacbd13
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <script src="../resources/js-test.js"></script>
5 <style>
6 .bigbutton {
7 display:block;
8 width: 600px;
9 height: 600px;
11 </style>
12 </head>
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>
20 <script>
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");
36 finishJSTest();
38 });
40 window.setTimeout(function() {
41 window.scrollTo(500, 0);
42 }, 0);
45 </script>
47 </body>
48 </html>