Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../resources/run-after-display.js"></script> | |
| 4 <script src="resources/text-based-repaint.js" type="text/javascript"></scrip t> | 5 <script src="resources/text-based-repaint.js" type="text/javascript"></scrip t> |
| 5 <script> | 6 <script> |
| 6 function repaintTest() { | 7 if (window.testRunner) |
| 8 testRunner.waitUntilDone(); | |
| 9 | |
| 10 function setupTest() | |
|
esprehn
2014/03/24 21:50:43
onload = function()
ykyyip
2014/03/24 22:15:03
Done.
| |
| 11 { | |
| 12 if (window.eventSender) { | |
| 13 testRunner.dumpAsTextWithPixelResults(); | |
| 14 | |
| 15 // Scroll the #outerDiv until we reach the #innerDiv. | |
| 16 eventSender.mouseMoveTo(50, 50); | |
| 17 eventSender.mouseScrollBy(0, -8); | |
| 18 } else { | |
| 19 document.write("This test is better run under DumpRenderTree. To man ually test it, continuously scroll down on the top-most element. There should be no repaint issue."); | |
| 20 } | |
| 21 | |
| 22 runAfterDisplay(function() { | |
| 23 runRepaintTest(); | |
| 24 if (window.testRunner) | |
| 25 testRunner.notifyDone(); | |
| 26 }); | |
| 27 } | |
| 28 | |
| 29 function repaintTest() | |
| 30 { | |
| 7 // Now scroll once in the #innerDiv to the green area. | 31 // Now scroll once in the #innerDiv to the green area. |
| 8 if (window.eventSender) | 32 if (window.eventSender) |
| 9 eventSender.mouseScrollBy(0, -10); | 33 eventSender.mouseScrollBy(0, -10); |
| 10 } | 34 } |
| 11 window.addEventListener("load", runRepaintTest, false); | 35 window.addEventListener("load", setupTest, false); |
|
esprehn
2014/03/24 21:50:43
remove this.
ykyyip
2014/03/24 22:15:03
Done.
| |
| 12 </script> | 36 </script> |
| 13 </head> | 37 </head> |
| 14 <body> | 38 <body> |
| 15 <!-- Bug 71550 - REGRESSION (r93614): Content remains despite parent element bei ng scrolled off page using javascript. --> | 39 <!-- Bug 71550 - REGRESSION (r93614): Content remains despite parent element bei ng scrolled off page using javascript. --> |
| 16 <!-- For the test to pass you should not see any RED or PURPLE, only green --> | 40 <!-- For the test to pass you should not see any RED or PURPLE, only green --> |
| 17 <div style="height: 300px; overflow-y: auto;" id="outerDiv"> | 41 <div style="height: 300px; overflow-y: auto;" id="outerDiv"> |
| 18 <div style="height: 300px; background: purple;"></div> | 42 <div style="height: 300px; background: purple;"></div> |
| 19 <div style="height: 400px; overflow-y: auto;" id="innerDiv"> | 43 <div style="height: 400px; overflow-y: auto;" id="innerDiv"> |
| 20 <div style="height: 400px; width: 300px; background: red"></div> | 44 <div style="height: 400px; width: 300px; background: red"></div> |
| 21 <div style="height: 400px; width: 300px; background: green"></div> | 45 <div style="height: 400px; width: 300px; background: green"></div> |
| 22 </div> | 46 </div> |
| 23 </div> | 47 </div> |
| 24 <script> | |
| 25 if (window.eventSender) { | |
| 26 testRunner.dumpAsTextWithPixelResults(); | |
| 27 | |
| 28 // Scroll the #outerDiv until we reach the #innerDiv. | |
| 29 eventSender.mouseMoveTo(50, 50); | |
| 30 eventSender.mouseScrollBy(0, -8); | |
| 31 } else { | |
| 32 document.write("This test is better run under DumpRenderTree. To manually te st it, continuously scroll down on the top-most element. There should be no repa int issue."); | |
| 33 } | |
| 34 </script> | |
| 35 </body> | 48 </body> |
| 36 </html> | 49 </html> |
| OLD | NEW |