mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1922020, part 11 - Remove reliance on window.opener storage access heuristic in user.js from netwerk/ r=valentin,cookie-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D224816
This commit is contained in:
parent
aa7ff404ee
commit
489ceeb75d
@ -8,6 +8,7 @@ support-files = [
|
|||||||
["test_document_cookie.html"]
|
["test_document_cookie.html"]
|
||||||
|
|
||||||
["test_document_cookie_notification.html"]
|
["test_document_cookie_notification.html"]
|
||||||
|
scheme = "https"
|
||||||
|
|
||||||
["test_fetch.html"]
|
["test_fetch.html"]
|
||||||
|
|
||||||
|
@ -5,7 +5,9 @@ function handleRequest(aRequest, aResponse) {
|
|||||||
|
|
||||||
aResponse.setHeader(
|
aResponse.setHeader(
|
||||||
"Set-Cookie",
|
"Set-Cookie",
|
||||||
`${parts[0]}=foo; path=/; sameSite=none; secure; expires=${new Date(
|
`${
|
||||||
|
parts[0]
|
||||||
|
}=foo; path=/; sameSite=none; secure; partitioned; expires=${new Date(
|
||||||
parseInt(parts[2], 10)
|
parseInt(parts[2], 10)
|
||||||
).toGMTString()}`,
|
).toGMTString()}`,
|
||||||
false
|
false
|
||||||
|
@ -24,7 +24,7 @@ Listener.prototype = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const cl = new Listener();
|
const cl = new Listener();
|
||||||
document.cookie = "a=" + Math.random();
|
document.cookie = "a=" + Math.random() + "; Secure; Partitioned; SameSite=None";
|
||||||
SimpleTest.waitForExplicitFinish();
|
SimpleTest.waitForExplicitFinish();
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -33,6 +33,12 @@ function setupTest(uri, cookies, loads) {
|
|||||||
gExpectedCookies = cookies;
|
gExpectedCookies = cookies;
|
||||||
gExpectedLoads = loads;
|
gExpectedLoads = loads;
|
||||||
|
|
||||||
|
// If this is an xorigin test, the "oh=hai" cookie set by this frame
|
||||||
|
// in runTest() does not work because we are third-party
|
||||||
|
if (isXOrigin) {
|
||||||
|
gExpectedCookies -= 1;
|
||||||
|
}
|
||||||
|
|
||||||
// Listen for MessageEvents.
|
// Listen for MessageEvents.
|
||||||
window.addEventListener("message", messageReceiver);
|
window.addEventListener("message", messageReceiver);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user