Title: [227943] trunk
Revision
227943
Author
achristen...@apple.com
Date
2018-01-31 16:58:52 -0800 (Wed, 31 Jan 2018)

Log Message

Unreviewed, rolling out r227942.

r227875 should not have been rolled out.

Reverted changeset:

"Unreviewed, rolling out r227875."
https://bugs.webkit.org/show_bug.cgi?id=182357
https://trac.webkit.org/changeset/227942

Modified Paths

Property Changed

Diff

Modified: trunk/LayoutTests/ChangeLog (227942 => 227943)


--- trunk/LayoutTests/ChangeLog	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/LayoutTests/ChangeLog	2018-02-01 00:58:52 UTC (rev 227943)
@@ -1,3 +1,15 @@
+2018-01-31  Alex Christensen  <achristen...@webkit.org>
+
+        Unreviewed, rolling out r227942.
+
+        r227875 should not have been rolled out.
+
+        Reverted changeset:
+
+        "Unreviewed, rolling out r227875."
+        https://bugs.webkit.org/show_bug.cgi?id=182357
+        https://trac.webkit.org/changeset/227942
+
 2018-01-31  Michael Catanzaro  <mcatanz...@igalia.com>
 
         Unreviewed, rolling out r227875.
Index: trunk/LayoutTests/fast/forms/append-children-during-form-submission-expected.txt
===================================================================
--- trunk/LayoutTests/fast/forms/append-children-during-form-submission-expected.txt	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/LayoutTests/fast/forms/append-children-during-form-submission-expected.txt	2018-02-01 00:58:52 UTC (rev 227943)

Property changes: trunk/LayoutTests/fast/forms/append-children-during-form-submission-expected.txt


Deleted: svn:mergeinfo

-/trunk/LayoutTests/fast/forms/append-children-during-form-submission-expected.txt:53455 \ No newline at end of property

Modified: trunk/LayoutTests/http/tests/resourceLoadStatistics/add-blocking-to-redirect-expected.txt (227942 => 227943)


--- trunk/LayoutTests/http/tests/resourceLoadStatistics/add-blocking-to-redirect-expected.txt	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/add-blocking-to-redirect-expected.txt	2018-02-01 00:58:52 UTC (rev 227943)
@@ -6,8 +6,8 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
+  
 
-
 --------
 Frame: '<!--framePath //<!--frame0-->-->'
 --------

Modified: trunk/LayoutTests/http/tests/resourceLoadStatistics/add-blocking-to-redirect.html (227942 => 227943)


--- trunk/LayoutTests/http/tests/resourceLoadStatistics/add-blocking-to-redirect.html	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/add-blocking-to-redirect.html	2018-02-01 00:58:52 UTC (rev 227943)
@@ -4,7 +4,7 @@
     <meta charset="UTF-8">
     <script src=""
 </head>
-<body _onload_="runTest()">
+<body>
 <script>
     description("Tests that blocking is added mid-flight in redirects.");
     jsTestIsAsync = true;
@@ -16,16 +16,6 @@
         testRunner.setCookieStoragePartitioningEnabled(enable);
     }
 
-    if (document.location.hash === "") {
-        setEnableFeature(true);
-        if (testRunner.isStatisticsPrevalentResource("http://localhost"))
-            testFailed("Localhost was classified as prevalent resource before the test starts.");
-        // Make sure the network process is up-to-date.
-        testRunner.statisticsSetShouldPartitionCookiesForHost("localhost", false);
-        testRunner.dumpChildFramesAsText();
-        document.location.hash = "step1";
-    }
-
     const partitionHost = "127.0.0.1:8000";
     const thirdPartyOrigin = "http://localhost:8000";
     const resourcePath = "/resourceLoadStatistics/resources";
@@ -67,10 +57,11 @@
                 // Set localhost as prevalent and with no user interaction to put it in the blocking category.
                 document.location.hash = "step5";
                 testRunner.setStatisticsPrevalentResource("http://localhost", true);
-                testRunner.statisticsUpdateCookiePartitioning();
                 if (!testRunner.isStatisticsPrevalentResource("http://localhost"))
                     testFailed("Host did not get set as prevalent resource.");
-                runTest();
+                testRunner.statisticsUpdateCookiePartitioning(function() {
+                    runTest();
+                });
                 break;
             case "#step5":
                 // Check that no cookie gets sent for localhost under 127.0.0.1 since localhost's cookies are blocked.
@@ -103,6 +94,18 @@
                 break;
         }
     }
+
+    if (document.location.hash === "") {
+        setEnableFeature(true);
+        if (testRunner.isStatisticsPrevalentResource("http://localhost"))
+            testFailed("Localhost was classified as prevalent resource before the test starts.");
+        testRunner.dumpChildFramesAsText();
+        document.location.hash = "step1";
+        // Make sure the network process is up-to-date.
+        testRunner.statisticsSetShouldPartitionCookiesForHost("localhost", false, runTest);
+    } else {
+        runTest();
+    }
 </script>
 </body>
 </html>

Modified: trunk/LayoutTests/http/tests/resourceLoadStatistics/add-partitioning-to-redirect-expected.txt (227942 => 227943)


--- trunk/LayoutTests/http/tests/resourceLoadStatistics/add-partitioning-to-redirect-expected.txt	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/add-partitioning-to-redirect-expected.txt	2018-02-01 00:58:52 UTC (rev 227943)
@@ -6,8 +6,8 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
+  
 
-
 --------
 Frame: '<!--framePath //<!--frame0-->-->'
 --------

Modified: trunk/LayoutTests/http/tests/resourceLoadStatistics/add-partitioning-to-redirect.html (227942 => 227943)


--- trunk/LayoutTests/http/tests/resourceLoadStatistics/add-partitioning-to-redirect.html	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/add-partitioning-to-redirect.html	2018-02-01 00:58:52 UTC (rev 227943)
@@ -4,7 +4,7 @@
     <meta charset="UTF-8">
     <script src=""
 </head>
-<body _onload_="runTest()">
+<body>
 <script>
     description("Tests that partitioning is added mid-flight in redirects.");
     jsTestIsAsync = true;
@@ -16,16 +16,6 @@
         testRunner.setCookieStoragePartitioningEnabled(enable);
     }
 
-    if (document.location.hash === "") {
-        setEnableFeature(true);
-        if (testRunner.isStatisticsPrevalentResource("http://localhost"))
-            testFailed("Localhost was classified as prevalent resource before the test starts.");
-        // Make sure the network process is up-to-date.
-        testRunner.statisticsSetShouldPartitionCookiesForHost("localhost", false);
-        testRunner.dumpChildFramesAsText();
-        document.location.hash = "step1";
-    }
-
     const partitionHost = "127.0.0.1:8000";
     const thirdPartyOrigin = "http://localhost:8000";
     const resourcePath = "/resourceLoadStatistics/resources";
@@ -67,11 +57,12 @@
                 // Set localhost as prevalent and with non-recent user interaction to put it in the partitioning category.
                 document.location.hash = "step5";
                 testRunner.setStatisticsPrevalentResource("http://localhost", true);
-                testRunner.setStatisticsHasHadNonRecentUserInteraction("http://localhost");
-                testRunner.statisticsUpdateCookiePartitioning();
                 if (!testRunner.isStatisticsPrevalentResource("http://localhost"))
                     testFailed("Host did not get set as prevalent resource.");
-                runTest();
+                testRunner.setStatisticsHasHadNonRecentUserInteraction("http://localhost");
+                testRunner.statisticsUpdateCookiePartitioning(function() {
+                    runTest();
+                });
                 break;
             case "#step5":
                 // Check that no cookie gets sent for localhost under 127.0.0.1 since localhost is partitioned.
@@ -104,6 +95,18 @@
                 break;
         }
     }
+
+    if (document.location.hash === "") {
+        setEnableFeature(true);
+        if (testRunner.isStatisticsPrevalentResource("http://localhost"))
+            testFailed("Localhost was classified as prevalent resource before the test started.");
+        testRunner.dumpChildFramesAsText();
+        document.location.hash = "step1";
+        // Make sure the network process is up-to-date.
+        testRunner.statisticsSetShouldPartitionCookiesForHost("localhost", false, runTest);
+    } else {
+        runTest();
+    }
 </script>
 </body>
 </html>

Modified: trunk/LayoutTests/http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context.html (227942 => 227943)


--- trunk/LayoutTests/http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context.html	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context.html	2018-02-01 00:58:52 UTC (rev 227943)
@@ -60,17 +60,21 @@
                 openIframe(thirdPartyBaseUrl + subPathToGetCookies + "&message=Should receive one cookie.", runTest);
                 break;
             case "#step3":
-                // Setup localhost for partitioning and set a partitioned cookie for localhost under 127.0.0.1.
+                // Setup localhost for partitioning.
                 document.location.hash = "step4";
-                testRunner.statisticsSetShouldPartitionCookiesForHost(thirdPartyHostname, true);
-                openIframe(thirdPartyBaseUrl + subPathToSetPartitionedCookie + "&message=Setting partitioned, third party cookie.", runTest);
+                testRunner.statisticsSetShouldPartitionCookiesForHost(thirdPartyHostname, true, runTest);
                 break;
             case "#step4":
-                // Load localhost under 127.0.0.1 and check that it gets only the partitioned cookie. End by aquiring user interaction for localhost.
+                // Set a partitioned cookie for localhost under 127.0.0.1.
                 document.location.hash = "step5";
+                openIframe(thirdPartyBaseUrl + subPathToSetPartitionedCookie + "&message=Setting partitioned, third party cookie.", runTest);
+                break;
+            case "#step5":
+                // Load localhost under 127.0.0.1 and check that it gets only the partitioned cookie. End by acquiring user interaction for localhost.
+                document.location.hash = "step6";
                 openIframe(thirdPartyBaseUrl + subPathToGetCookies + "&message=Should receive one partitioned, third party cookie.", setUserInteractionAndContinue);
                 break;
-            case "#step5":
+            case "#step6":
                 // Load localhost under 127.0.0.1 and check that it gets its non-partitioned cookie after user interaction.
                 openIframe(thirdPartyBaseUrl + subPathToGetCookies + "&message=After user interaction, should receive one non-partitioned, first party cookie.", finishTest);
                 break;
@@ -82,14 +86,14 @@
 
         testRunner.setStatisticsPrevalentResource(thirdPartyHostname, false);
         testRunner.setStatisticsHasHadUserInteraction(thirdPartyOrigin, false);
-        testRunner.statisticsSetShouldPartitionCookiesForHost(thirdPartyHostname, false);
-
         testRunner.waitUntilDone();
         testRunner.dumpChildFramesAsText();
         document.location.hash = "step1";
+
+        testRunner.statisticsSetShouldPartitionCookiesForHost(thirdPartyHostname, false, runTest);
+    } else {
+        runTest();
     }
-
-    runTest();
 </script>
 </body>
 </html>

Modified: trunk/LayoutTests/http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html (227942 => 227943)


--- trunk/LayoutTests/http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html	2018-02-01 00:58:52 UTC (rev 227943)
@@ -86,7 +86,6 @@
         }
     }
 
-
     if (document.location.host === partitionHost && document.location.hash === "" && window.testRunner && window.internals) {
         setEnableFeature(true);
 
@@ -93,17 +92,19 @@
         testRunner.setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval(false);
         testRunner.setStatisticsMinimumTimeBetweenDataRecordsRemoval(0);
 
-        testRunner.statisticsSetShouldPartitionCookiesForHost("localhost", true);
+        testRunner.waitUntilDone();
+        testRunner.dumpChildFramesAsText();
+        document.location.hash = "step1";
+
         testRunner.setStatisticsPrevalentResource("http://localhost", true);
         if (!testRunner.isStatisticsPrevalentResource("http://localhost"))
             testFailed("Host did not get set as prevalent resource.");
 
-        testRunner.waitUntilDone();
-        testRunner.dumpChildFramesAsText();
-        document.location.hash = "step1";
+        testRunner.statisticsSetShouldPartitionCookiesForHost("localhost", true, runTest);
+    } else {
+        runTest();
     }
 
-    runTest();
 </script>
 </body>
 </html>

Modified: trunk/LayoutTests/http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout.html (227942 => 227943)


--- trunk/LayoutTests/http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout.html	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout.html	2018-02-01 00:58:52 UTC (rev 227943)
@@ -40,8 +40,7 @@
     }
 
     function fireShouldPartitionCookiesHandlerAndContinue() {
-        testRunner.statisticsUpdateCookiePartitioning();
-        runTest();
+        testRunner.statisticsUpdateCookiePartitioning(runTest);
     }
 
     function setShortCookiePartitioningTimeOutPlusFireShouldPartitionCookiesHandlerAndContinue() {

Modified: trunk/LayoutTests/http/tests/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction-expected.txt (227942 => 227943)


--- trunk/LayoutTests/http/tests/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction-expected.txt	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction-expected.txt	2018-02-01 00:58:52 UTC (rev 227943)
@@ -1,5 +1,5 @@
+  
 
-
 --------
 Frame: '<!--framePath //<!--frame0-->-->'
 --------

Modified: trunk/LayoutTests/http/tests/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html (227942 => 227943)


--- trunk/LayoutTests/http/tests/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html	2018-02-01 00:58:52 UTC (rev 227943)
@@ -5,7 +5,7 @@
     <title>Test for Partitioned Cookies With and Without User Interaction</title>
     <script src=""
 </head>
-<body _onload_="runTest()">
+<body>
 <script>
     const partitionHost = "127.0.0.1:8000";
     const thirdPartyOrigin = "http://localhost:8000";
@@ -73,11 +73,13 @@
     if (document.location.host === partitionHost && document.location.hash == "" && window.testRunner && window.internals) {
         setEnableFeature(true);
 
-        testRunner.statisticsSetShouldPartitionCookiesForHost("localhost", true);
-
         testRunner.waitUntilDone();
         testRunner.dumpChildFramesAsText();
         document.location.hash = "step1";
+
+        testRunner.statisticsSetShouldPartitionCookiesForHost("localhost", true, runTest);
+    } else {
+        runTest();
     }
 </script>
 </body>

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


--- trunk/LayoutTests/http/tests/resourceLoadStatistics/remove-blocking-in-redirect-expected.txt	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/remove-blocking-in-redirect-expected.txt	2018-02-01 00:58:52 UTC (rev 227943)
@@ -6,8 +6,8 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
+  
 
-
 --------
 Frame: '<!--framePath //<!--frame0-->-->'
 --------

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


--- trunk/LayoutTests/http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html	2018-02-01 00:58:52 UTC (rev 227943)
@@ -4,7 +4,7 @@
     <meta charset="UTF-8">
     <script src=""
 </head>
-<body _onload_="runTest()">
+<body>
 <script>
     description("Tests that blocking is removed mid-flight in redirects.");
     jsTestIsAsync = true;
@@ -16,16 +16,6 @@
         testRunner.setCookieStoragePartitioningEnabled(enable);
     }
 
-    if (document.location.hash === "") {
-        setEnableFeature(true);
-        if (testRunner.isStatisticsPrevalentResource("http://localhost"))
-            testFailed("Localhost was classified as prevalent resource before the test starts.");
-        // Make sure the network process is up-to-date.
-        testRunner.statisticsSetShouldPartitionCookiesForHost("localhost", false);
-        testRunner.dumpChildFramesAsText();
-        document.location.hash = "step1";
-    }
-
     const partitionHost = "127.0.0.1:8000";
     const thirdPartyOrigin = "http://localhost:8000";
     const resourcePath = "/resourceLoadStatistics/resources";
@@ -68,10 +58,11 @@
                 // Set localhost as prevalent and with non-recent user interaction to put it in the blocking category.
                 document.location.hash = "step5";
                 testRunner.setStatisticsPrevalentResource("http://localhost", true);
-                testRunner.statisticsUpdateCookiePartitioning();
                 if (!testRunner.isStatisticsPrevalentResource("http://localhost"))
                     testFailed("Host did not get set as prevalent resource.");
-                runTest();
+                testRunner.statisticsUpdateCookiePartitioning(function() {
+                    runTest();
+                });
                 break;
             case "#step5":
                 // Set partitioned cookie for localhost under 127.0.0.1.
@@ -94,6 +85,18 @@
                 break;
         }
     }
+
+    if (document.location.hash === "") {
+        setEnableFeature(true);
+        if (testRunner.isStatisticsPrevalentResource("http://localhost"))
+            testFailed("Localhost was classified as prevalent resource before the test starts.");
+        testRunner.dumpChildFramesAsText();
+        document.location.hash = "step1";
+        // Make sure the network process is up-to-date.
+        testRunner.statisticsSetShouldPartitionCookiesForHost("localhost", false, runTest);
+    } else {
+        runTest();
+    }
 </script>
 </body>
 </html>

Modified: trunk/LayoutTests/http/tests/resourceLoadStatistics/remove-partitioning-in-redirect-expected.txt (227942 => 227943)


--- trunk/LayoutTests/http/tests/resourceLoadStatistics/remove-partitioning-in-redirect-expected.txt	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/remove-partitioning-in-redirect-expected.txt	2018-02-01 00:58:52 UTC (rev 227943)
@@ -6,8 +6,8 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
+  
 
-
 --------
 Frame: '<!--framePath //<!--frame0-->-->'
 --------

Modified: trunk/LayoutTests/http/tests/resourceLoadStatistics/remove-partitioning-in-redirect.html (227942 => 227943)


--- trunk/LayoutTests/http/tests/resourceLoadStatistics/remove-partitioning-in-redirect.html	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/remove-partitioning-in-redirect.html	2018-02-01 00:58:52 UTC (rev 227943)
@@ -4,7 +4,7 @@
     <meta charset="UTF-8">
     <script src=""
 </head>
-<body _onload_="runTest()">
+<body>
 <script>
     description("Tests that partitioning is removed mid-flight in redirects.");
     jsTestIsAsync = true;
@@ -16,16 +16,6 @@
         testRunner.setCookieStoragePartitioningEnabled(enable);
     }
 
-    if (document.location.hash === "") {
-        setEnableFeature(true);
-        if (testRunner.isStatisticsPrevalentResource("http://localhost"))
-            testFailed("Localhost was classified as prevalent resource before the test starts.");
-        // Make sure the network process is up-to-date.
-        testRunner.statisticsSetShouldPartitionCookiesForHost("localhost", false);
-        testRunner.dumpChildFramesAsText();
-        document.location.hash = "step1";
-    }
-
     const partitionHost = "127.0.0.1:8000";
     const thirdPartyOrigin = "http://localhost:8000";
     const resourcePath = "/resourceLoadStatistics/resources";
@@ -68,11 +58,12 @@
                 // Set localhost as prevalent and with non-recent user interaction to put it in the partitioning category.
                 document.location.hash = "step5";
                 testRunner.setStatisticsPrevalentResource("http://localhost", true);
-                testRunner.setStatisticsHasHadNonRecentUserInteraction("http://localhost");
-                testRunner.statisticsUpdateCookiePartitioning();
                 if (!testRunner.isStatisticsPrevalentResource("http://localhost"))
                     testFailed("Host did not get set as prevalent resource.");
-                runTest();
+                testRunner.setStatisticsHasHadNonRecentUserInteraction("http://localhost");
+                testRunner.statisticsUpdateCookiePartitioning(function() {
+                    runTest();
+                });
                 break;
             case "#step5":
                 // Set partitioned cookie for localhost under 127.0.0.1.
@@ -95,6 +86,18 @@
                 break;
         }
     }
+
+    if (document.location.hash === "") {
+        setEnableFeature(true);
+        if (testRunner.isStatisticsPrevalentResource("http://localhost"))
+            testFailed("Localhost was classified as prevalent resource before the test starts.");
+        testRunner.dumpChildFramesAsText();
+        document.location.hash = "step1";
+        // Make sure the network process is up-to-date.
+        testRunner.statisticsSetShouldPartitionCookiesForHost("localhost", false, runTest);
+    } else {
+        runTest();
+    }
 </script>
 </body>
 </html>

Modified: trunk/LayoutTests/http/tests/resourceLoadStatistics/third-party-cookie-with-and-without-user-interaction.html (227942 => 227943)


--- trunk/LayoutTests/http/tests/resourceLoadStatistics/third-party-cookie-with-and-without-user-interaction.html	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/third-party-cookie-with-and-without-user-interaction.html	2018-02-01 00:58:52 UTC (rev 227943)
@@ -69,14 +69,18 @@
             case "#step4":
                 // Flag localhost for partitioning and set a partitioned cookie.
                 document.location.hash = "step5";
-                testRunner.statisticsSetShouldPartitionCookiesForHost(thirdPartyHostname, true);
-                openIframe(thirdPartyBaseUrl + subPathToSetPartitionedThirdPartyCookie + "&message=Setting partitioned, third party cookie.", runTest);
+                testRunner.statisticsSetShouldPartitionCookiesForHost(thirdPartyHostname, true, runTest);
                 break;
             case "#step5":
+                // Flag localhost for partitioning and set a partitioned cookie.
                 document.location.hash = "step6";
+                openIframe(thirdPartyBaseUrl + subPathToSetPartitionedThirdPartyCookie + "&message=Setting partitioned, third party cookie.", runTest);
+                break;
+            case "#step6":
+                document.location.hash = "step7";
                 openIframe(thirdPartyBaseUrl + subPathToGetCookies + "&message=Should only receive partitioned, third party cookie.", setUserInteractionAndContinue);
                 break;
-            case "#step6":
+            case "#step7":
                 openIframe(thirdPartyBaseUrl + subPathToGetCookies + "&message=After user interaction, should receive non-partitioned cookies set in a first-party context and in a third-party context.", finishTest);
                 break;
         }
@@ -85,17 +89,17 @@
     if (document.location.host === partitionHost && document.location.hash == "" && window.testRunner && window.internals) {
         setEnableFeature(true);
 
+        testRunner.waitUntilDone();
+        testRunner.dumpChildFramesAsText();
+        document.location.hash = "step1";
+
         // Start test with third party as non-prevalent
         testRunner.setStatisticsPrevalentResource(thirdPartyHostname, false);
         testRunner.setStatisticsHasHadUserInteraction(thirdPartyOrigin, false);
-        testRunner.statisticsSetShouldPartitionCookiesForHost(thirdPartyHostname, false);
-
-        testRunner.waitUntilDone();
-        testRunner.dumpChildFramesAsText();
-        document.location.hash = "step1";
+        testRunner.statisticsSetShouldPartitionCookiesForHost(thirdPartyHostname, false, runTest);
+    } else {
+        runTest();
     }
-
-    runTest();
 </script>
 </body>
 </html>

Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (227942 => 227943)


--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2018-02-01 00:58:52 UTC (rev 227943)
@@ -804,14 +804,14 @@
 [ HighSierra+ ] http/tests/resourceLoadStatistics/third-party-cookie-with-and-without-user-interaction.html [ Pass ]
 [ HighSierra+ ] http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html [ Pass Timeout ]
 [ HighSierra+ ] http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context.html [ Pass ]
+[ HighSierra+ ] http/tests/resourceLoadStatistics/add-partitioning-to-redirect.html [ Pass ]
 [ HighSierra+ ] http/tests/resourceLoadStatistics/add-blocking-to-redirect.html [ Pass ]
 [ HighSierra+ ] http/tests/resourceLoadStatistics/remove-partitioning-in-redirect.html [ Pass ]
 [ HighSierra+ ] http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html [ Pass ]
 [ HighSierra+ ] http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store.html [ Pass ]
 [ HighSierra+ ] http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html [ Pass ]
+[ HighSierra+ ] http/tests/resourceLoadStatistics/grandfathering.html [ Pass ]
 
-webkit.org/b/181958 [ HighSierra+ ] http/tests/resourceLoadStatistics/add-partitioning-to-redirect.html [ Pass Failure ]
-
 # <rdar://problem/33555759>
 webkit.org/b/177616 [ HighSierra+ ] http/tests/media/video-buffered-range-contains-currentTime.html [ Pass Timeout ]
 
@@ -875,8 +875,6 @@
 
 webkit.org/b/181753 [ HighSierra Release ] http/wpt/service-workers/update-service-worker.https.html [ Pass Failure ]
 
-webkit.org/b/181831 [ HighSierra ] fast/forms/searchfield-heights.html [ Pass Failure ]
-
 webkit.org/b/181957 [ Release ] http/tests/misc/resource-timing-resolution.html [ Pass Failure ]
 
 webkit.org/b/181835 webrtc/captureCanvas-webrtc.html [ Pass Timeout ]

Modified: trunk/Source/WebKit/ChangeLog (227942 => 227943)


--- trunk/Source/WebKit/ChangeLog	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/Source/WebKit/ChangeLog	2018-02-01 00:58:52 UTC (rev 227943)
@@ -1,3 +1,15 @@
+2018-01-31  Alex Christensen  <achristen...@webkit.org>
+
+        Unreviewed, rolling out r227942.
+
+        r227875 should not have been rolled out.
+
+        Reverted changeset:
+
+        "Unreviewed, rolling out r227875."
+        https://bugs.webkit.org/show_bug.cgi?id=182357
+        https://trac.webkit.org/changeset/227942
+
 2018-01-31  Michael Catanzaro  <mcatanz...@igalia.com>
 
         Unreviewed, rolling out r227875.

Modified: trunk/Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp (227942 => 227943)


--- trunk/Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp	2018-02-01 00:58:52 UTC (rev 227943)
@@ -244,7 +244,7 @@
     if (!store)
         return;
 
-    store->scheduleCookiePartitioningUpdate();
+    store->scheduleCookiePartitioningUpdate([]() { });
 }
 
 void WKWebsiteDataStoreSetStatisticsShouldPartitionCookiesForHost(WKWebsiteDataStoreRef dataStoreRef, WKStringRef host, bool value)
@@ -254,9 +254,9 @@
         return;
 
     if (value)
-        store->scheduleCookiePartitioningUpdateForDomains({ WebKit::toImpl(host)->string() }, { }, { }, WebKit::ShouldClearFirst::No);
+        store->scheduleCookiePartitioningUpdateForDomains({ WebKit::toImpl(host)->string() }, { }, { }, WebKit::ShouldClearFirst::No, []() { });
     else
-        store->scheduleClearPartitioningStateForDomains({ WebKit::toImpl(host)->string() });
+        store->scheduleClearPartitioningStateForDomains({ WebKit::toImpl(host)->string() }, []() { });
 }
 
 void WKWebsiteDataStoreStatisticsSubmitTelemetry(WKWebsiteDataStoreRef dataStoreRef)

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm (227942 => 227943)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm	2018-02-01 00:58:52 UTC (rev 227943)
@@ -497,23 +497,43 @@
 
 - (void)_resourceLoadStatisticsUpdateCookiePartitioning
 {
+    [self _resourceLoadStatisticsUpdateCookiePartitioning:^() { }];
+}
+
+- (void)_resourceLoadStatisticsUpdateCookiePartitioning:(void (^)())completionHandler
+{
     auto* store = _websiteDataStore->websiteDataStore().resourceLoadStatistics();
-    if (!store)
+    if (!store) {
+        completionHandler();
         return;
-
-    store->scheduleCookiePartitioningUpdate();
+    }
+    
+    store->scheduleCookiePartitioningUpdate([completionHandler = makeBlockPtr(completionHandler)]() {
+        completionHandler();
+    });
 }
 
 - (void)_resourceLoadStatisticsSetShouldPartitionCookies:(BOOL)value forHost:(NSString *)host
 {
+    [self _resourceLoadStatisticsSetShouldPartitionCookies:value forHost:host completionHandler:^() { }];
+}
+
+- (void)_resourceLoadStatisticsSetShouldPartitionCookies:(BOOL)value forHost:(NSString *)host completionHandler:(void (^)())completionHandler
+{
     auto* store = _websiteDataStore->websiteDataStore().resourceLoadStatistics();
-    if (!store)
+    if (!store) {
+        completionHandler();
         return;
+    }
 
     if (value)
-        store->scheduleCookiePartitioningUpdateForDomains({ host }, { }, { }, WebKit::ShouldClearFirst::No);
+        store->scheduleCookiePartitioningUpdateForDomains({ host }, { }, { }, WebKit::ShouldClearFirst::No, [completionHandler = makeBlockPtr(completionHandler)]() {
+            completionHandler();
+        });
     else
-        store->scheduleClearPartitioningStateForDomains({ host });
+        store->scheduleClearPartitioningStateForDomains({ host }, [completionHandler = makeBlockPtr(completionHandler)]() {
+            completionHandler();
+        });
 }
 
 - (void)_resourceLoadStatisticsSubmitTelemetry

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h (227942 => 227943)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h	2018-02-01 00:58:52 UTC (rev 227943)
@@ -73,8 +73,10 @@
 - (void)_resourceLoadStatisticsSetMaxStatisticsEntries:(size_t)entries WK_API_AVAILABLE(macosx(10.13), ios(11.0));
 - (void)_resourceLoadStatisticsSetPruneEntriesDownTo:(size_t)entries WK_API_AVAILABLE(macosx(10.13), ios(11.0));
 - (void)_resourceLoadStatisticsProcessStatisticsAndDataRecords WK_API_AVAILABLE(macosx(10.13), ios(11.0));
-- (void)_resourceLoadStatisticsUpdateCookiePartitioning WK_API_AVAILABLE(macosx(10.13), ios(11.0));
-- (void)_resourceLoadStatisticsSetShouldPartitionCookies:(BOOL)value forHost:(NSString *)host WK_API_AVAILABLE(macosx(10.13), ios(11.0));
+- (void)_resourceLoadStatisticsUpdateCookiePartitioning WK_API_DEPRECATED_WITH_REPLACEMENT("_resourceLoadStatisticsUpdateCookiePartitioning", macosx(10.13, WK_MAC_TBA), ios(11.0, WK_IOS_TBA));
+- (void)_resourceLoadStatisticsUpdateCookiePartitioning:(void (^)(void))completionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
+- (void)_resourceLoadStatisticsSetShouldPartitionCookies:(BOOL)value forHost:(NSString *)host WK_API_DEPRECATED_WITH_REPLACEMENT("_resourceLoadStatisticsSetShouldPartitionCookies", macosx(10.13, WK_MAC_TBA), ios(11.0, WK_IOS_TBA));
+- (void)_resourceLoadStatisticsSetShouldPartitionCookies:(BOOL)value forHost:(NSString *)host completionHandler:(void (^)(void))completionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
 - (void)_resourceLoadStatisticsSubmitTelemetry WK_API_AVAILABLE(macosx(10.13), ios(11.0));
 - (void)_resourceLoadStatisticsSetNotifyPagesWhenDataRecordsWereScanned:(BOOL)value WK_API_AVAILABLE(macosx(10.13), ios(11.0));
 - (void)_resourceLoadStatisticsSetShouldClassifyResourcesBeforeDataRecordsRemoval:(BOOL)value WK_API_AVAILABLE(macosx(10.13), ios(11.0));

Modified: trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp (227942 => 227943)


--- trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp	2018-02-01 00:58:52 UTC (rev 227943)
@@ -254,7 +254,7 @@
 
     mergeStatistics(WTFMove(origins));
     // Fire before processing statistics to propagate user interaction as fast as possible to the network process.
-    updateCookiePartitioning();
+    updateCookiePartitioning([]() { });
     processStatisticsAndDataRecords();
 }
 
@@ -386,7 +386,7 @@
         statistics.mostRecentUserInteractionTime = WallTime::now();
 
         if (statistics.isMarkedForCookiePartitioning || statistics.isMarkedForCookieBlocking)
-            updateCookiePartitioningForDomains({ }, { }, { primaryDomain }, ShouldClearFirst::No);
+            updateCookiePartitioningForDomains({ }, { }, { primaryDomain }, ShouldClearFirst::No, []() { });
     });
 }
 
@@ -400,7 +400,7 @@
         statistics.hadUserInteraction = true;
         statistics.mostRecentUserInteractionTime = WallTime::now() - (m_parameters.timeToLiveCookiePartitionFree + Seconds::fromHours(1));
 
-        updateCookiePartitioningForDomains({ primaryDomain }, { }, { }, ShouldClearFirst::No);
+        updateCookiePartitioningForDomains({ primaryDomain }, { }, { }, ShouldClearFirst::No, []() { });
     });
 }
 
@@ -563,31 +563,31 @@
     });
 }
 
-void WebResourceLoadStatisticsStore::scheduleCookiePartitioningUpdate()
+void WebResourceLoadStatisticsStore::scheduleCookiePartitioningUpdate(CompletionHandler<void()>&& callback)
 {
     // Helper function used by testing system. Should only be called from the main thread.
     ASSERT(RunLoop::isMain());
 
-    m_statisticsQueue->dispatch([this, protectedThis = makeRef(*this)] {
-        updateCookiePartitioning();
+    m_statisticsQueue->dispatch([this, protectedThis = makeRef(*this), callback = WTFMove(callback)] () mutable {
+        updateCookiePartitioning(WTFMove(callback));
     });
 }
 
-void WebResourceLoadStatisticsStore::scheduleCookiePartitioningUpdateForDomains(const Vector<String>& domainsToPartition, const Vector<String>& domainsToBlock, const Vector<String>& domainsToNeitherPartitionNorBlock, ShouldClearFirst shouldClearFirst)
+void WebResourceLoadStatisticsStore::scheduleCookiePartitioningUpdateForDomains(const Vector<String>& domainsToPartition, const Vector<String>& domainsToBlock, const Vector<String>& domainsToNeitherPartitionNorBlock, ShouldClearFirst shouldClearFirst, CompletionHandler<void()>&& callback)
 {
     // Helper function used by testing system. Should only be called from the main thread.
     ASSERT(RunLoop::isMain());
-    m_statisticsQueue->dispatch([this, protectedThis = makeRef(*this), domainsToPartition = crossThreadCopy(domainsToPartition), domainsToBlock = crossThreadCopy(domainsToBlock), domainsToNeitherPartitionNorBlock = crossThreadCopy(domainsToNeitherPartitionNorBlock), shouldClearFirst] {
-        updateCookiePartitioningForDomains(domainsToPartition, domainsToBlock, domainsToNeitherPartitionNorBlock, shouldClearFirst);
+    m_statisticsQueue->dispatch([this, protectedThis = makeRef(*this), domainsToPartition = crossThreadCopy(domainsToPartition), domainsToBlock = crossThreadCopy(domainsToBlock), domainsToNeitherPartitionNorBlock = crossThreadCopy(domainsToNeitherPartitionNorBlock), shouldClearFirst, callback = WTFMove(callback)] () mutable {
+        updateCookiePartitioningForDomains(domainsToPartition, domainsToBlock, domainsToNeitherPartitionNorBlock, shouldClearFirst, WTFMove(callback));
     });
 }
 
-void WebResourceLoadStatisticsStore::scheduleClearPartitioningStateForDomains(const Vector<String>& domains)
+void WebResourceLoadStatisticsStore::scheduleClearPartitioningStateForDomains(const Vector<String>& domains, CompletionHandler<void()>&& callback)
 {
     // Helper function used by testing system. Should only be called from the main thread.
     ASSERT(RunLoop::isMain());
-    m_statisticsQueue->dispatch([this, protectedThis = makeRef(*this), domains = crossThreadCopy(domains)] {
-        clearPartitioningStateForDomains(domains);
+    m_statisticsQueue->dispatch([this, protectedThis = makeRef(*this), domains = crossThreadCopy(domains), callback = WTFMove(callback)] () mutable {
+        clearPartitioningStateForDomains(domains, WTFMove(callback));
     });
 }
 
@@ -732,7 +732,7 @@
         return;
 
     mergeStatistics(WTFMove(loadedStatistics));
-    updateCookiePartitioning();
+    updateCookiePartitioning([]() { });
 
     Vector<OperatingDate> operatingDates;
     succeeded = decoder.decodeObjects("operatingDates", operatingDates, [](KeyedDecoder& decoder, OperatingDate& date) {
@@ -756,7 +756,7 @@
     m_resourceStatisticsMap.clear();
     m_operatingDates.clear();
 
-    updateCookiePartitioningForDomains({ }, { }, { }, ShouldClearFirst::Yes);
+    updateCookiePartitioningForDomains({ }, { }, { }, ShouldClearFirst::Yes, []() { });
 }
 
 bool WebResourceLoadStatisticsStore::wasAccessedAsFirstPartyDueToUserInteraction(const ResourceLoadStatistics& current, const ResourceLoadStatistics& updated)
@@ -794,7 +794,7 @@
     return statistic.isPrevalentResource && !statistic.hadUserInteraction;
 }
 
-void WebResourceLoadStatisticsStore::updateCookiePartitioning()
+void WebResourceLoadStatisticsStore::updateCookiePartitioning(CompletionHandler<void()>&& callback)
 {
     ASSERT(!RunLoop::isMain());
 
@@ -819,20 +819,25 @@
         }
     }
 
-    if (domainsToPartition.isEmpty() && domainsToBlock.isEmpty() && domainsToNeitherPartitionNorBlock.isEmpty())
+    if (domainsToPartition.isEmpty() && domainsToBlock.isEmpty() && domainsToNeitherPartitionNorBlock.isEmpty()) {
+        callback();
         return;
+    }
 
-    RunLoop::main().dispatch([this, protectedThis = makeRef(*this), domainsToPartition = crossThreadCopy(domainsToPartition), domainsToBlock = crossThreadCopy(domainsToBlock), domainsToNeitherPartitionNorBlock = crossThreadCopy(domainsToNeitherPartitionNorBlock)] () {
+    RunLoop::main().dispatch([this, protectedThis = makeRef(*this), domainsToPartition = crossThreadCopy(domainsToPartition), domainsToBlock = crossThreadCopy(domainsToBlock), domainsToNeitherPartitionNorBlock = crossThreadCopy(domainsToNeitherPartitionNorBlock), callback = WTFMove(callback)] () {
         m_updatePrevalentDomainsToPartitionOrBlockCookiesHandler(domainsToPartition, domainsToBlock, domainsToNeitherPartitionNorBlock, ShouldClearFirst::No);
+        callback();
     });
 }
 
-void WebResourceLoadStatisticsStore::updateCookiePartitioningForDomains(const Vector<String>& domainsToPartition, const Vector<String>& domainsToBlock, const Vector<String>& domainsToNeitherPartitionNorBlock, ShouldClearFirst shouldClearFirst)
+void WebResourceLoadStatisticsStore::updateCookiePartitioningForDomains(const Vector<String>& domainsToPartition, const Vector<String>& domainsToBlock, const Vector<String>& domainsToNeitherPartitionNorBlock, ShouldClearFirst shouldClearFirst, CompletionHandler<void()>&& callback)
 {
     ASSERT(!RunLoop::isMain());
-    if (domainsToPartition.isEmpty() && domainsToBlock.isEmpty() && domainsToNeitherPartitionNorBlock.isEmpty() && shouldClearFirst == ShouldClearFirst::No)
+    if (domainsToPartition.isEmpty() && domainsToBlock.isEmpty() && domainsToNeitherPartitionNorBlock.isEmpty() && shouldClearFirst == ShouldClearFirst::No) {
+        callback();
         return;
-
+    }
+    
     RunLoop::main().dispatch([this, shouldClearFirst, protectedThis = makeRef(*this), domainsToPartition = crossThreadCopy(domainsToPartition), domainsToBlock = crossThreadCopy(domainsToBlock), domainsToNeitherPartitionNorBlock = crossThreadCopy(domainsToNeitherPartitionNorBlock)] () {
         m_updatePrevalentDomainsToPartitionOrBlockCookiesHandler(domainsToPartition, domainsToBlock, domainsToNeitherPartitionNorBlock, shouldClearFirst);
     });
@@ -852,13 +857,17 @@
 
     for (auto& domain : domainsToBlock)
         ensureResourceStatisticsForPrimaryDomain(domain).isMarkedForCookieBlocking = true;
+
+    callback();
 }
 
-void WebResourceLoadStatisticsStore::clearPartitioningStateForDomains(const Vector<String>& domains)
+void WebResourceLoadStatisticsStore::clearPartitioningStateForDomains(const Vector<String>& domains, CompletionHandler<void()>&& callback)
 {
     ASSERT(!RunLoop::isMain());
-    if (domains.isEmpty())
+    if (domains.isEmpty()) {
+        callback();
         return;
+    }
 
     RunLoop::main().dispatch([this, protectedThis = makeRef(*this), domains = crossThreadCopy(domains)] () {
         m_removeDomainsHandler(domains);
@@ -869,6 +878,8 @@
         statistic.isMarkedForCookiePartitioning = false;
         statistic.isMarkedForCookieBlocking = false;
     }
+
+    callback();
 }
 
 void WebResourceLoadStatisticsStore::resetCookiePartitioningState()

Modified: trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h (227942 => 227943)


--- trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h	2018-02-01 00:58:52 UTC (rev 227943)
@@ -106,9 +106,9 @@
     void setSubframeUnderTopFrameOrigin(const WebCore::URL& subframe, const WebCore::URL& topFrame);
     void setSubresourceUnderTopFrameOrigin(const WebCore::URL& subresource, const WebCore::URL& topFrame);
     void setSubresourceUniqueRedirectTo(const WebCore::URL& subresource, const WebCore::URL& hostNameRedirectedTo);
-    void scheduleCookiePartitioningUpdate();
-    void scheduleCookiePartitioningUpdateForDomains(const Vector<String>& domainsToPartition, const Vector<String>& domainsToBlock, const Vector<String>& domainsToNeitherPartitionNorBlock, ShouldClearFirst);
-    void scheduleClearPartitioningStateForDomains(const Vector<String>& domains);
+    void scheduleCookiePartitioningUpdate(CompletionHandler<void()>&&);
+    void scheduleCookiePartitioningUpdateForDomains(const Vector<String>& domainsToPartition, const Vector<String>& domainsToBlock, const Vector<String>& domainsToNeitherPartitionNorBlock, ShouldClearFirst, CompletionHandler<void()>&&);
+    void scheduleClearPartitioningStateForDomains(const Vector<String>& domains, CompletionHandler<void()>&&);
     void scheduleStatisticsAndDataRecordsProcessing();
     void submitTelemetry();
     void scheduleCookiePartitioningStateReset();
@@ -162,9 +162,9 @@
     bool hasHadUnexpiredRecentUserInteraction(WebCore::ResourceLoadStatistics&) const;
     void includeTodayAsOperatingDateIfNecessary();
     Vector<String> topPrivatelyControlledDomainsToRemoveWebsiteDataFor();
-    void updateCookiePartitioning();
-    void updateCookiePartitioningForDomains(const Vector<String>& domainsToPartition, const Vector<String>& domainsToBlock, const Vector<String>& domainsToNeitherPartitionNorBlock, ShouldClearFirst);
-    void clearPartitioningStateForDomains(const Vector<String>& domains);
+    void updateCookiePartitioning(CompletionHandler<void()>&&);
+    void updateCookiePartitioningForDomains(const Vector<String>& domainsToPartition, const Vector<String>& domainsToBlock, const Vector<String>& domainsToNeitherPartitionNorBlock, ShouldClearFirst, CompletionHandler<void()>&&);
+    void clearPartitioningStateForDomains(const Vector<String>& domains, CompletionHandler<void()>&&);
     void mergeStatistics(Vector<WebCore::ResourceLoadStatistics>&&);
     WebCore::ResourceLoadStatistics& ensureResourceStatisticsForPrimaryDomain(const String&);
     void processStatisticsAndDataRecords();

Modified: trunk/Tools/ChangeLog (227942 => 227943)


--- trunk/Tools/ChangeLog	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/Tools/ChangeLog	2018-02-01 00:58:52 UTC (rev 227943)
@@ -1,3 +1,15 @@
+2018-01-31  Alex Christensen  <achristen...@webkit.org>
+
+        Unreviewed, rolling out r227942.
+
+        r227875 should not have been rolled out.
+
+        Reverted changeset:
+
+        "Unreviewed, rolling out r227875."
+        https://bugs.webkit.org/show_bug.cgi?id=182357
+        https://trac.webkit.org/changeset/227942
+
 2018-01-31  Michael Catanzaro  <mcatanz...@igalia.com>
 
         Unreviewed, rolling out r227875.

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl (227942 => 227943)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl	2018-02-01 00:58:52 UTC (rev 227943)
@@ -283,8 +283,8 @@
     void setStatisticsTimeToLiveCookiePartitionFree(double seconds);
     void statisticsNotifyObserver();
     void statisticsProcessStatisticsAndDataRecords();
-    void statisticsUpdateCookiePartitioning();
-    void statisticsSetShouldPartitionCookiesForHost(DOMString hostName, boolean value);
+    void statisticsUpdateCookiePartitioning(object callback);
+    void statisticsSetShouldPartitionCookiesForHost(DOMString hostName, boolean value, object callback);
     void statisticsSubmitTelemetry();
     void setStatisticsNotifyPagesWhenDataRecordsWereScanned(boolean value);
     void setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval(boolean value);

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp (227942 => 227943)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp	2018-02-01 00:58:52 UTC (rev 227943)
@@ -245,6 +245,11 @@
         return;
     }
 
+    if (WKStringIsEqualToUTF8CString(messageName, "CallDidSetPartitionOrBlockCookiesForHost")) {
+        m_testRunner->statisticsCallDidSetPartitionOrBlockCookiesForHostCallback();
+        return;
+    }
+
     if (WKStringIsEqualToUTF8CString(messageName, "CallDidRemoveAllSessionCredentialsCallback")) {
         m_testRunner->callDidRemoveAllSessionCredentialsCallback();
         return;

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (227942 => 227943)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp	2018-02-01 00:58:52 UTC (rev 227943)
@@ -651,6 +651,7 @@
     StatisticsDidScanDataRecordsCallbackID,
     StatisticsDidRunTelemetryCallbackID,
     StatisticsDidClearThroughWebsiteDataRemovalCallbackID,
+    StatisticsDidSetPartitionOrBlockCookiesForHostCallbackID,
     DidRemoveAllSessionCredentialsCallbackID,
     GetApplicationManifestCallbackID,
     FirstUIScriptCallbackID = 100
@@ -1553,14 +1554,18 @@
     WKBundlePostSynchronousMessage(InjectedBundle::singleton().bundle(), messageName.get(), 0, nullptr);
 }
 
-void TestRunner::statisticsUpdateCookiePartitioning()
+void TestRunner::statisticsUpdateCookiePartitioning(JSValueRef callback)
 {
+    cacheTestRunnerCallback(StatisticsDidSetPartitionOrBlockCookiesForHostCallbackID, callback);
+
     WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("StatisticsUpdateCookiePartitioning"));
     WKBundlePostSynchronousMessage(InjectedBundle::singleton().bundle(), messageName.get(), 0, nullptr);
 }
 
-void TestRunner::statisticsSetShouldPartitionCookiesForHost(JSStringRef hostName, bool value)
+void TestRunner::statisticsSetShouldPartitionCookiesForHost(JSStringRef hostName, bool value, JSValueRef callback)
 {
+    cacheTestRunnerCallback(StatisticsDidSetPartitionOrBlockCookiesForHostCallbackID, callback);
+
     Vector<WKRetainPtr<WKStringRef>> keys;
     Vector<WKRetainPtr<WKTypeRef>> values;
     
@@ -1584,6 +1589,11 @@
     WKBundlePostSynchronousMessage(InjectedBundle::singleton().bundle(), messageName.get(), messageBody.get(), nullptr);
 }
 
+void TestRunner::statisticsCallDidSetPartitionOrBlockCookiesForHostCallback()
+{
+    callTestRunnerCallback(StatisticsDidSetPartitionOrBlockCookiesForHostCallbackID);
+}
+
 void TestRunner::statisticsSubmitTelemetry()
 {
     WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("StatisticsSubmitTelemetry"));

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h (227942 => 227943)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h	2018-02-01 00:58:52 UTC (rev 227943)
@@ -367,8 +367,9 @@
     void statisticsDidRunTelemetryCallback(unsigned totalPrevalentResources, unsigned totalPrevalentResourcesWithUserInteraction, unsigned top3SubframeUnderTopFrameOrigins);
     void statisticsNotifyObserver();
     void statisticsProcessStatisticsAndDataRecords();
-    void statisticsUpdateCookiePartitioning();
-    void statisticsSetShouldPartitionCookiesForHost(JSStringRef hostName, bool value);
+    void statisticsUpdateCookiePartitioning(JSValueRef callback);
+    void statisticsSetShouldPartitionCookiesForHost(JSStringRef hostName, bool value, JSValueRef callback);
+    void statisticsCallDidSetPartitionOrBlockCookiesForHostCallback();
     void statisticsSubmitTelemetry();
     void setStatisticsLastSeen(JSStringRef hostName, double seconds);
     void setStatisticsPrevalentResource(JSStringRef hostName, bool value);

Modified: trunk/Tools/WebKitTestRunner/TestInvocation.cpp (227942 => 227943)


--- trunk/Tools/WebKitTestRunner/TestInvocation.cpp	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.cpp	2018-02-01 00:58:52 UTC (rev 227943)
@@ -1345,6 +1345,12 @@
     WKPagePostMessageToInjectedBundle(TestController::singleton().mainWebView()->page(), messageName.get(), 0);
 }
 
+void TestInvocation::didSetPartitionOrBlockCookiesForHost()
+{
+    WKRetainPtr<WKStringRef> messageName = adoptWK(WKStringCreateWithUTF8CString("CallDidSetPartitionOrBlockCookiesForHost"));
+    WKPagePostMessageToInjectedBundle(TestController::singleton().mainWebView()->page(), messageName.get(), 0);
+}
+
 void TestInvocation::didRemoveAllSessionCredentials()
 {
     WKRetainPtr<WKStringRef> messageName = adoptWK(WKStringCreateWithUTF8CString("CallDidRemoveAllSessionCredentialsCallback"));

Modified: trunk/Tools/WebKitTestRunner/TestInvocation.h (227942 => 227943)


--- trunk/Tools/WebKitTestRunner/TestInvocation.h	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.h	2018-02-01 00:58:52 UTC (rev 227943)
@@ -72,6 +72,7 @@
     void notifyDownloadDone();
 
     void didClearStatisticsThroughWebsiteDataRemoval();
+    void didSetPartitionOrBlockCookiesForHost();
 
     void didRemoveAllSessionCredentials();
     

Modified: trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm (227942 => 227943)


--- trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm	2018-02-01 00:08:01 UTC (rev 227942)
+++ trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm	2018-02-01 00:58:52 UTC (rev 227943)
@@ -376,12 +376,16 @@
 
 void TestController::statisticsUpdateCookiePartitioning()
 {
-    [globalWebViewConfiguration.websiteDataStore _resourceLoadStatisticsUpdateCookiePartitioning];
+    [globalWebViewConfiguration.websiteDataStore _resourceLoadStatisticsUpdateCookiePartitioning:^() {
+        m_currentInvocation->didSetPartitionOrBlockCookiesForHost();
+    }];
 }
 
 void TestController::statisticsSetShouldPartitionCookiesForHost(WKStringRef hostName, bool value)
 {
-    [globalWebViewConfiguration.websiteDataStore _resourceLoadStatisticsSetShouldPartitionCookies:value forHost:toNSString(hostName)];
+    [globalWebViewConfiguration.websiteDataStore _resourceLoadStatisticsSetShouldPartitionCookies:value forHost:toNSString(hostName) completionHandler:^() {
+        m_currentInvocation->didSetPartitionOrBlockCookiesForHost();
+    }];
 }
 
 void TestController::statisticsSubmitTelemetry()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to