1
0
Fork 0
firefox/testing/web-platform/tests/infrastructure/assumptions/cookie.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

18 lines
641 B
HTML

<!doctype html>
<title>cookies work in default browse settings</title>
<link rel="author" title="Intel" href="http://www.intel.com">
<link rel="help" href="https://html.spec.whatwg.org/#dom-document-cookie">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(t => {
t.add_cleanup(() => {
let date = new Date();
date.setTime(date.getTime() - 10000);
document.cookie = "name=''; expires=" + date.toGMTString();
});
document.cookie = "name=test_cookie";
assert_not_equals(document.cookie.match(/name=test_cookie/), null);
});
</script>