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
c80b1bb445
commit
b7f7978a3f
@ -8,6 +8,7 @@ support-files = [
|
||||
["test_document_cookie.html"]
|
||||
|
||||
["test_document_cookie_notification.html"]
|
||||
scheme = "https"
|
||||
|
||||
["test_fetch.html"]
|
||||
|
||||
|
@ -5,7 +5,9 @@ function handleRequest(aRequest, aResponse) {
|
||||
|
||||
aResponse.setHeader(
|
||||
"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)
|
||||
).toGMTString()}`,
|
||||
false
|
||||
|
@ -24,7 +24,7 @@ Listener.prototype = {
|
||||
}
|
||||
|
||||
const cl = new Listener();
|
||||
document.cookie = "a=" + Math.random();
|
||||
document.cookie = "a=" + Math.random() + "; Secure; Partitioned; SameSite=None";
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
</script>
|
||||
|
@ -33,6 +33,12 @@ function setupTest(uri, cookies, loads) {
|
||||
gExpectedCookies = cookies;
|
||||
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.
|
||||
window.addEventListener("message", messageReceiver);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user