diff options
Diffstat (limited to 'testing/web-platform/tests/html/dom/documents/dom-tree-accessors/document.title-not-in-html-svg.html')
-rw-r--r-- | testing/web-platform/tests/html/dom/documents/dom-tree-accessors/document.title-not-in-html-svg.html | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/dom/documents/dom-tree-accessors/document.title-not-in-html-svg.html b/testing/web-platform/tests/html/dom/documents/dom-tree-accessors/document.title-not-in-html-svg.html new file mode 100644 index 0000000000..40eccd3de3 --- /dev/null +++ b/testing/web-platform/tests/html/dom/documents/dom-tree-accessors/document.title-not-in-html-svg.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<link rel="author" title="Rob Buis" href="mailto:rbuis@igalia.com"> +<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> + +function newXMLDocument() { + return document.implementation.createDocument(null, "foo", null); +} + +test(function() { + var doc = newXMLDocument(); + assert_equals(doc.title, ""); + doc.title = "fail"; + assert_equals(doc.title, ""); +}, "Should not be able to set document title in XML document"); + +test(function() { + var doc = newXMLDocument(); + doc.documentElement.appendChild(document.createElementNS("http://www.w3.org/1999/xhtml", "html:title")); + assert_equals(doc.title, ""); + doc.title = "fail"; + assert_equals(doc.title, ""); +}, "Should not be able to set document title in XML document with html:title element"); +</script> |