Chromium Code Reviews| Index: LayoutTests/fast/repaint/overflow-auto-in-overflow-auto-scrolled.html |
| diff --git a/LayoutTests/fast/repaint/overflow-auto-in-overflow-auto-scrolled.html b/LayoutTests/fast/repaint/overflow-auto-in-overflow-auto-scrolled.html |
| index 2c1b96b6f71aeaf8d9b65118e4c855562284c851..b7656e8185ea1b6bfe63dde8c6711967a4ca7111 100644 |
| --- a/LayoutTests/fast/repaint/overflow-auto-in-overflow-auto-scrolled.html |
| +++ b/LayoutTests/fast/repaint/overflow-auto-in-overflow-auto-scrolled.html |
| @@ -1,14 +1,38 @@ |
| <!DOCTYPE html> |
| <html> |
| <head> |
| + <script src="../../resources/run-after-display.js"></script> |
| <script src="resources/text-based-repaint.js" type="text/javascript"></script> |
| <script> |
| - function repaintTest() { |
| + if (window.testRunner) |
| + testRunner.waitUntilDone(); |
| + |
| + function setupTest() |
|
esprehn
2014/03/24 21:50:43
onload = function()
ykyyip
2014/03/24 22:15:03
Done.
|
| + { |
| + if (window.eventSender) { |
| + testRunner.dumpAsTextWithPixelResults(); |
| + |
| + // Scroll the #outerDiv until we reach the #innerDiv. |
| + eventSender.mouseMoveTo(50, 50); |
| + eventSender.mouseScrollBy(0, -8); |
| + } else { |
| + document.write("This test is better run under DumpRenderTree. To manually test it, continuously scroll down on the top-most element. There should be no repaint issue."); |
| + } |
| + |
| + runAfterDisplay(function() { |
| + runRepaintTest(); |
| + if (window.testRunner) |
| + testRunner.notifyDone(); |
| + }); |
| + } |
| + |
| + function repaintTest() |
| + { |
| // Now scroll once in the #innerDiv to the green area. |
| if (window.eventSender) |
| eventSender.mouseScrollBy(0, -10); |
| } |
| - window.addEventListener("load", runRepaintTest, false); |
| + window.addEventListener("load", setupTest, false); |
|
esprehn
2014/03/24 21:50:43
remove this.
ykyyip
2014/03/24 22:15:03
Done.
|
| </script> |
| </head> |
| <body> |
| @@ -21,16 +45,5 @@ |
| <div style="height: 400px; width: 300px; background: green"></div> |
| </div> |
| </div> |
| -<script> |
| -if (window.eventSender) { |
| - testRunner.dumpAsTextWithPixelResults(); |
| - |
| - // Scroll the #outerDiv until we reach the #innerDiv. |
| - eventSender.mouseMoveTo(50, 50); |
| - eventSender.mouseScrollBy(0, -8); |
| -} else { |
| - document.write("This test is better run under DumpRenderTree. To manually test it, continuously scroll down on the top-most element. There should be no repaint issue."); |
| -} |
| -</script> |
| </body> |
| </html> |