OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <style type='text/css'> | 4 <style type='text/css'> |
5 body { | 5 body { |
6 height: 1000px; | 6 height: 1000px; |
7 } | 7 } |
8 | 8 |
9 .green { | 9 .green { |
10 background-color: green; | 10 background-color: green; |
(...skipping 11 matching lines...) Expand all Loading... |
22 } | 22 } |
23 | 23 |
24 .container { | 24 .container { |
25 position: relative; | 25 position: relative; |
26 } | 26 } |
27 | 27 |
28 .perspective { | 28 .perspective { |
29 -webkit-perspective: 1px; | 29 -webkit-perspective: 1px; |
30 } | 30 } |
31 </style> | 31 </style> |
| 32 <script src="../../../resources/run-after-display.js"></script> |
32 <script> | 33 <script> |
33 if (window.testRunner) { | 34 if (window.testRunner) { |
34 testRunner.dumpAsTextWithPixelResults(); | 35 testRunner.dumpAsTextWithPixelResults(); |
35 } | 36 } |
36 | 37 |
37 function doTest() | 38 function doTest() |
38 { | 39 { |
39 if (window.testRunner) | 40 if (window.testRunner) |
40 testRunner.display(); | 41 testRunner.waitUntilDone(); |
41 | 42 |
42 // Any scroll should keep the fixed-position element where it is. | 43 runAfterDisplay(function() { |
43 // If it stutters or disappears incorrectly, then the red background will
be revealed. | 44 // Any scroll should keep the fixed-position element where it is. |
44 window.scrollTo(0, 150); | 45 // If it stutters or disappears incorrectly, then the red background wil
l be revealed. |
| 46 window.scrollTo(0, 150); |
| 47 if (window.testRunner) |
| 48 testRunner.notifyDone(); |
| 49 }); |
45 } | 50 } |
46 | 51 |
47 window.addEventListener('load', doTest, false); | 52 window.addEventListener('load', doTest, false); |
48 </script> | 53 </script> |
49 </head> | 54 </head> |
50 <body> | 55 <body> |
51 <div class="green fixed box"> | 56 <div class="green fixed box"> |
52 <div class="container"> | 57 <div class="container"> |
53 <div class="perspective"></div> | 58 <div class="perspective"></div> |
54 </div> | 59 </div> |
55 </div> | 60 </div> |
56 </body> | 61 </body> |
57 </html> | 62 </html> |
OLD | NEW |