Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Unified Diff: LayoutTests/fast/repaint/overflow-auto-in-overflow-auto-scrolled.html

Issue 191693002: Delay scrollContents until the next paint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix nit Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..c919eaa2a98ec1471288ea1915a748adf1650cfd 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,37 @@
<!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();
+
+ window.onload = function()
+ {
+ 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);
</script>
</head>
<body>
@@ -21,16 +44,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>

Powered by Google App Engine
This is Rietveld 408576698