Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / repaint / fixed.html
index de4c8aa..09bdd11 100644 (file)
@@ -1,22 +1,33 @@
 <html>
 <head>
     <title></title>
+    <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();
+
+        window.onload = function()
+        {
+            window.scrollTo(0, 20);
+            runAfterDisplay(function() {
+                runRepaintTest();
+                if (window.testRunner)
+                    testRunner.notifyDone();
+            });
+        }
+
+        function repaintTest()
+        {
             document.getElementById('t').style.background='green';
-       }
+        }
     </script>
 </head>
-<body style="height:2000px;" onload="runRepaintTest()">
+<body style="height:2000px;">
     <p style="position: relative; top: 20px;">
         Repaint test for <i><a href="http://bugs.webkit.org/show_bug.cgi?id=11452">http://bugs.webkit.org/show_bug.cgi?id=11452</a>
         REGRESSION (r16736-r16801): Incorrect repaint of fixed boxes</i>.
     </p>
     <div id="t" style="position: fixed; width: 100px; height: 100px; background: red"></div>
-    <script>
-        window.scrollTo(0, 20);
-    </script>
 </body>
 </html>