Title: [231315] trunk/LayoutTests
Revision
231315
Author
[email protected]
Date
2018-05-03 11:13:53 -0700 (Thu, 03 May 2018)

Log Message

REGRESSION: Layout Test http/tests/security/location-cross-origin.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=185259

Unreviewed, stop relying on a setImeout(100) and epect the frame navigation to have completed. Instead,
use a setInterval() to poll until the cross-origin frame has navigated.


* http/tests/security/location-cross-origin.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (231314 => 231315)


--- trunk/LayoutTests/ChangeLog	2018-05-03 17:51:01 UTC (rev 231314)
+++ trunk/LayoutTests/ChangeLog	2018-05-03 18:13:53 UTC (rev 231315)
@@ -1,3 +1,13 @@
+2018-05-03  Chris Dumez  <[email protected]>
+
+        REGRESSION: Layout Test http/tests/security/location-cross-origin.html is a flaky failure
+        https://bugs.webkit.org/show_bug.cgi?id=185259
+
+        Unreviewed, stop relying on a setImeout(100) and epect the frame navigation to have completed. Instead,
+        use a setInterval() to poll until the cross-origin frame has navigated.
+
+        * http/tests/security/location-cross-origin.html:
+
 2018-05-03  Miguel Gomez  <[email protected]>
 
         Unreviewed GTK+ gardening after r231300.

Modified: trunk/LayoutTests/http/tests/security/location-cross-origin.html (231314 => 231315)


--- trunk/LayoutTests/http/tests/security/location-cross-origin.html	2018-05-03 17:51:01 UTC (rev 231314)
+++ trunk/LayoutTests/http/tests/security/location-cross-origin.html	2018-05-03 18:13:53 UTC (rev 231315)
@@ -60,10 +60,15 @@
 
     // Setting 'href' cross origin should be allowed.
     shouldNotThrow("frames[0].location.href = ''");
-    setTimeout(function() {
-        shouldBeEqualToString("frames[0].location.href", "about:blank");
-        finishJSTest();
-    }, 100);
+    handle = setInterval(function() {
+        try {
+            frames[0].location.href; // Should throw if still cross-origin.
+
+            shouldBeEqualToString("frames[0].location.href", "about:blank");
+            clearInterval(handle);
+            finishJSTest();
+        } catch (e) { }
+    }, 5);
 };
 </script>
 <script src=""
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to