Title: [239966] trunk/LayoutTests
Revision
239966
Author
[email protected]
Date
2019-01-14 17:51:13 -0800 (Mon, 14 Jan 2019)

Log Message

Restructure http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html to address flakiness
https://bugs.webkit.org/show_bug.cgi?id=191211
<rdar://problem/45818606>

Unreviewed test gardening.

This test is flaky on the MacOS WK2 bot. The patch avoids a page navigation and
redirect which may avoid the code that changed in
https://trac.webkit.org/changeset/237735/webkit and made the test more flaky.


* http/tests/resourceLoadStatistics/remove-blocking-in-redirect-expected.txt:
* http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (239965 => 239966)


--- trunk/LayoutTests/ChangeLog	2019-01-15 01:31:48 UTC (rev 239965)
+++ trunk/LayoutTests/ChangeLog	2019-01-15 01:51:13 UTC (rev 239966)
@@ -1,3 +1,18 @@
+2019-01-14  John Wilander  <[email protected]>
+
+        Restructure http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html to address flakiness
+        https://bugs.webkit.org/show_bug.cgi?id=191211
+        <rdar://problem/45818606>
+
+        Unreviewed test gardening.
+
+        This test is flaky on the MacOS WK2 bot. The patch avoids a page navigation and
+        redirect which may avoid the code that changed in
+        https://trac.webkit.org/changeset/237735/webkit and made the test more flaky.
+
+        * http/tests/resourceLoadStatistics/remove-blocking-in-redirect-expected.txt:
+        * http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html:
+
 2019-01-14  Simon Fraser  <[email protected]>
 
         Animation and other code is too aggressive about invalidating layer composition

Modified: trunk/LayoutTests/http/tests/resourceLoadStatistics/remove-blocking-in-redirect-expected.txt (239965 => 239966)


--- trunk/LayoutTests/http/tests/resourceLoadStatistics/remove-blocking-in-redirect-expected.txt	2019-01-15 01:31:48 UTC (rev 239965)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/remove-blocking-in-redirect-expected.txt	2019-01-15 01:51:13 UTC (rev 239966)
@@ -11,6 +11,12 @@
 --------
 Frame: '<!--frame1-->'
 --------
+Set cookie.
+
+
+--------
+Frame: '<!--frame2-->'
+--------
 Should receive first-party cookie.
 Received cookie named 'firstPartyCookie'.
 Did not receive cookie named 'partitionedCookie'.
@@ -17,7 +23,7 @@
 Client-side document.cookie: firstPartyCookie=value
 
 --------
-Frame: '<!--frame2-->'
+Frame: '<!--frame3-->'
 --------
 Redirect case 1, should receive first-party cookie for 127.0.0.1.
 Received cookie named 'firstPartyCookie'.
@@ -25,13 +31,13 @@
 Client-side document.cookie: firstPartyCookie=127.0.0.1
 
 --------
-Frame: '<!--frame3-->'
+Frame: '<!--frame4-->'
 --------
 Try to set third-party cookie in blocked mode.
 
 
 --------
-Frame: '<!--frame4-->'
+Frame: '<!--frame5-->'
 --------
 Should receive no cookie.
 Did not receive cookie named 'firstPartyCookie'.
@@ -39,7 +45,7 @@
 Client-side document.cookie:
 
 --------
-Frame: '<!--frame5-->'
+Frame: '<!--frame6-->'
 --------
 Redirect case 2, should receive first-party cookie for 127.0.0.1.
 Received cookie named 'firstPartyCookie'.

Modified: trunk/LayoutTests/http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html (239965 => 239966)


--- trunk/LayoutTests/http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html	2019-01-15 01:31:48 UTC (rev 239965)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html	2019-01-15 01:51:13 UTC (rev 239966)
@@ -18,7 +18,6 @@
     const subPathToSetFirstPartyCookie = "/set-cookie.php?name=" + firstPartyCookieName + "&value=value";
     const partitionedCookieName = "partitionedCookie";
     const subPathToSetPartitionedCookie = "/set-cookie.php?name=" + partitionedCookieName + "&value=value";
-    const returnUrl = "http://" + partitionHost + "/resourceLoadStatistics/remove-blocking-in-redirect.html";
     const subPathToGetCookies = "/get-cookies.php?name1=" + firstPartyCookieName + "&name2=" + partitionedCookieName;
     const redirectChainUrl = thirdPartyOrigin + resourcePath + "/redirect.php?redirectTo=http://" + partitionHost + resourcePath + subPathToGetCookies;
 
@@ -35,12 +34,17 @@
         switch (document.location.hash) {
             case "#step1":
                 // Set first-party cookies for 127.0.0.1 and localhost.
+                document.location.hash = "step2";
                 document.cookie = firstPartyCookieName + "=127.0.0.1;path='/'";
-                document.location.href = "" + subPathToSetFirstPartyCookie + "#" + returnUrl + "#step2";
+                if (window.testRunner)
+                    testRunner.setAlwaysAcceptCookies(true);
+                openIframe(thirdPartyBaseUrl + subPathToSetFirstPartyCookie + "&message=Set cookie.", runTest);
                 break;
             case "#step2":
                 // Check that the cookie gets sent for localhost under 127.0.0.1 since localhost is not prevalent.
                 document.location.hash = "step3";
+                if (window.testRunner)
+                    testRunner.setAlwaysAcceptCookies(false);
                 openIframe(thirdPartyBaseUrl + subPathToGetCookies + "&message=Should receive first-party cookie.", runTest);
                 break;
             case "#step3":
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to