Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /cookies/samesite/get_all_cookies-default-samesite.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<title>TestDriver get_all_cookies method w/ default SameSite</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script>
promise_test(async t => {
await test_driver.delete_all_cookies();
t.add_cleanup(test_driver.delete_all_cookies);
document.cookie = "test0=0";
const cookies = await test_driver.get_all_cookies();
assert_equals(cookies.length, 1);
const cookie = cookies[0];
assert_equals(cookie["name"], "test0");
assert_equals(cookie["value"], "0");
assert_equals(cookie["sameSite"], "Lax");
}, "Get all cookies w/ default SameSite");
</script>