OLD | NEW |
1 <script src="../js/resources/js-test-pre.js"></script> | 1 <script src="../js/resources/js-test-pre.js"></script> |
2 <style> | 2 <style> |
3 #pusher { | 3 #pusher { |
4 width: 1000px; | 4 width: 1000px; |
5 height: 1000px; | 5 height: 1000px; |
6 outline: 1px solid black; | 6 outline: 1px solid black; |
7 } | 7 } |
8 </style> | 8 </style> |
9 <div id="console"></div> | 9 <div id="console"></div> |
10 <div id="testArea"> | 10 <div id="testArea"> |
(...skipping 26 matching lines...) Expand all Loading... |
37 } | 37 } |
38 | 38 |
39 function scrollPage(x, y) | 39 function scrollPage(x, y) |
40 { | 40 { |
41 window.scrollTo(x, y); | 41 window.scrollTo(x, y); |
42 } | 42 } |
43 | 43 |
44 if (window.testRunner) { | 44 if (window.testRunner) { |
45 testRunner.dumpAsText(); | 45 testRunner.dumpAsText(); |
46 testRunner.waitUntilDone(); | 46 testRunner.waitUntilDone(); |
| 47 // Mouse events only work after an initial layout |
| 48 document.body.offsetLeft; |
47 } | 49 } |
48 | 50 |
49 // Default. | 51 // Default. |
50 function base(e) | 52 function base(e) |
51 { | 53 { |
52 event = e; | 54 event = e; |
53 debug("Base"); | 55 debug("Base"); |
54 shouldBe("event.clientX", "100"); | 56 shouldBe("event.clientX", "100"); |
55 shouldBe("event.clientY", "100"); | 57 shouldBe("event.clientY", "100"); |
56 shouldBe("event.pageX", "100"); | 58 shouldBe("event.pageX", "100"); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 window.removeEventListener("click", zoomedAndScrolled, false); | 113 window.removeEventListener("click", zoomedAndScrolled, false); |
112 | 114 |
113 if (window.testRunner) { | 115 if (window.testRunner) { |
114 var area = document.getElementById('testArea'); | 116 var area = document.getElementById('testArea'); |
115 area.parentNode.removeChild(area); | 117 area.parentNode.removeChild(area); |
116 | 118 |
117 testRunner.notifyDone(); | 119 testRunner.notifyDone(); |
118 } | 120 } |
119 </script> | 121 </script> |
120 <script src="../js/resources/js-test-post.js"></script> | 122 <script src="../js/resources/js-test-post.js"></script> |
OLD | NEW |