WebKit Bugzilla
Attachment 372133 Details for
Bug 198863
: Move http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html off of testRunner.setAlwaysAcceptCookies()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-198863-20190614122849.patch (text/plain), 7.78 KB, created by
John Wilander
on 2019-06-14 12:28:50 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
John Wilander
Created:
2019-06-14 12:28:50 PDT
Size:
7.78 KB
patch
obsolete
>Subversion Revision: 246438 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 2a772e8cc25266cfdbd0789078719476ce369f1c..077bf6c907222f4561ad2b9f775c3bd40ef0c3a2 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,19 @@ >+2019-06-14 John Wilander <wilander@apple.com> >+ >+ Move http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html off of testRunner.setAlwaysAcceptCookies() >+ https://bugs.webkit.org/show_bug.cgi?id=198863 >+ <rdar://problem/47854589> >+ >+ Unreviewed test gardening. >+ >+ testRunner.setAlwaysAcceptCookies() is not working right (tracked >+ in rdar://problem/51757107). Therefore, we need to change >+ http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html >+ to make it work properly. >+ >+ * http/tests/resourceLoadStatistics/remove-blocking-in-redirect-expected.txt: >+ * http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html: >+ > 2019-06-14 Saam Barati <sbarati@apple.com> > > [WHLSL] Implement out-of-bounds and nullptr behavior >diff --git a/LayoutTests/http/tests/resourceLoadStatistics/remove-blocking-in-redirect-expected.txt b/LayoutTests/http/tests/resourceLoadStatistics/remove-blocking-in-redirect-expected.txt >index fea82320c2afc0318bdf278d47dc0a603ec7e5a8..400a49e4460fcdd214857b3f09d5cd5225af2947 100644 >--- a/LayoutTests/http/tests/resourceLoadStatistics/remove-blocking-in-redirect-expected.txt >+++ b/LayoutTests/http/tests/resourceLoadStatistics/remove-blocking-in-redirect-expected.txt >@@ -11,43 +11,41 @@ TEST COMPLETE > -------- > Frame: '<!--frame1-->' > -------- >-Set cookie. >- >+Should receive first-party cookie for localhost. >+Did not receive cookie named 'firstPartyCookieIP'. >+Received cookie named 'firstPartyCookieLocalhost'. >+Did not receive cookie named 'thirdPartyCookie'. >+Client-side document.cookie: firstPartyCookieLocalhost=localhost > > -------- > Frame: '<!--frame2-->' > -------- >-Should receive first-party cookie. >-Received cookie named 'firstPartyCookie'. >-Did not receive cookie named 'partitionedCookie'. >-Client-side document.cookie: firstPartyCookie=value >- >--------- >-Frame: '<!--frame3-->' >--------- > Redirect case 1, should receive first-party cookie for 127.0.0.1. >-Received cookie named 'firstPartyCookie'. >-Did not receive cookie named 'partitionedCookie'. >-Client-side document.cookie: firstPartyCookie=127.0.0.1 >+Received cookie named 'firstPartyCookieIP'. >+Did not receive cookie named 'firstPartyCookieLocalhost'. >+Did not receive cookie named 'thirdPartyCookie'. >+Client-side document.cookie: firstPartyCookieIP=127.0.0.1 > > -------- >-Frame: '<!--frame4-->' >+Frame: '<!--frame3-->' > -------- >-Try to set third-party cookie in blocked mode. >+Try to set third-party cookie for localhost in blocked mode. > > > -------- >-Frame: '<!--frame5-->' >+Frame: '<!--frame4-->' > -------- > Should receive no cookie. >-Did not receive cookie named 'firstPartyCookie'. >-Did not receive cookie named 'partitionedCookie'. >+Did not receive cookie named 'firstPartyCookieIP'. >+Did not receive cookie named 'firstPartyCookieLocalhost'. >+Did not receive cookie named 'thirdPartyCookie'. > Client-side document.cookie: > > -------- >-Frame: '<!--frame6-->' >+Frame: '<!--frame5-->' > -------- > Redirect case 2, should receive first-party cookie for 127.0.0.1. >-Received cookie named 'firstPartyCookie'. >-Did not receive cookie named 'partitionedCookie'. >-Client-side document.cookie: firstPartyCookie=127.0.0.1 >+Received cookie named 'firstPartyCookieIP'. >+Did not receive cookie named 'firstPartyCookieLocalhost'. >+Did not receive cookie named 'thirdPartyCookie'. >+Client-side document.cookie: firstPartyCookieIP=127.0.0.1 >diff --git a/LayoutTests/http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html b/LayoutTests/http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html >index f103b7b6bbbf17c40ef28817644273c81a149d15..e00ca36f8ed62f825ea9c5db019c1d403aab5089 100644 >--- a/LayoutTests/http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html >+++ b/LayoutTests/http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html >@@ -14,11 +14,12 @@ > const thirdPartyOrigin = "http://localhost:8000"; > const resourcePath = "/resourceLoadStatistics/resources"; > const thirdPartyBaseUrl = thirdPartyOrigin + resourcePath; >- const firstPartyCookieName = "firstPartyCookie"; >- const subPathToSetFirstPartyCookie = "/set-cookie.php?name=" + firstPartyCookieName + "&value=value"; >- const partitionedCookieName = "partitionedCookie"; >- const subPathToSetPartitionedCookie = "/set-cookie.php?name=" + partitionedCookieName + "&value=value"; >- const subPathToGetCookies = "/get-cookies.php?name1=" + firstPartyCookieName + "&name2=" + partitionedCookieName; >+ const firstPartyCookieNamePrefix = "firstPartyCookie"; >+ const firstPartyCookieNameIP = firstPartyCookieNamePrefix + "IP"; >+ const firstPartyCookieNameLocalhost = firstPartyCookieNamePrefix + "Localhost"; >+ const thirdPartyCookieName = "thirdPartyCookie"; >+ const subPathToSetThirdPartyCookie = "/set-cookie.php?name=" + thirdPartyCookieName + "&value=value"; >+ const subPathToGetCookies = "/get-cookies.php?name1=" + firstPartyCookieNameIP + "&name2=" + firstPartyCookieNameLocalhost + "&name3=" + thirdPartyCookieName; > const redirectChainUrl = thirdPartyOrigin + resourcePath + "/redirect.php?redirectTo=http://" + partitionHost + resourcePath + subPathToGetCookies; > > function openIframe(url, onLoadHandler) { >@@ -34,18 +35,18 @@ > 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='/'"; >- if (window.testRunner) >- testRunner.setAlwaysAcceptCookies(true); >- openIframe(thirdPartyBaseUrl + subPathToSetFirstPartyCookie + "&message=Set cookie.", runTest); >+ if (document.location.origin === thirdPartyOrigin) { >+ document.cookie = firstPartyCookieNameLocalhost + "=localhost;path='/'"; >+ document.location.href = "http://127.0.0.1:8000/resourceLoadStatistics/remove-blocking-in-redirect.html#step2"; >+ } else { >+ document.cookie = firstPartyCookieNameIP + "=127.0.0.1;path='/'"; >+ document.location.href = "http://localhost:8000/resourceLoadStatistics/remove-blocking-in-redirect.html#step1"; >+ } > 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); >+ openIframe(thirdPartyBaseUrl + subPathToGetCookies + "&message=Should receive first-party cookie for localhost.", runTest); > break; > case "#step3": > document.location.hash = "step4"; >@@ -64,7 +65,7 @@ > case "#step5": > // Try to set partitioned cookie for localhost under 127.0.0.1. > document.location.hash = "step6"; >- openIframe(thirdPartyBaseUrl + subPathToSetPartitionedCookie + "&message=Try to set third-party cookie in blocked mode.", runTest); >+ openIframe(thirdPartyBaseUrl + subPathToSetThirdPartyCookie + "&message=Try to set third-party cookie for localhost in blocked mode.", runTest); > break; > case "#step6": > // Check that no cookie gets sent for localhost under 127.0.0.1 since localhost's cookies are blocked.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198863
: 372133