WebKit Bugzilla
Attachment 345860 Details for
Bug 188073
: Same-Site cookies are not sent with same-origin redirect initiated from cross-origin navigation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Layout tests
bug-188073-20180726130650.patch (text/plain), 8.47 KB, created by
Daniel Bates
on 2018-07-26 13:06:51 PDT
(
hide
)
Description:
Layout tests
Filename:
MIME Type:
Creator:
Daniel Bates
Created:
2018-07-26 13:06:51 PDT
Size:
8.47 KB
patch
obsolete
>Subversion Revision: 234197 >diff --git a/LayoutTests/http/tests/cookies/same-site/fetch-after-top-level-cross-origin-to-same-origin-to-same-origin-redirect-expected.txt b/LayoutTests/http/tests/cookies/same-site/fetch-after-top-level-cross-origin-to-same-origin-to-same-origin-redirect-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..e84daaed82fa89ee8b50423f3cb968291389ac58 >--- /dev/null >+++ b/LayoutTests/http/tests/cookies/same-site/fetch-after-top-level-cross-origin-to-same-origin-to-same-origin-redirect-expected.txt >@@ -0,0 +1,20 @@ >+Tests that SameSite cookies for 127.0.0.1 are sent with a redirect from a page with the same origin. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+Cookies sent with HTTP request: >+PASS Has cookie "strict" with value 20. >+PASS Has cookie "implicit-strict" with value 20. >+PASS Has cookie "strict-because-invalid-SameSite-value" with value 20. >+PASS Has cookie "lax" with value 20. >+ >+Cookies visible in DOM: >+PASS Has DOM cookie "strict" with value 20. >+PASS Has DOM cookie "implicit-strict" with value 20. >+PASS Has DOM cookie "strict-because-invalid-SameSite-value" with value 20. >+PASS Has DOM cookie "lax" with value 20. >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/http/tests/cookies/same-site/fetch-after-top-level-cross-origin-to-same-origin-to-same-origin-redirect.html b/LayoutTests/http/tests/cookies/same-site/fetch-after-top-level-cross-origin-to-same-origin-to-same-origin-redirect.html >new file mode 100644 >index 0000000000000000000000000000000000000000..e6cf8847c62bf7808808060e663e5885643f3ed4 >--- /dev/null >+++ b/LayoutTests/http/tests/cookies/same-site/fetch-after-top-level-cross-origin-to-same-origin-to-same-origin-redirect.html >@@ -0,0 +1,19 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../resources/cookie-utilities.js"></script> >+<body> >+<script> >+async function runTest() >+{ >+ await resetCookies(); >+ await setCookie("strict", "20", {"SameSite": "Strict", "Max-Age": 100, "path": "/"}); >+ await setCookie("implicit-strict", "20", {"SameSite": null, "Max-Age": 100, "path": "/"}); >+ await setCookie("strict-because-invalid-SameSite-value", "20", {"SameSite": "invalid", "Max-Age": 100, "path": "/"}); >+ await setCookie("lax", "20", {"SameSite": "Lax", "Max-Age": 100, "path": "/"}); >+ window.location.href = "http://localhost:8000/resources/redirect.php?url=http%3A//127.0.0.1%3A8000/resources/redirect.php%3Furl%3Dhttp%3A//127.0.0.1%3A8000/cookies/same-site/resources/fetch-after-top-level-same-origin-redirect.php"; >+} >+runTest(); >+</script> >+</body> >+</html> >diff --git a/LayoutTests/http/tests/cookies/same-site/fetch-after-top-level-same-origin-redirect-expected.txt b/LayoutTests/http/tests/cookies/same-site/fetch-after-top-level-same-origin-redirect-expected.txt >index a6751306d3a9a2f3420f05a1e5f5fd39e2d115ea..e84daaed82fa89ee8b50423f3cb968291389ac58 100644 >--- a/LayoutTests/http/tests/cookies/same-site/fetch-after-top-level-same-origin-redirect-expected.txt >+++ b/LayoutTests/http/tests/cookies/same-site/fetch-after-top-level-same-origin-redirect-expected.txt >@@ -1,4 +1,4 @@ >-Tests that a SameSite Lax cookie for 127.0.0.1 is sent with a redirect from a page with the same origin. >+Tests that SameSite cookies for 127.0.0.1 are sent with a redirect from a page with the same origin. > > On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". > >diff --git a/LayoutTests/http/tests/cookies/same-site/fetch-in-frame-after-cross-origin-to-same-origin-to-same-origin-redirect-expected.txt b/LayoutTests/http/tests/cookies/same-site/fetch-in-frame-after-cross-origin-to-same-origin-to-same-origin-redirect-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..fab07d20012329b244475c3d4df3a388f24f2f54 >--- /dev/null >+++ b/LayoutTests/http/tests/cookies/same-site/fetch-in-frame-after-cross-origin-to-same-origin-to-same-origin-redirect-expected.txt >@@ -0,0 +1,25 @@ >+ >+ >+-------- >+Frame: '<!--frame1-->' >+-------- >+Tests that SameSite cookies for 127.0.0.1 are sent with a redirect from a page with the same origin. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+Cookies sent with HTTP request: >+PASS Has cookie "strict" with value 20. >+PASS Has cookie "implicit-strict" with value 20. >+PASS Has cookie "strict-because-invalid-SameSite-value" with value 20. >+PASS Has cookie "lax" with value 20. >+ >+Cookies visible in DOM: >+PASS Has DOM cookie "strict" with value 20. >+PASS Has DOM cookie "implicit-strict" with value 20. >+PASS Has DOM cookie "strict-because-invalid-SameSite-value" with value 20. >+PASS Has DOM cookie "lax" with value 20. >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/http/tests/cookies/same-site/fetch-in-frame-after-cross-origin-to-same-origin-to-same-origin-redirect.html b/LayoutTests/http/tests/cookies/same-site/fetch-in-frame-after-cross-origin-to-same-origin-to-same-origin-redirect.html >new file mode 100644 >index 0000000000000000000000000000000000000000..ada6e284967a05e9d685438f6f1244ea2d7eb30f >--- /dev/null >+++ b/LayoutTests/http/tests/cookies/same-site/fetch-in-frame-after-cross-origin-to-same-origin-to-same-origin-redirect.html >@@ -0,0 +1,19 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../resources/cookie-utilities.js"></script> >+<body> >+<script> >+async function runTest() >+{ >+ await resetCookies(); >+ await setCookie("strict", "20", {"SameSite": "Strict", "Max-Age": 100, "path": "/"}); >+ await setCookie("implicit-strict", "20", {"SameSite": null, "Max-Age": 100, "path": "/"}); >+ await setCookie("strict-because-invalid-SameSite-value", "20", {"SameSite": "invalid", "Max-Age": 100, "path": "/"}); >+ await setCookie("lax", "20", {"SameSite": "Lax", "Max-Age": 100, "path": "/"}); >+ window.location.href = "http://127.0.0.1:8000/resources/echo-iframe-src.php?src=http%3A//localhost%3A8000/resources/redirect.php%3Furl%3Dhttp%3A//127.0.0.1%3A8000/resources/redirect.php%3Furl%3Dhttp%3A//127.0.0.1%3A8000/cookies/same-site/resources/fetch-after-top-level-same-origin-redirect.php"; >+} >+runTest(); >+</script> >+</body> >+</html> >diff --git a/LayoutTests/http/tests/cookies/same-site/resources/fetch-after-top-level-same-origin-redirect.php b/LayoutTests/http/tests/cookies/same-site/resources/fetch-after-top-level-same-origin-redirect.php >index 640697a3d99f098c89734aaf9cc07a93d046e484..a2b67133ce60c678ec9e306fdfb9dc0f8881a90f 100644 >--- a/LayoutTests/http/tests/cookies/same-site/resources/fetch-after-top-level-same-origin-redirect.php >+++ b/LayoutTests/http/tests/cookies/same-site/resources/fetch-after-top-level-same-origin-redirect.php >@@ -9,7 +9,7 @@ > <script> > window.jsTestIsAsync = true; > >-description("Tests that a SameSite Lax cookie for 127.0.0.1 is sent with a redirect from a page with the same origin."); >+description("Tests that SameSite cookies for 127.0.0.1 are sent with a redirect from a page with the same origin."); > > async function checkResult() > { >diff --git a/LayoutTests/http/tests/cookies/same-site/resources/fetch-in-frame-after-cross-origin-to-same-origin-to-same-origin-redirect.php b/LayoutTests/http/tests/cookies/same-site/resources/fetch-in-frame-after-cross-origin-to-same-origin-to-same-origin-redirect.php >new file mode 100644 >index 0000000000000000000000000000000000000000..fd94b7e0f0b45d353b05a434eeff82d2302174c0 >--- /dev/null >+++ b/LayoutTests/http/tests/cookies/same-site/resources/fetch-in-frame-after-cross-origin-to-same-origin-to-same-origin-redirect.php >@@ -0,0 +1,35 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="/js-test-resources/js-test.js"></script> >+<script src="../../resources/cookie-utilities.js"></script> >+<script>_setCachedCookiesJSON('<?php echo json_encode($_COOKIE); ?>')</script> >+</head> >+<body> >+<script> >+window.jsTestIsAsync = true; >+ >+description("Tests that a SameSite Lax cookie for 127.0.0.1 is sent with a redirect from a page with a different origin."); >+ >+async function checkResult() >+{ >+ debug("Cookies sent with HTTP request:"); >+ await shouldNotHaveCookie("strict"); >+ await shouldNotHaveCookie("implicit-strict"); >+ await shouldNotHaveCookie("strict-because-invalid-SameSite-value"); >+ await shouldHaveCookieWithValue("lax", "19"); >+ >+ debug("<br>Cookies visible in DOM:"); >+ shouldNotHaveDOMCookie("strict"); >+ shouldNotHaveDOMCookie("implicit-strict"); >+ shouldNotHaveDOMCookie("strict-because-invalid-SameSite-value"); >+ shouldHaveDOMCookieWithValue("lax", "19"); >+ >+ await resetCookies(); >+ finishJSTest(); >+} >+ >+checkResult(); >+</script> >+</body> >+</html>
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
Flags:
ews-feeder
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188073
: 345860