Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gecko Bug 1936355] Expand web-platform-test coverage to include subdocument fetch credentials #49638

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@

assert_true(await FrameHasStorageAccess(frame), "innermost frame has storage access after refresh.");
assert_true(await HasUnpartitionedCookie(frame), "innermost frame has access to cookies after refresh.");
let cookieOnLoad = await GetHTTPCookiesFromFrame(frame);
assert_true(cookieStringHasCookie("cookie", "unpartitioned", cookieOnLoad), "innermost frame has cookie in initial load");
}, "Same-site-initiated same-origin navigations preserve storage access");

promise_test(async (t) => {
Expand All @@ -59,7 +61,7 @@
assert_false(await FrameHasStorageAccess(frame), "innermost frame has no storage access after refresh.");
assert_false(await HasUnpartitionedCookie(frame), "innermost frame has no access to cookies after refresh.");
let cookieOnLoad = await GetHTTPCookiesFromFrame(frame);
assert_false(cookieStringHasCookie("cookie", "unpartitioned", cookieOnLoad), "innermost frame has cookie in initial load");
assert_false(cookieStringHasCookie("cookie", "unpartitioned", cookieOnLoad), "innermost frame has no cookie in initial load");
}, "Same-site-initiated cross-origin navigations do not preserve storage access");

})();
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@

assert_true(await FrameHasStorageAccess(frame), "frame has storage access after refresh.");
assert_true(await HasUnpartitionedCookie(frame), "frame has access to cookies after refresh.");

let cookieOnLoad = await GetHTTPCookiesFromFrame(frame);
assert_true(cookieStringHasCookie("cookie", "unpartitioned", cookieOnLoad), "innermost frame has cookie in initial load");
}, "Self-initiated reloads preserve storage access");

promise_test(async (t) => {
Expand All @@ -56,6 +59,8 @@

assert_true(await FrameHasStorageAccess(frame), "frame has storage access after refresh.");
assert_true(await HasUnpartitionedCookie(frame), "frame has access to cookies after refresh.");
let cookieOnLoad = await GetHTTPCookiesFromFrame(frame);
assert_true(cookieStringHasCookie("cookie", "unpartitioned", cookieOnLoad), "innermost frame has cookie in initial load");
}, "Self-initiated same-origin navigations preserve storage access");

promise_test(async (t) => {
Expand All @@ -71,6 +76,8 @@

assert_false(await FrameHasStorageAccess(frame), "frame does not have storage access after refresh.");
assert_false(await HasUnpartitionedCookie(frame), "frame has access to cookies after refresh.");
let cookieOnLoad = await GetHTTPCookiesFromFrame(frame);
assert_false(cookieStringHasCookie("cookie", "unpartitioned", cookieOnLoad), "innermost frame has no cookie in initial load");
}, "Non-self-initiated same-origin navigations do not preserve storage access");

promise_test(async (t) => {
Expand All @@ -83,5 +90,7 @@

assert_false(await FrameHasStorageAccess(frame), "frame does not have storage access after refresh.");
assert_false(await HasUnpartitionedCookie(frame), "frame has access to cookies after refresh.");
let cookieOnLoad = await GetHTTPCookiesFromFrame(frame);
assert_false(cookieStringHasCookie("cookie", "unpartitioned", cookieOnLoad), "innermost frame has no cookie in initial load");
}, "Self-initiated cross-origin navigations do not preserve storage access");
})();