Title: [232317] trunk/LayoutTests
Revision
232317
Author
[email protected]
Date
2018-05-30 16:34:12 -0700 (Wed, 30 May 2018)

Log Message

Add console logging to grant-storage-access-under-opener.html to assess its flakiness
https://bugs.webkit.org/show_bug.cgi?id=183714
<rdar://problem/38666060>

Unreviewed test gardening.


* http/tests/storageAccess/grant-storage-access-under-opener-expected.txt:
* http/tests/storageAccess/grant-storage-access-under-opener.html:
    Now outputs console log entries, step by step, to see where the timeouts happen.
* platform/ios-wk2/TestExpectations:
    Switched to [ Pass ] on iOS Debug to maximize chance of seeing the flakiness.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (232316 => 232317)


--- trunk/LayoutTests/ChangeLog	2018-05-30 23:30:09 UTC (rev 232316)
+++ trunk/LayoutTests/ChangeLog	2018-05-30 23:34:12 UTC (rev 232317)
@@ -1,3 +1,17 @@
+2018-05-30  John Wilander  <[email protected]>
+
+        Add console logging to grant-storage-access-under-opener.html to assess its flakiness
+        https://bugs.webkit.org/show_bug.cgi?id=183714
+        <rdar://problem/38666060>
+
+        Unreviewed test gardening.
+
+        * http/tests/storageAccess/grant-storage-access-under-opener-expected.txt:
+        * http/tests/storageAccess/grant-storage-access-under-opener.html:
+            Now outputs console log entries, step by step, to see where the timeouts happen.
+        * platform/ios-wk2/TestExpectations:
+            Switched to [ Pass ] on iOS Debug to maximize chance of seeing the flakiness.
+
 2018-05-29  Keith Miller  <[email protected]>
 
         Error instances should not strongly hold onto StackFrames

Modified: trunk/LayoutTests/http/tests/storageAccess/grant-storage-access-under-opener-expected.txt (232316 => 232317)


--- trunk/LayoutTests/http/tests/storageAccess/grant-storage-access-under-opener-expected.txt	2018-05-30 23:30:09 UTC (rev 232316)
+++ trunk/LayoutTests/http/tests/storageAccess/grant-storage-access-under-opener-expected.txt	2018-05-30 23:34:12 UTC (rev 232317)
@@ -1,3 +1,7 @@
+CONSOLE MESSAGE: line 54: Running test.
+CONSOLE MESSAGE: line 67: About to call testRunner.statisticsUpdateCookiePartitioning().
+CONSOLE MESSAGE: line 69: About to open the new window.
+CONSOLE MESSAGE: line 43: About to open the third party iframe.
 Tests that a cross-origin window from a prevalent domain with non-recent user interaction gets immediate storage access under its opener.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".

Modified: trunk/LayoutTests/http/tests/storageAccess/grant-storage-access-under-opener.html (232316 => 232317)


--- trunk/LayoutTests/http/tests/storageAccess/grant-storage-access-under-opener.html	2018-05-30 23:30:09 UTC (rev 232316)
+++ trunk/LayoutTests/http/tests/storageAccess/grant-storage-access-under-opener.html	2018-05-30 23:34:12 UTC (rev 232317)
@@ -40,33 +40,38 @@
                 testFailed("Received a message from an unexpected origin: " + event.origin);
 
             newWin.close();
+            console.log("About to open the third party iframe.");
             openIframe(thirdPartyBaseUrl + subPathToGetCookies + "&message=Should receive first-party cookie.", finishTest);
         }
 
-        setEnableFeature(true);
-        testRunner.setCanOpenWindows();
-
         const thirdPartyOrigin = "http://localhost:8000";
         const resourcePath = "/storageAccess/resources";
         const thirdPartyBaseUrl = thirdPartyOrigin + resourcePath;
         const firstPartyCookieName = "firstPartyCookie";
         const subPathToGetCookies = "/get-cookies.php?name1=" + firstPartyCookieName;
+        var newWin;
+        function run() {
+            console.log("Running test.");
+            setEnableFeature(true);
+            testRunner.setCanOpenWindows();
 
-        testRunner.setStatisticsPrevalentResource(thirdPartyOrigin, true);
-        if (!testRunner.isStatisticsPrevalentResource(thirdPartyOrigin))
-            testFailed("Host did not get set as prevalent resource.");
-        testRunner.setStatisticsHasHadNonRecentUserInteraction(thirdPartyOrigin, true);
-        if (!testRunner.isStatisticsHasHadUserInteraction(thirdPartyOrigin))
-            testFailed("Host did not get logged for user interaction.");
-        testRunner.dumpChildFramesAsText();
-        testRunner.setCloseRemainingWindowsWhenComplete(true);
+            testRunner.setStatisticsPrevalentResource(thirdPartyOrigin, true);
+            if (!testRunner.isStatisticsPrevalentResource(thirdPartyOrigin))
+                testFailed("Host did not get set as prevalent resource.");
+            testRunner.setStatisticsHasHadNonRecentUserInteraction(thirdPartyOrigin, true);
+            if (!testRunner.isStatisticsHasHadUserInteraction(thirdPartyOrigin))
+                testFailed("Host did not get logged for user interaction.");
+            testRunner.dumpChildFramesAsText();
+            testRunner.setCloseRemainingWindowsWhenComplete(true);
 
-        var newWin;
-        testRunner.statisticsUpdateCookiePartitioning(function () {
-            newWin = window.open(thirdPartyOrigin + "/storageAccess/resources/set-cookie-and-report-back.html", "testWindow");
-        });
+            console.log("About to call testRunner.statisticsUpdateCookiePartitioning().");
+            testRunner.statisticsUpdateCookiePartitioning(function () {
+                console.log("About to open the new window.");
+                newWin = window.open(thirdPartyOrigin + "/storageAccess/resources/set-cookie-and-report-back.html", "testWindow");
+            });
+        }
     </script>
 </head>
-<body>
+<body _onload_="run()">
 </body>
 </html>
\ No newline at end of file

Modified: trunk/LayoutTests/platform/ios-wk2/TestExpectations (232316 => 232317)


--- trunk/LayoutTests/platform/ios-wk2/TestExpectations	2018-05-30 23:30:09 UTC (rev 232316)
+++ trunk/LayoutTests/platform/ios-wk2/TestExpectations	2018-05-30 23:34:12 UTC (rev 232317)
@@ -1346,7 +1346,8 @@
 
 webkit.org/b/182849 imported/w3c/web-platform-tests/XMLHttpRequest/event-upload-progress-crossorigin.htm [ Pass Failure ]
 
-webkit.org/b/183714 [ Debug ] http/tests/storageAccess/grant-storage-access-under-opener.html [ Skip ]
+# This is marked as Pass to see if additional logging can reveal the cause of the flakiness.
+webkit.org/b/183714 [ Debug ] http/tests/storageAccess/grant-storage-access-under-opener.html [ Pass ]
 
 webkit.org/b/183860 [ Release ] http/wpt/service-workers/third-party-registration.html [ Pass Failure ]
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to