OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <meta charset=utf-8> | 2 <meta charset=utf-8> |
3 <title>DOMImplementation.createDocument(namespace, qualifiedName, doctype)</titl
e> | 3 <title>DOMImplementation.createDocument(namespace, qualifiedName, doctype)</titl
e> |
4 <link rel=help href="https://dom.spec.whatwg.org/#dom-domimplementation-createdo
cument"> | 4 <link rel=help href="https://dom.spec.whatwg.org/#dom-domimplementation-createdo
cument"> |
5 <link rel=help href="https://dom.spec.whatwg.org/#dom-document-createelementns"> | 5 <link rel=help href="https://dom.spec.whatwg.org/#dom-document-createelementns"> |
6 <link rel=help href="https://dom.spec.whatwg.org/#dom-node-nodetype"> | 6 <link rel=help href="https://dom.spec.whatwg.org/#dom-node-nodetype"> |
7 <link rel=help href="https://dom.spec.whatwg.org/#dom-document-documentelement"> | 7 <link rel=help href="https://dom.spec.whatwg.org/#dom-document-documentelement"> |
8 <link rel=help href="https://dom.spec.whatwg.org/#dom-document-doctype"> | 8 <link rel=help href="https://dom.spec.whatwg.org/#dom-document-doctype"> |
9 <script src="../../../../resources/testharness.js"></script> | 9 <script src="../../../../resources/testharness.js"></script> |
10 <script src="../../../../resources/testharnessreport.js"></script> | 10 <script src="../../../../resources/testharnessreport.js"></script> |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 test(function() { | 113 test(function() { |
114 var doc = document.implementation.createDocument(namespace, qualifiedNam
e, doctype) | 114 var doc = document.implementation.createDocument(namespace, qualifiedNam
e, doctype) |
115 assert_equals(doc.characterSet, "UTF-8", "characterSet"); | 115 assert_equals(doc.characterSet, "UTF-8", "characterSet"); |
116 assert_equals(doc.charset, "UTF-8", "charset"); | 116 assert_equals(doc.charset, "UTF-8", "charset"); |
117 assert_equals(doc.inputEncoding, "UTF-8", "inputEncoding"); | 117 assert_equals(doc.inputEncoding, "UTF-8", "inputEncoding"); |
118 }, "createDocument test " + i + ": characterSet aliases for " + | 118 }, "createDocument test " + i + ": characterSet aliases for " + |
119 [namespace, qualifiedName, doctype].map(function(el) { return format_value
(el) })) | 119 [namespace, qualifiedName, doctype].map(function(el) { return format_value
(el) })) |
120 } | 120 } |
121 }) | 121 }) |
122 }) | 122 }) |
| 123 |
| 124 test(function() { |
| 125 assert_throws(new TypeError(), function() { |
| 126 document.implementation.createDocument() |
| 127 }, "createDocument() should throw") |
| 128 |
| 129 assert_throws(new TypeError(), function() { |
| 130 document.implementation.createDocument('') |
| 131 }, "createDocument('') should throw") |
| 132 }, "createDocument with missing arguments"); |
123 </script> | 133 </script> |
OLD | NEW |