OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../resources/js-test.js"></script> | 4 <script src="../resources/js-test.js"></script> |
5 <style> | 5 <style> |
6 .bigbutton { | 6 .bigbutton { |
7 display:block; | 7 display:block; |
8 width: 600px; | 8 width: 600px; |
9 height: 600px; | 9 height: 600px; |
10 } | 10 } |
(...skipping 11 matching lines...) Expand all Loading... |
22 description("This test ensures that scrolling the window sends a notification.")
; | 22 description("This test ensures that scrolling the window sends a notification.")
; |
23 window.jsTestIsAsync = true; | 23 window.jsTestIsAsync = true; |
24 | 24 |
25 if (window.testRunner && window.accessibilityController) { | 25 if (window.testRunner && window.accessibilityController) { |
26 testRunner.dumpAsText(); | 26 testRunner.dumpAsText(); |
27 | 27 |
28 window.scrollTo(0, 0); | 28 window.scrollTo(0, 0); |
29 shouldBe("window.pageYOffset", "0"); | 29 shouldBe("window.pageYOffset", "0"); |
30 | 30 |
31 accessibilityController.addNotificationListener(function (target, notificati
on) { | 31 accessibilityController.addNotificationListener(function (target, notificati
on) { |
32 if (target.role == 'AXRole: AXScrollArea') { | 32 if (target.role == 'AXRole: AXWebArea' && notification == 'ScrollPositio
nChanged') { |
33 debug('Got notification on scroll area'); | 33 debug('Got notification on web area'); |
34 accessibilityController.removeNotificationListener(); | 34 accessibilityController.removeNotificationListener(); |
35 shouldBe("window.pageYOffset", "500"); | 35 shouldBe("window.pageYOffset", "500"); |
36 finishJSTest(); | 36 finishJSTest(); |
37 } | 37 } |
38 }); | 38 }); |
39 | 39 |
40 window.setTimeout(function() { | 40 window.setTimeout(function() { |
41 window.scrollTo(0, 500); | 41 window.scrollTo(0, 500); |
42 }, 0); | 42 }, 0); |
43 } | 43 } |
44 | 44 |
45 </script> | 45 </script> |
46 | 46 |
47 </body> | 47 </body> |
48 </html> | 48 </html> |
OLD | NEW |