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 .container { | 6 .container { |
7 padding: 100px; | 7 padding: 100px; |
8 margin: 100px; | 8 margin: 100px; |
9 border: 1px solid #000; | 9 border: 1px solid #000; |
10 height: 900px; | 10 height: 900px; |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 description("This test ensures that scrolling the window sends a notification.")
; | 36 description("This test ensures that scrolling the window sends a notification.")
; |
37 window.jsTestIsAsync = true; | 37 window.jsTestIsAsync = true; |
38 | 38 |
39 if (window.testRunner && window.accessibilityController) { | 39 if (window.testRunner && window.accessibilityController) { |
40 testRunner.dumpAsText(); | 40 testRunner.dumpAsText(); |
41 | 41 |
42 var container = document.getElementById('container'); | 42 var container = document.getElementById('container'); |
43 | 43 |
44 accessibilityController.addNotificationListener(function (target, notificati
on) { | 44 accessibilityController.addNotificationListener(function (target, notificati
on) { |
45 if (target.role == 'AXRole: AXDiv') { | 45 if (target.role == 'AXRole: AXGenericContainer') { |
46 debug('Got notification on container div'); | 46 debug('Got notification on container div'); |
47 shouldBe("container.scrollLeft", "500"); | 47 shouldBe("container.scrollLeft", "500"); |
48 accessibilityController.removeNotificationListener(); | 48 accessibilityController.removeNotificationListener(); |
49 finishJSTest(); | 49 finishJSTest(); |
50 } | 50 } |
51 }); | 51 }); |
52 | 52 |
53 window.setTimeout(function() { | 53 window.setTimeout(function() { |
54 container.scrollLeft = 500; | 54 container.scrollLeft = 500; |
55 }, 0); | 55 }, 0); |
56 } | 56 } |
57 | 57 |
58 </script> | 58 </script> |
59 | 59 |
60 </body> | 60 </body> |
61 </html> | 61 </html> |
OLD | NEW |