fast/fixed-layout/fixed-layout.html times out on Apple WK2 bots
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 21 Jun 2015 16:44:41 +0000 (16:44 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 21 Jun 2015 16:44:41 +0000 (16:44 +0000)
The Flakiness Dashboard says this test times out on Apple
WebKit2 platforms by not calling testRunner.notifyDone():

<http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=fast%2Ffixed-layout%2Ffixed-layout.html>

* fast/css-grid-layout/flex-content-sized-columns-resize.html:
Use the same mechanism here that was just added in r185811.
* fast/fixed-layout/fixed-layout.html: Switch to using a
zero-delay timer instead of document.body.offsetTop.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@185812 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/css-grid-layout/flex-content-sized-columns-resize.html
LayoutTests/fast/fixed-layout/fixed-layout.html

index c524251..77e3ce2 100644 (file)
@@ -1,5 +1,19 @@
 2015-06-21  David Kilzer  <ddkilzer@apple.com>
 
+        fast/fixed-layout/fixed-layout.html times out on Apple WK2 bots
+
+        The Flakiness Dashboard says this test times out on Apple
+        WebKit2 platforms by not calling testRunner.notifyDone():
+
+        <http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=fast%2Ffixed-layout%2Ffixed-layout.html>
+
+        * fast/css-grid-layout/flex-content-sized-columns-resize.html:
+        Use the same mechanism here that was just added in r185811.
+        * fast/fixed-layout/fixed-layout.html: Switch to using a
+        zero-delay timer instead of document.body.offsetTop.
+
+2015-06-21  David Kilzer  <ddkilzer@apple.com>
+
         REGRESSION (r185809): fast/css-grid-layout/flex-content-sized-columns-resize.html hangs on WK1
 
         Since window.resize() occurs in the same runloop as the load on
index cdd4fbe..3ae81b1 100644 (file)
@@ -18,9 +18,7 @@ window.onload = function () {
     }
 
     // Prevent WebKit1 hangs by ensuring layout is up-to-date before resize.
-    document.body.offsetTop;
-
-    window.resizeTo(600, 600);
+    setTimeout(function() { window.resizeTo(600, 600); }, 0);
 }
 
 window.onresize = function () {
index d0f3eb5..3859775 100644 (file)
@@ -6,15 +6,17 @@ window.onload = function () {
         return;
     }
 
-    // Ensure layout is up to date here so that we get a resize event instead of just using
-    // 200x200 as the initial size, in WebKit1 (causing the test to hang).
-    document.body.offsetTop;
-
     testRunner.waitUntilDone();
-    window.resizeTo(200, 200);
+
+    // Prevent WebKit1 hangs by ensuring layout is up-to-date before resize.
+    setTimeout(function() { window.resizeTo(200, 200); }, 0);
 }
 
 window.onresize = function () {
+    if (!window.testRunner) {
+        return;
+    }
+
     internals.setUseFixedLayout(true);
     internals.setFixedLayoutSize(400, 400);
 
@@ -25,4 +27,4 @@ window.onresize = function () {
 <body style="margin: 0;">
 <div style="width: 100%; height: 100%; position: absolute; background-color: green;"></div>
 <div style="width: 50vw; height: 50vh; position: absolute; background-color: blue;"></div>
-</body>
\ No newline at end of file
+</body>