summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/cookies/samesite/get_named_cookie-default-samesite.html
blob: 2ee5d0f29ceb57f48853929284b9d78d115e115d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!DOCTYPE html>
<meta charset="utf-8">
<title>TestDriver get_named_cookie 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 cookie = await test_driver.get_named_cookie("test0");
  assert_equals(cookie["name"], "test0");
  assert_equals(cookie["value"], "0");
  assert_equals(cookie["sameSite"], "Lax");
}, "Get Named cookie  w/ default SameSite");
</script>