OLD | NEW |
---|---|
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <title></title> | 3 <title></title> |
4 <link rel="stylesheet" href="resources/default.css"></style> | 4 <link rel="stylesheet" href="resources/default.css"></style> |
5 <script src="../../resources/run-after-display.js"></script> | |
5 <script src="resources/text-based-repaint.js" type="text/javascript"></scrip t> | 6 <script src="resources/text-based-repaint.js" type="text/javascript"></scrip t> |
6 <script type="text/javascript"> | 7 <script type="text/javascript"> |
7 if (window.testRunner) | 8 if (window.testRunner) { |
9 testRunner.waitUntilDone(); | |
8 testRunner.dumpAsTextWithPixelResults(); | 10 testRunner.dumpAsTextWithPixelResults(); |
11 } | |
12 | |
13 function scrollAndRepaint() | |
esprehn
2014/03/24 21:50:43
same.
ykyyip
2014/03/24 22:15:03
Done.
| |
14 { | |
15 window.scrollTo(1000, 1000); | |
16 runAfterDisplay(function() { | |
17 runRepaintTest(); | |
18 if (window.testRunner) | |
19 testRunner.notifyDone(); | |
20 }); | |
21 } | |
9 | 22 |
10 function repaintTest() | 23 function repaintTest() |
11 { | 24 { |
12 var moveMeElement = document.getElementById('moveMe'); | 25 var moveMeElement = document.getElementById('moveMe'); |
13 moveMeElement.style.visibility = "visible"; | 26 moveMeElement.style.visibility = "visible"; |
14 moveMeElement.scrollTop = 100; | 27 moveMeElement.scrollTop = 100; |
15 moveMeElement.scrollLeft = 150; | 28 moveMeElement.scrollLeft = 150; |
16 } | 29 } |
17 </script> | 30 </script> |
18 </head> | 31 </head> |
19 <body style="height:2000px;" onload="runRepaintTest()"> | 32 <body style="height:2000px;" onload="scrollAndRepaint()"> |
20 <!-- You should see 1 green rectangle in the output and no red. --> | 33 <!-- You should see 1 green rectangle in the output and no red. --> |
21 <div id="moveMe" style="top: 150px; left: 100px; visibility: hidden" class=" fixed clipped"><div class="absolute green" style="top: 100px; left: 150px;"></di v></div> | 34 <div id="moveMe" style="top: 150px; left: 100px; visibility: hidden" class=" fixed clipped"><div class="absolute green" style="top: 100px; left: 150px;"></di v></div> |
22 <!-- Make sure we are scrolled --> | 35 <!-- Make sure we are scrolled --> |
23 <div style="top: 0px; left: 0px;" class="absolute red"></div> | 36 <div style="top: 0px; left: 0px;" class="absolute red"></div> |
24 <script> | |
25 window.scrollTo(1000, 1000); | |
26 </script> | |
27 </body> | 37 </body> |
28 </html> | 38 </html> |
OLD | NEW |