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

Unified Diff: LayoutTests/fast/repaint/fixed-and-absolute-position-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/fixed-and-absolute-position-scrolled.html
diff --git a/LayoutTests/fast/repaint/fixed-and-absolute-position-scrolled.html b/LayoutTests/fast/repaint/fixed-and-absolute-position-scrolled.html
index f6707468c5ff443294886379efca598dd27a6931..767620590fdf46f9595b2efdb57d8a4d7a5740c3 100644
--- a/LayoutTests/fast/repaint/fixed-and-absolute-position-scrolled.html
+++ b/LayoutTests/fast/repaint/fixed-and-absolute-position-scrolled.html
@@ -1,22 +1,33 @@
<html>
<head>
<link rel="stylesheet" href="resources/default.css">
+ <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();
+ }
+
+ window.onload = function()
+ {
+ window.scrollTo(0, 500);
+ runAfterDisplay(function() {
+ runRepaintTest();
+ if (window.testRunner)
+ testRunner.notifyDone();
+ });
+ }
+
function repaintTest()
{
document.getElementById('container').style.position = 'static';
}
</script>
</head>
-<body style="height:2000px;" onload="runRepaintTest()">
+<body style="height:2000px;">
<!-- You should see 1 green rectangle in the output and no red. -->
<div style="top: 200px; left: 100px;" class="fixed red"></div>
<div id="container" style="top: 5000px;" class="relative"><div id="absoluteDiv" style="top: 700px; left:100px;" class="absolute green"></div></div>
- <script>
- window.scrollTo(0, 500);
- </script>
</body>
</html>
« no previous file with comments | « LayoutTests/fast/repaint/fixed-after-scroll.html ('k') | LayoutTests/fast/repaint/fixed-child-move-after-scroll.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698