summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/syntax/parsing/no-doctype-name.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/syntax/parsing/no-doctype-name.html')
-rw-r--r--testing/web-platform/tests/html/syntax/parsing/no-doctype-name.html22
1 files changed, 22 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/syntax/parsing/no-doctype-name.html b/testing/web-platform/tests/html/syntax/parsing/no-doctype-name.html
new file mode 100644
index 0000000000..cfd57e41d9
--- /dev/null
+++ b/testing/web-platform/tests/html/syntax/parsing/no-doctype-name.html
@@ -0,0 +1,22 @@
+<!doctype>
+<meta charset=utf-8>
+<title>Doctype without root name should have empty-string name in the DOM even if null in the tokenizer spec.</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+setup({explicit_done:true});
+window.onload = function() {
+ test(function () {
+ assert_equals(document.doctype.name, "", "Top-level");
+ let iframes = document.getElementsByTagName("iframe");
+ for (let i = 0; i < iframes.length; ++i) {
+ let iframe = iframes[i];
+ assert_equals(iframe.contentDocument.doctype.name, "", iframe.title);
+ }
+ }, "Doctype without root name should have the empty string as the name.");
+ done();
+}
+</script>
+<iframe src="support/no-doctype-name-space.html" title='space'></iframe>
+<iframe src="support/no-doctype-name-line.html" title='line'></iframe>
+<iframe src="support/no-doctype-name-eof.html" title='eof'></iframe>