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 19 matching lines...) Expand all Loading... |
30 var tests = createElementNS_tests.map(function(t) { | 30 var tests = createElementNS_tests.map(function(t) { |
31 return [t[0], t[1], null, t[2]] | 31 return [t[0], t[1], null, t[2]] |
32 }).concat([ | 32 }).concat([ |
33 /* Arrays with four elements: | 33 /* Arrays with four elements: |
34 * the namespace argument | 34 * the namespace argument |
35 * the qualifiedName argument | 35 * the qualifiedName argument |
36 * the doctype argument | 36 * the doctype argument |
37 * the expected exception, or null if none | 37 * the expected exception, or null if none |
38 */ | 38 */ |
39 [null, null, false, new TypeError()], | 39 [null, null, false, new TypeError()], |
40 [null, null, null, null], | |
41 [null, "", null, null], | 40 [null, "", null, null], |
42 [undefined, null, undefined, null], | 41 [undefined, null, undefined, null], |
43 [undefined, undefined, undefined, null], | 42 [undefined, undefined, undefined, null], |
44 [undefined, "", undefined, null], | 43 [undefined, "", undefined, null], |
45 ["http://example.com/", null, null, null], | 44 ["http://example.com/", null, null, null], |
46 ["http://example.com/", "", null, null], | 45 ["http://example.com/", "", null, null], |
47 ["/", null, null, null], | 46 ["/", null, null, null], |
48 ["/", "", null, null], | 47 ["/", "", null, null], |
49 ["http://www.w3.org/XML/1998/namespace", null, null, null], | 48 ["http://www.w3.org/XML/1998/namespace", null, null, null], |
50 ["http://www.w3.org/XML/1998/namespace", "", null, null], | 49 ["http://www.w3.org/XML/1998/namespace", "", null, null], |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 test(function() { | 156 test(function() { |
158 assert_throws(new TypeError(), function() { | 157 assert_throws(new TypeError(), function() { |
159 document.implementation.createDocument() | 158 document.implementation.createDocument() |
160 }, "createDocument() should throw") | 159 }, "createDocument() should throw") |
161 | 160 |
162 assert_throws(new TypeError(), function() { | 161 assert_throws(new TypeError(), function() { |
163 document.implementation.createDocument('') | 162 document.implementation.createDocument('') |
164 }, "createDocument('') should throw") | 163 }, "createDocument('') should throw") |
165 }, "createDocument with missing arguments"); | 164 }, "createDocument with missing arguments"); |
166 </script> | 165 </script> |
OLD | NEW |