diff options
Diffstat (limited to 'testing/web-platform/tests/html/dom/documents/resource-metadata-management/document-cookie.html')
-rw-r--r-- | testing/web-platform/tests/html/dom/documents/resource-metadata-management/document-cookie.html | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/dom/documents/resource-metadata-management/document-cookie.html b/testing/web-platform/tests/html/dom/documents/resource-metadata-management/document-cookie.html new file mode 100644 index 000000000..802e2d5ad --- /dev/null +++ b/testing/web-platform/tests/html/dom/documents/resource-metadata-management/document-cookie.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>document.cookie</title> +<link rel="author" title="Denis Ah-Kang" href="mailto:denis@w3.org"> +<link rel=help href="https://html.spec.whatwg.org/multipage/#resource-metadata-management"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<div id="log"></div> +<script> +test(function(){ + assert_equals(document.cookie, ""); +}, "document has no cookie"); + +test(function(){ + var doc = document.implementation.createHTMLDocument("doc"); + assert_equals(doc.cookie, ""); + doc.cookie = "test=foobar"; + assert_equals(doc.cookie, ""); +}, "getting cookie for a cookie-averse document returns empty string, setting does nothing"); +</script> |