diff --git a/testing/web-platform/tests/storage-access-api/requestStorageAccess-cross-origin-iframe-navigation-relax.sub.https.window.js b/testing/web-platform/tests/storage-access-api/requestStorageAccess-cross-origin-iframe-navigation-relax.sub.https.window.js index 7ccb9824e699a..1cede45d59d8e 100644 --- a/testing/web-platform/tests/storage-access-api/requestStorageAccess-cross-origin-iframe-navigation-relax.sub.https.window.js +++ b/testing/web-platform/tests/storage-access-api/requestStorageAccess-cross-origin-iframe-navigation-relax.sub.https.window.js @@ -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) => { @@ -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"); })(); diff --git a/testing/web-platform/tests/storage-access-api/requestStorageAccess-cross-origin-iframe-navigation.sub.https.window.js b/testing/web-platform/tests/storage-access-api/requestStorageAccess-cross-origin-iframe-navigation.sub.https.window.js index 691c8c86b6200..ce0d69cfaa54c 100644 --- a/testing/web-platform/tests/storage-access-api/requestStorageAccess-cross-origin-iframe-navigation.sub.https.window.js +++ b/testing/web-platform/tests/storage-access-api/requestStorageAccess-cross-origin-iframe-navigation.sub.https.window.js @@ -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) => { @@ -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) => { @@ -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) => { @@ -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"); })();