OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
| 3 <script src="../../../resources/run-after-display.js"></script> |
3 <style> | 4 <style> |
4 body { | 5 body { |
5 height: 1000px; | 6 height: 1000px; |
6 } | 7 } |
7 #redbox { | 8 #redbox { |
8 background-color: red; | 9 background-color: red; |
9 position: absolute; | 10 position: absolute; |
10 top: 50px; | 11 top: 50px; |
11 left: 50px; | 12 left: 50px; |
12 height: 50px; | 13 height: 50px; |
(...skipping 11 matching lines...) Expand all Loading... |
24 <script> | 25 <script> |
25 if (window.internals) | 26 if (window.internals) |
26 window.internals.settings.setMockScrollbarsEnabled(true); | 27 window.internals.settings.setMockScrollbarsEnabled(true); |
27 if (window.testRunner) { | 28 if (window.testRunner) { |
28 testRunner.dumpAsTextWithPixelResults(); | 29 testRunner.dumpAsTextWithPixelResults(); |
29 testRunner.waitUntilDone(); | 30 testRunner.waitUntilDone(); |
30 } | 31 } |
31 | 32 |
32 function doTest() | 33 function doTest() |
33 { | 34 { |
34 if (window.testRunner) | 35 runAfterDisplay(function() { |
35 testRunner.display(); | 36 // Scroll red box off screen and scroll green box into same place. |
36 // Scroll red box off screen and scroll green box into same place. | 37 window.scrollTo(0, 400); |
37 window.scrollTo(0, 400); | 38 if (window.testRunner) |
38 if (window.testRunner) | 39 testRunner.notifyDone(); |
39 testRunner.notifyDone(); | 40 }); |
40 } | 41 } |
41 | 42 |
42 window.addEventListener('load', doTest, false); | 43 window.addEventListener('load', doTest, false); |
43 </script> | 44 </script> |
44 </head> | 45 </head> |
45 <body> | 46 <body> |
46 <div id="redbox"></div> | 47 <div id="redbox"></div> |
47 <div id="greenbox"></div> | 48 <div id="greenbox"></div> |
48 </body> | 49 </body> |
49 </html> | 50 </html> |
OLD | NEW |