Changeset 246440 in webkit
- Timestamp:
- Jun 14, 2019 1:10:23 PM (5 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r246438 r246440 1 2019-06-14 John Wilander <wilander@apple.com> 2 3 Move http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html off of testRunner.setAlwaysAcceptCookies() 4 https://bugs.webkit.org/show_bug.cgi?id=198863 5 <rdar://problem/47854589> 6 7 Unreviewed test gardening. 8 9 testRunner.setAlwaysAcceptCookies() is not working right (tracked 10 in rdar://problem/51757107). Therefore, we need to change 11 http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html 12 to make it work properly. 13 14 * http/tests/resourceLoadStatistics/remove-blocking-in-redirect-expected.txt: 15 * http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html: 16 1 17 2019-06-14 Saam Barati <sbarati@apple.com> 2 18 -
trunk/LayoutTests/http/tests/resourceLoadStatistics/remove-blocking-in-redirect-expected.txt
r239966 r246440 12 12 Frame: '<!--frame1-->' 13 13 -------- 14 Set cookie. 15 14 Should receive first-party cookie for localhost. 15 Did not receive cookie named 'firstPartyCookieIP'. 16 Received cookie named 'firstPartyCookieLocalhost'. 17 Did not receive cookie named 'thirdPartyCookie'. 18 Client-side document.cookie: firstPartyCookieLocalhost=localhost 16 19 17 20 -------- 18 21 Frame: '<!--frame2-->' 19 22 -------- 20 Should receive first-party cookie. 21 Received cookie named 'firstPartyCookie'. 22 Did not receive cookie named 'partitionedCookie'. 23 Client-side document.cookie: firstPartyCookie=value 23 Redirect case 1, should receive first-party cookie for 127.0.0.1. 24 Received cookie named 'firstPartyCookieIP'. 25 Did not receive cookie named 'firstPartyCookieLocalhost'. 26 Did not receive cookie named 'thirdPartyCookie'. 27 Client-side document.cookie: firstPartyCookieIP=127.0.0.1 24 28 25 29 -------- 26 30 Frame: '<!--frame3-->' 27 31 -------- 28 Redirect case 1, should receive first-party cookie for 127.0.0.1. 29 Received cookie named 'firstPartyCookie'. 30 Did not receive cookie named 'partitionedCookie'. 31 Client-side document.cookie: firstPartyCookie=127.0.0.1 32 Try to set third-party cookie for localhost in blocked mode. 33 32 34 33 35 -------- 34 36 Frame: '<!--frame4-->' 35 37 -------- 36 Try to set third-party cookie in blocked mode. 37 38 Should receive no cookie. 39 Did not receive cookie named 'firstPartyCookieIP'. 40 Did not receive cookie named 'firstPartyCookieLocalhost'. 41 Did not receive cookie named 'thirdPartyCookie'. 42 Client-side document.cookie: 38 43 39 44 -------- 40 45 Frame: '<!--frame5-->' 41 46 -------- 42 Should receive no cookie.43 Did not receive cookie named 'firstPartyCookie'.44 Did not receive cookie named 'partitionedCookie'.45 Client-side document.cookie:46 47 --------48 Frame: '<!--frame6-->'49 --------50 47 Redirect case 2, should receive first-party cookie for 127.0.0.1. 51 Received cookie named 'firstPartyCookie'. 52 Did not receive cookie named 'partitionedCookie'. 53 Client-side document.cookie: firstPartyCookie=127.0.0.1 48 Received cookie named 'firstPartyCookieIP'. 49 Did not receive cookie named 'firstPartyCookieLocalhost'. 50 Did not receive cookie named 'thirdPartyCookie'. 51 Client-side document.cookie: firstPartyCookieIP=127.0.0.1 -
trunk/LayoutTests/http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html
r239966 r246440 15 15 const resourcePath = "/resourceLoadStatistics/resources"; 16 16 const thirdPartyBaseUrl = thirdPartyOrigin + resourcePath; 17 const firstPartyCookieName = "firstPartyCookie"; 18 const subPathToSetFirstPartyCookie = "/set-cookie.php?name=" + firstPartyCookieName + "&value=value"; 19 const partitionedCookieName = "partitionedCookie"; 20 const subPathToSetPartitionedCookie = "/set-cookie.php?name=" + partitionedCookieName + "&value=value"; 21 const subPathToGetCookies = "/get-cookies.php?name1=" + firstPartyCookieName + "&name2=" + partitionedCookieName; 17 const firstPartyCookieNamePrefix = "firstPartyCookie"; 18 const firstPartyCookieNameIP = firstPartyCookieNamePrefix + "IP"; 19 const firstPartyCookieNameLocalhost = firstPartyCookieNamePrefix + "Localhost"; 20 const thirdPartyCookieName = "thirdPartyCookie"; 21 const subPathToSetThirdPartyCookie = "/set-cookie.php?name=" + thirdPartyCookieName + "&value=value"; 22 const subPathToGetCookies = "/get-cookies.php?name1=" + firstPartyCookieNameIP + "&name2=" + firstPartyCookieNameLocalhost + "&name3=" + thirdPartyCookieName; 22 23 const redirectChainUrl = thirdPartyOrigin + resourcePath + "/redirect.php?redirectTo=http://" + partitionHost + resourcePath + subPathToGetCookies; 23 24 … … 35 36 case "#step1": 36 37 // Set first-party cookies for 127.0.0.1 and localhost. 37 document.location.hash = "step2"; 38 document.cookie = firstPartyCookieName + "=127.0.0.1;path='/'"; 39 if (window.testRunner) 40 testRunner.setAlwaysAcceptCookies(true); 41 openIframe(thirdPartyBaseUrl + subPathToSetFirstPartyCookie + "&message=Set cookie.", runTest); 38 if (document.location.origin === thirdPartyOrigin) { 39 document.cookie = firstPartyCookieNameLocalhost + "=localhost;path='/'"; 40 document.location.href = "http://127.0.0.1:8000/resourceLoadStatistics/remove-blocking-in-redirect.html#step2"; 41 } else { 42 document.cookie = firstPartyCookieNameIP + "=127.0.0.1;path='/'"; 43 document.location.href = "http://localhost:8000/resourceLoadStatistics/remove-blocking-in-redirect.html#step1"; 44 } 42 45 break; 43 46 case "#step2": 44 47 // Check that the cookie gets sent for localhost under 127.0.0.1 since localhost is not prevalent. 45 48 document.location.hash = "step3"; 46 if (window.testRunner) 47 testRunner.setAlwaysAcceptCookies(false); 48 openIframe(thirdPartyBaseUrl + subPathToGetCookies + "&message=Should receive first-party cookie.", runTest); 49 openIframe(thirdPartyBaseUrl + subPathToGetCookies + "&message=Should receive first-party cookie for localhost.", runTest); 49 50 break; 50 51 case "#step3": … … 65 66 // Try to set partitioned cookie for localhost under 127.0.0.1. 66 67 document.location.hash = "step6"; 67 openIframe(thirdPartyBaseUrl + subPathToSet PartitionedCookie + "&message=Try to set third-party cookiein blocked mode.", runTest);68 openIframe(thirdPartyBaseUrl + subPathToSetThirdPartyCookie + "&message=Try to set third-party cookie for localhost in blocked mode.", runTest); 68 69 break; 69 70 case "#step6":
Note: See TracChangeset
for help on using the changeset viewer.