blob: 737643833c86b8085da4e8cd753da3d1e71b35f1 [file] [log] [blame]
<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/cookies/resources/testharness-helpers.js"></script>
<script>
async_test(t => {
clearKnownCookies();
document.cookie = STRICT_DOM + "=1; SameSite=Strict; Max-Age=100; path=/";
document.cookie = LAX_DOM + "=1; SameSite=Lax; Max-Age=100; path=/";
document.cookie = NORMAL_DOM + "=1; Max-Age=100; path=/";
window.addEventListener("message", t.step_func_done(e => {
assert_equals(e.data.http[STRICT_DOM], "1", "strict");
assert_equals(e.data.http[LAX_DOM], "1", "lax");
assert_equals(e.data.http[NORMAL_DOM], "1", "normal");
assert_equals(e.data.document, STRICT_DOM + "=1; " + LAX_DOM + "=1; " + NORMAL_DOM + "=1");
}));
var i = window.open("http://" + ORIGINAL_HOST + ":8000/cookies/resources/post-cookies-to-opener.php");
}, "'" + ORIGINAL_HOST + "' is same-site with itself, so samesite cookies are sent.");
</script>