Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / accessibility / scroll-window-horiz-sends-notification.html
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;
10 }
11 </style>
12 </head>
13 <body style="width: 2000px">
14
15 <button class="bigbutton">One</button>
16 <button class="bigbutton">Two</button>
17 <button class="bigbutton">Three</button>
18
19 <div id="console"></div>
20 <script>
21
22 description("This test ensures that scrolling the window sends a notification.");
23 window.jsTestIsAsync = true;
24
25 if (window.testRunner && window.accessibilityController) {
26     testRunner.dumpAsText();
27
28     window.scrollTo(0, 0);
29     shouldBe("window.pageXOffset", "0");
30
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();
37         }
38     });
39
40     window.setTimeout(function() {
41         window.scrollTo(500, 0);
42     }, 0);
43 }
44
45 </script>
46
47 </body>
48 </html>