Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err.html

Issue 2841393003: createElementNS() should now throw only InvalidCharacterError, not NamespaceError (Closed)
Patch Set: rebased Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <script> 7 <script>
8 description("createDocument tests modelled after createElementNS tests from mozi lla which were attached to webkit bug 16833"); 8 description("createDocument tests modelled after createElementNS tests from mozi lla which were attached to webkit bug 16833");
9 9
10 // document.implementation.createDocument() should throw the same set of errors 10 // document.implementation.createDocument() should throw the same set of errors
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 { args: [null, "0div"], code: 5 }, 59 { args: [null, "0div"], code: 5 },
60 { args: [null, "di v"], code: 5 }, 60 { args: [null, "di v"], code: 5 },
61 { args: [null, "di<v"], code: 5 }, 61 { args: [null, "di<v"], code: 5 },
62 { args: [null, "-div"], code: 5 }, 62 { args: [null, "-div"], code: 5 },
63 { args: [null, ".div"], code: 5 }, 63 { args: [null, ".div"], code: 5 },
64 { args: ["http://example.com/", "<div>"], code: 5 }, 64 { args: ["http://example.com/", "<div>"], code: 5 },
65 { args: ["http://example.com/", "0div"], code: 5 }, 65 { args: ["http://example.com/", "0div"], code: 5 },
66 { args: ["http://example.com/", "di<v"], code: 5 }, 66 { args: ["http://example.com/", "di<v"], code: 5 },
67 { args: ["http://example.com/", "-div"], code: 5 }, 67 { args: ["http://example.com/", "-div"], code: 5 },
68 { args: ["http://example.com/", ".div"], code: 5 }, 68 { args: ["http://example.com/", ".div"], code: 5 },
69 { args: [null, ":div"], code: 14 }, 69 { args: [null, ":div"], code: 5 },
70 { args: [null, "div:"], code: 14 }, 70 { args: [null, "div:"], code: 5 },
71 { args: ["http://example.com/", ":div"], code: 14 }, 71 { args: ["http://example.com/", ":div"], code: 5 },
72 { args: ["http://example.com/", "div:"], code: 14 }, 72 { args: ["http://example.com/", "div:"], code: 5 },
73 { args: [null, "d:iv"], code: 14 }, 73 { args: [null, "d:iv"], code: 14 },
74 { args: [null, "a:b:c"], code: 14, message: "valid XML name, invalid QName" } , 74 { args: [null, "a:b:c"], code: 5, message: "valid XML name, invalid QName" },
75 { args: ["http://example.com/", "a:b:c"], code: 14, message: "valid XML name, invalid QName" }, 75 { args: ["http://example.com/", "a:b:c"], code: 5, message: "valid XML name, invalid QName" },
76 { args: [null, "a::c"], code: 14, message: "valid XML name, invalid QName" }, 76 { args: [null, "a::c"], code: 5, message: "valid XML name, invalid QName" },
77 { args: ["http://example.com/", "a::c"], code: 14, message: "valid XML name, invalid QName" }, 77 { args: ["http://example.com/", "a::c"], code: 5, message: "valid XML name, i nvalid QName" },
78 { args: ["http://example.com/", "a:0"], code: 5, message: "valid XML name, no t a valid QName" }, 78 { args: ["http://example.com/", "a:0"], code: 5, message: "valid XML name, no t a valid QName" },
79 { args: ["http://example.com/", "0:a"], code: 5, message: "0 at start makes i t not a valid XML name" }, 79 { args: ["http://example.com/", "0:a"], code: 5, message: "0 at start makes i t not a valid XML name" },
80 { args: ["http://example.com/", "a:_"] }, 80 { args: ["http://example.com/", "a:_"] },
81 { args: ["http://example.com/", "a:\u0BC6"], code: 14, 81 { args: ["http://example.com/", "a:\u0BC6"], code: 14,
82 message: "non-ASCII character after colon is CombiningChar, which is " + 82 message: "non-ASCII character after colon is CombiningChar, which is " +
83 "NCNameChar but not (Letter | \"_\") so invalid at start of " + 83 "NCNameChar but not (Letter | \"_\") so invalid at start of " +
84 "NCName (but still a valid XML name, hence not INVALID_CHARACTER_E RR)" }, 84 "NCName (but still a valid XML name, hence not INVALID_CHARACTER_E RR)" },
85 { args: ["http://example.com/", "\u0BC6:a"], code: 5, 85 { args: ["http://example.com/", "\u0BC6:a"], code: 5,
86 message: "non-ASCII character after colon is CombiningChar, which is " + 86 message: "non-ASCII character after colon is CombiningChar, which is " +
87 "NCNameChar but not (Letter | \"_\") so invalid at start of " + 87 "NCNameChar but not (Letter | \"_\") so invalid at start of " +
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 144 }
145 } 145 }
146 146
147 shouldThrow("document.implementation.createDocument()", '"TypeError: Failed to e xecute \'createDocument\' on \'DOMImplementation\': 2 arguments required, but on ly 0 present."'); 147 shouldThrow("document.implementation.createDocument()", '"TypeError: Failed to e xecute \'createDocument\' on \'DOMImplementation\': 2 arguments required, but on ly 0 present."');
148 shouldThrow("document.implementation.createDocument(\"http://www.example.com\")" , '"TypeError: Failed to execute \'createDocument\' on \'DOMImplementation\': 2 arguments required, but only 1 present."'); 148 shouldThrow("document.implementation.createDocument(\"http://www.example.com\")" , '"TypeError: Failed to execute \'createDocument\' on \'DOMImplementation\': 2 arguments required, but only 1 present."');
149 149
150 runNSTests(allNSTests, document.implementation, "createDocument"); 150 runNSTests(allNSTests, document.implementation, "createDocument");
151 </script> 151 </script>
152 </body> 152 </body>
153 </html> 153 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698