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

Unified Diff: LayoutTests/fast/repaint/absolute-position-changed.html

Issue 191693002: Delay scrollContents until the next paint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix layout tests 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/absolute-position-changed.html
diff --git a/LayoutTests/fast/repaint/absolute-position-changed.html b/LayoutTests/fast/repaint/absolute-position-changed.html
index 8d685604438d8d1a7f2c05221f36ba0c396954ec..9cef6bb96c606bc8526915d20bb2bcae548aa9c0 100644
--- a/LayoutTests/fast/repaint/absolute-position-changed.html
+++ b/LayoutTests/fast/repaint/absolute-position-changed.html
@@ -1,22 +1,38 @@
<html>
<head>
<link rel="stylesheet" href="resources/default.css">
+ <style>
+ html {
+ overflow: scroll;
+ }
+ </style>
+ <script src="../../resources/run-after-display.js"></script>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script type="text/javascript">
- if (window.testRunner)
+ if (window.testRunner) {
+ testRunner.waitUntilDone();
testRunner.dumpAsTextWithPixelResults();
+ }
+
+ function scrollAndRepaint()
+ {
+ window.scrollTo(0, 500);
+ runAfterDisplay(function() {
+ runRepaintTest();
+ if (window.testRunner)
+ testRunner.notifyDone();
+ });
+ }
+
function repaintTest()
{
document.getElementById('absoluteDiv').style.top = '700px';
}
</script>
</head>
-<body style="height:2000px;" onload="runRepaintTest()">
+<body style="height:2000px;" onload="scrollAndRepaint()">
<!-- You should see 1 green rectangle in the output and no red. -->
<div style="top: 200px; left: 100px;" class="fixed red"></div>
- <div id="absoluteDiv" style="top: 500px; left:100px;" class="absolute green"></div></div>
- <script>
- window.scrollTo(0, 500);
- </script>
+ <div id="absoluteDiv" style="top: 500px; left:100px;" class="absolute green"></div>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698