trisquel-icecat/icecat/testing/web-platform/tests/partitioned-popins/resources/partitioned-popins.cookies-window.html
2025-10-06 02:35:48 -06:00

17 lines
724 B
HTML

<!doctype html>
<meta charset="utf-8">
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script>
(async function() {
test_driver.set_test_context(window.opener);
// Step 3 (partitioned-popins/partitioned-popins.cookies-*.tentative.sub.https.window.js)
const id = (new URLSearchParams(window.location.search)).get("id");
document.cookie = "FirstPartyStrict=" + id + "; SameSite=Strict; Secure";
document.cookie = "FirstPartyLax=" + id + "; SameSite=Lax; Secure";
document.cookie = "FirstPartyNone=" + id + "; SameSite=None; Secure";
window.opener.postMessage({type: "window-set", message: "Set first-party data"}, "*");
window.close();
})();
</script>