Title: [232585] trunk
Revision
232585
Author
[email protected]
Date
2018-06-07 10:05:08 -0700 (Thu, 07 Jun 2018)

Log Message

Remove unused debug mode conditions
https://bugs.webkit.org/show_bug.cgi?id=186358
<rdar://problem/39117121>

Reviewed by Zalan Bujtas.

Source/WebKit:

Remove some unused code paths related to ResourceLoadStatistics debug mode.

* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::shouldPartitionCookies const):

LayoutTests:

Rebase test expectations after behavior change.

* http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context-expected.txt:
* http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context.html:
* http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout-expected.txt:
* http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout.html:
* http/tests/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction-expected.txt:
* http/tests/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html:
* http/tests/resourceLoadStatistics/third-party-cookie-with-and-without-user-interaction-expected.txt:
* http/tests/resourceLoadStatistics/third-party-cookie-with-and-without-user-interaction.html:
* http/tests/storageAccess/has-storage-access-from-prevalent-domain-with-recent-user-interaction-expected.txt
* http/tests/storageAccess/has-storage-access-from-prevalent-domain-with-recent-user-interaction.html

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (232584 => 232585)


--- trunk/LayoutTests/ChangeLog	2018-06-07 16:46:47 UTC (rev 232584)
+++ trunk/LayoutTests/ChangeLog	2018-06-07 17:05:08 UTC (rev 232585)
@@ -1,5 +1,26 @@
 2018-06-07  Brent Fulgham  <[email protected]>
 
+        Remove unused debug mode conditions
+        https://bugs.webkit.org/show_bug.cgi?id=186358
+        <rdar://problem/39117121>
+
+        Reviewed by Zalan Bujtas.
+
+        Rebase test expectations after behavior change.
+
+        * http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context-expected.txt:
+        * http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context.html:
+        * http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout-expected.txt:
+        * http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout.html:
+        * http/tests/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction-expected.txt:
+        * http/tests/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html:
+        * http/tests/resourceLoadStatistics/third-party-cookie-with-and-without-user-interaction-expected.txt:
+        * http/tests/resourceLoadStatistics/third-party-cookie-with-and-without-user-interaction.html:
+        * http/tests/storageAccess/has-storage-access-from-prevalent-domain-with-recent-user-interaction-expected.txt
+        * http/tests/storageAccess/has-storage-access-from-prevalent-domain-with-recent-user-interaction.html
+
+2018-06-07  Brent Fulgham  <[email protected]>
+
         Handle Storage Access API calls in the absence of an attached frame
         https://bugs.webkit.org/show_bug.cgi?id=186373
         <rdar://problem/40028265>

Modified: trunk/LayoutTests/http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context-expected.txt (232584 => 232585)


--- trunk/LayoutTests/http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context-expected.txt	2018-06-07 16:46:47 UTC (rev 232584)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context-expected.txt	2018-06-07 17:05:08 UTC (rev 232585)
@@ -28,7 +28,7 @@
 --------
 Frame: '<!--frame4-->'
 --------
-After user interaction, should receive one non-partitioned, first party cookie.
-Received cookie named 'firstPartyCookie'.
-Did not receive cookie named 'partitionedCookie'.
-Client-side document.cookie: firstPartyCookie=value
+After user interaction, should still only receive one partitioned, third party cookie.
+Did not receive cookie named 'firstPartyCookie'.
+Received cookie named 'partitionedCookie'.
+Client-side document.cookie: partitionedCookie=value

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


--- trunk/LayoutTests/http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context.html	2018-06-07 16:46:47 UTC (rev 232584)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context.html	2018-06-07 17:05:08 UTC (rev 232585)
@@ -76,7 +76,7 @@
                 break;
             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);
+                openIframe(thirdPartyBaseUrl + subPathToGetCookies + "&message=After user interaction, should still only receive one partitioned, third party cookie.", finishTest);
                 break;
         }
     }

Modified: trunk/LayoutTests/http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout-expected.txt (232584 => 232585)


--- trunk/LayoutTests/http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout-expected.txt	2018-06-07 16:46:47 UTC (rev 232584)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout-expected.txt	2018-06-07 17:05:08 UTC (rev 232585)
@@ -28,10 +28,10 @@
 --------
 Frame: '<!--frame4-->'
 --------
-After first user interaction, should only receive un-partitioned cookie.
-Received cookie named 'firstPartyCookie'.
-Did not receive cookie named 'thirdPartyCookie'.
-Client-side document.cookie: firstPartyCookie=value
+After first user interaction, should still only receive a partitioned, third-party cookie.
+Did not receive cookie named 'firstPartyCookie'.
+Received cookie named 'thirdPartyCookie'.
+Client-side document.cookie: thirdPartyCookie=value
 
 --------
 Frame: '<!--frame5-->'
@@ -44,7 +44,7 @@
 --------
 Frame: '<!--frame6-->'
 --------
-After second user interaction, should only receive un-partitioned cookie.
-Received cookie named 'firstPartyCookie'.
-Did not receive cookie named 'thirdPartyCookie'.
-Client-side document.cookie: firstPartyCookie=value
+After second user interaction, should still only receive a partitioned, third-party cookie.
+Did not receive cookie named 'firstPartyCookie'.
+Received cookie named 'thirdPartyCookie'.
+Client-side document.cookie: thirdPartyCookie=value

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


--- trunk/LayoutTests/http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout.html	2018-06-07 16:46:47 UTC (rev 232584)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout.html	2018-06-07 17:05:08 UTC (rev 232585)
@@ -83,7 +83,7 @@
             case "#step5":
                 // http://localhost:8000 now has user interaction, check that un-partitioned cookie is sent for third-party
                 document.location.hash = "step6";
-                openIframe(thirdPartyBaseUrl + subPathToGetCookies + "&message=After first user interaction, should only receive un-partitioned cookie.",
+                openIframe(thirdPartyBaseUrl + subPathToGetCookies + "&message=After first user interaction, should still only receive a partitioned, third-party cookie.",
                     setShortCookiePartitioningTimeOutPlusFireShouldPartitionCookiesHandlerAndContinue);
                 break;
             case "#step6":
@@ -94,7 +94,7 @@
                 break;
             case "#step7":
                 // http://localhost:8000 now has fresh user interaction, check that un-partitioned cookie is sent for third-party
-                openIframe(thirdPartyBaseUrl + subPathToGetCookies + "&message=After second user interaction, should only receive un-partitioned cookie.",
+                openIframe(thirdPartyBaseUrl + subPathToGetCookies + "&message=After second user interaction, should still only receive a partitioned, third-party cookie.",
                     finishTest);
                 break;
         }

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


--- trunk/LayoutTests/http/tests/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction-expected.txt	2018-06-07 16:46:47 UTC (rev 232584)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction-expected.txt	2018-06-07 17:05:08 UTC (rev 232585)
@@ -28,7 +28,7 @@
 --------
 Frame: '<!--frame4-->'
 --------
-After user interaction, should only receive non-partitioned, first party cookie.
-Received cookie named 'firstPartyCookie'.
-Did not receive cookie named 'thirdPartyCookie'.
-Client-side document.cookie: firstPartyCookie=value
+After user interaction, should still only receive a partitioned, third-party cookie.
+Did not receive cookie named 'firstPartyCookie'.
+Received cookie named 'thirdPartyCookie'.
+Client-side document.cookie: thirdPartyCookie=value

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


--- trunk/LayoutTests/http/tests/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html	2018-06-07 16:46:47 UTC (rev 232584)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html	2018-06-07 17:05:08 UTC (rev 232585)
@@ -65,7 +65,7 @@
                 openIframe(thirdPartyBaseUrl + subPathToGetCookies + "&message=Should only receive partitioned, third party cookie.", setUserInteractionAndContinue);
                 break;
             case "#step5":
-                openIframe(thirdPartyBaseUrl + subPathToGetCookies + "&message=After user interaction, should only receive non-partitioned, first party cookie.", finishTest);
+                openIframe(thirdPartyBaseUrl + subPathToGetCookies + "&message=After user interaction, should still only receive a partitioned, third-party cookie.", finishTest);
                 break;
         }
     }

Modified: trunk/LayoutTests/http/tests/resourceLoadStatistics/third-party-cookie-with-and-without-user-interaction-expected.txt (232584 => 232585)


--- trunk/LayoutTests/http/tests/resourceLoadStatistics/third-party-cookie-with-and-without-user-interaction-expected.txt	2018-06-07 16:46:47 UTC (rev 232584)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/third-party-cookie-with-and-without-user-interaction-expected.txt	2018-06-07 17:05:08 UTC (rev 232585)
@@ -36,8 +36,8 @@
 --------
 Frame: '<!--frame5-->'
 --------
-After user interaction, should receive non-partitioned cookies set in a first-party context and in a third-party context.
-Received cookie named 'firstPartyCookie'.
-Received cookie named 'thirdPartyCookie'.
-Did not receive cookie named 'partitionedThirdPartyCookie'.
-Client-side document.cookie: firstPartyCookie=value,thirdPartyCookie=value
+After user interaction, should should still only receive a partitioned, third-party cookie.
+Did not receive cookie named 'firstPartyCookie'.
+Did not receive cookie named 'thirdPartyCookie'.
+Received cookie named 'partitionedThirdPartyCookie'.
+Client-side document.cookie: partitionedThirdPartyCookie=value

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


--- trunk/LayoutTests/http/tests/resourceLoadStatistics/third-party-cookie-with-and-without-user-interaction.html	2018-06-07 16:46:47 UTC (rev 232584)
+++ trunk/LayoutTests/http/tests/resourceLoadStatistics/third-party-cookie-with-and-without-user-interaction.html	2018-06-07 17:05:08 UTC (rev 232585)
@@ -81,7 +81,7 @@
                 openIframe(thirdPartyBaseUrl + subPathToGetCookies + "&message=Should only receive partitioned, third party cookie.", setUserInteractionAndContinue);
                 break;
             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);
+                openIframe(thirdPartyBaseUrl + subPathToGetCookies + "&message=After user interaction, should should still only receive a partitioned, third-party cookie.", finishTest);
                 break;
         }
     }

Modified: trunk/LayoutTests/http/tests/storageAccess/has-storage-access-from-prevalent-domain-with-recent-user-interaction-expected.txt (232584 => 232585)


--- trunk/LayoutTests/http/tests/storageAccess/has-storage-access-from-prevalent-domain-with-recent-user-interaction-expected.txt	2018-06-07 16:46:47 UTC (rev 232584)
+++ trunk/LayoutTests/http/tests/storageAccess/has-storage-access-from-prevalent-domain-with-recent-user-interaction-expected.txt	2018-06-07 17:05:08 UTC (rev 232585)
@@ -3,7 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS Has storage access. document.cookie == , cookies seen server-side == "No cookies"
+PASS No storage access. document.cookie == , cookies seen server-side == "No cookies"
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/http/tests/storageAccess/has-storage-access-from-prevalent-domain-with-recent-user-interaction.html (232584 => 232585)


--- trunk/LayoutTests/http/tests/storageAccess/has-storage-access-from-prevalent-domain-with-recent-user-interaction.html	2018-06-07 16:46:47 UTC (rev 232584)
+++ trunk/LayoutTests/http/tests/storageAccess/has-storage-access-from-prevalent-domain-with-recent-user-interaction.html	2018-06-07 17:05:08 UTC (rev 232585)
@@ -31,6 +31,6 @@
     </script>
 </head>
 <body>
-<iframe sandbox="allow-storage-access-by-user-activation allow-scripts allow-same-origin allow-modals" id="theIframe" src=""
+<iframe sandbox="allow-storage-access-by-user-activation allow-scripts allow-same-origin allow-modals" id="theIframe" src=""
 </body>
 </html>
\ No newline at end of file

Modified: trunk/Source/WebKit/ChangeLog (232584 => 232585)


--- trunk/Source/WebKit/ChangeLog	2018-06-07 16:46:47 UTC (rev 232584)
+++ trunk/Source/WebKit/ChangeLog	2018-06-07 17:05:08 UTC (rev 232585)
@@ -1,3 +1,17 @@
+2018-06-07  Brent Fulgham  <[email protected]>
+
+        Remove unused debug mode conditions
+        https://bugs.webkit.org/show_bug.cgi?id=186358
+        <rdar://problem/39117121>
+
+        Reviewed by Zalan Bujtas.
+
+        Remove some unused code paths related to ResourceLoadStatistics debug mode.
+
+        * UIProcess/WebResourceLoadStatisticsStore.cpp:
+        (WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
+        (WebKit::WebResourceLoadStatisticsStore::shouldPartitionCookies const):
+
 2018-06-07  Dan Bernstein  <[email protected]>
 
         REGRESSION (r232520): Crash under IPC::ArgumentCoder<WebCore::Credential>::encodePlatformData

Modified: trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp (232584 => 232585)


--- trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp	2018-06-07 16:46:47 UTC (rev 232584)
+++ trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp	2018-06-07 17:05:08 UTC (rev 232585)
@@ -556,12 +556,8 @@
         statistics.hadUserInteraction = true;
         statistics.mostRecentUserInteractionTime = WallTime::now();
 
-        if (m_debugModeEnabled) {
-            if (statistics.isMarkedForCookieBlocking)
-                updateCookiePartitioningForDomains({ primaryDomain }, { }, { }, ShouldClearFirst::No, []() { });
-        } else
-            if (statistics.isMarkedForCookiePartitioning || statistics.isMarkedForCookieBlocking)
-                updateCookiePartitioningForDomains({ }, { }, { primaryDomain }, ShouldClearFirst::No, []() { });
+        if (statistics.isMarkedForCookieBlocking)
+            updateCookiePartitioningForDomains({ primaryDomain }, { }, { }, ShouldClearFirst::No, []() { });
     });
 }
 
@@ -1057,10 +1053,7 @@
 
 bool WebResourceLoadStatisticsStore::shouldPartitionCookies(const ResourceLoadStatistics& statistic) const
 {
-    if (m_debugModeEnabled)
-        return statistic.isPrevalentResource && statistic.hadUserInteraction;
-
-    return statistic.isPrevalentResource && statistic.hadUserInteraction && WallTime::now() > statistic.mostRecentUserInteractionTime + m_parameters.timeToLiveCookiePartitionFree;
+    return statistic.isPrevalentResource && statistic.hadUserInteraction;
 }
 
 bool WebResourceLoadStatisticsStore::shouldBlockCookies(const ResourceLoadStatistics& statistic) const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to