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

Unified Diff: LayoutTests/fast/repaint/fixed-tranformed.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-tranformed.html
diff --git a/LayoutTests/fast/repaint/fixed-tranformed.html b/LayoutTests/fast/repaint/fixed-tranformed.html
index 18002904da6c83b22688fe13508b63f84aab1227..c5852ba85b83c06db6c437ea8e0fd9d1ce3ddf80 100644
--- a/LayoutTests/fast/repaint/fixed-tranformed.html
+++ b/LayoutTests/fast/repaint/fixed-tranformed.html
@@ -2,38 +2,46 @@
<html>
<head>
-<style type="text/css" media="screen">
- body {
- height: 1000px;
- margin: 0;
- }
- #test {
- width: 100px;
- height: 100px;
- background-color: red;
- position: fixed;
- top: 10px;
- left: 10px;
- -webkit-transform: translate(50px, 50px);
- }
-
- .box:hover {
- background-color: green;
- }
-</style>
+ <style type="text/css" media="screen">
+ body {
+ height: 1000px;
+ margin: 0;
+ }
+ #test {
+ width: 100px;
+ height: 100px;
+ background-color: red;
+ position: fixed;
+ top: 10px;
+ left: 10px;
+ -webkit-transform: translate(50px, 50px);
+ }
+
+ .box:hover {
+ background-color: green;
+ }
+ </style>
+ <script src="../../resources/run-after-display.js"></script>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script type="text/javascript">
- function repaintTest()
- {
+ if (window.testRunner)
+ testRunner.waitUntilDone();
+
+ function repaintTest()
+ {
document.getElementById('test').style.background='green';
- }
-
- function setupTest()
- {
- window.scrollBy(0, 50);
- runRepaintTest();
- }
- window.addEventListener('load', setupTest, false);
+ }
+
+ function setupTest()
+ {
+ window.scrollBy(0, 50);
+ runAfterDisplay(function() {
+ runRepaintTest();
+ if (window.testRunner)
+ testRunner.notifyDone();
+ });
+ }
+ window.addEventListener('load', setupTest, false);
</script>
</head>
<body>

Powered by Google App Engine
This is Rietveld 408576698