diff options
Diffstat (limited to 'testing/web-platform/tests/html/dom/documents/dom-tree-accessors/document.title-08.html')
-rw-r--r-- | testing/web-platform/tests/html/dom/documents/dom-tree-accessors/document.title-08.html | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/dom/documents/dom-tree-accessors/document.title-08.html b/testing/web-platform/tests/html/dom/documents/dom-tree-accessors/document.title-08.html new file mode 100644 index 000000000..a643b75f4 --- /dev/null +++ b/testing/web-platform/tests/html/dom/documents/dom-tree-accessors/document.title-08.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<link rel="author" title="Denis Ah-Kang" href="mailto:denis@w3.org"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/#document.title"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<div id="log"></div> +<script> +test(function() { + assert_equals(document.title, ""); +}, "No title element"); + +test(function() { + var title = document.createElement("title"); + title.appendChild(document.createTextNode("PASS")); + document.head.appendChild(title); + assert_equals(document.title, "PASS"); + + title.appendChild(document.createTextNode("PASS2")); + title.appendChild(document.createTextNode("PASS3")); + assert_equals(document.title, "PASSPASS2PASS3"); +}, "title element contains multiple child text nodes"); +</script> |