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

Side by Side Diff: LayoutTests/fast/dom/custom/document-register-namespace.html

Issue 16818023: DOMException toString is not correct (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../js/resources/js-test-pre.js"></script> 4 <script src="../../js/resources/js-test-pre.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <script> 7 <script>
8 description("Using document.register() for extending HTML and non-HTML elements. "); 8 description("Using document.register() for extending HTML and non-HTML elements. ");
9 9
10 function createElementFromHTML(html) 10 function createElementFromHTML(html)
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 var notSVG2 = createElementFromHTML("<svg-foo></svg-foo>"); 57 var notSVG2 = createElementFromHTML("<svg-foo></svg-foo>");
58 shouldBe("notSVG2.namespaceURI", "'http://www.w3.org/1999/xhtml'"); 58 shouldBe("notSVG2.namespaceURI", "'http://www.w3.org/1999/xhtml'");
59 shouldBeFalse("notSVG2 instanceof CustomSVGElement"); 59 shouldBeFalse("notSVG2 instanceof CustomSVGElement");
60 shouldBeFalse("notSVG2 instanceof HTMLUnknownElement"); 60 shouldBeFalse("notSVG2 instanceof HTMLUnknownElement");
61 shouldBeTrue("notSVG2 instanceof HTMLElement"); 61 shouldBeTrue("notSVG2 instanceof HTMLElement");
62 shouldBe("Object.getPrototypeOf(notSVG2)", "HTMLElement.prototype"); 62 shouldBe("Object.getPrototypeOf(notSVG2)", "HTMLElement.prototype");
63 63
64 // Trying to extend something outside HTML or SVG should throw a NAMESPACE_ERR 64 // Trying to extend something outside HTML or SVG should throw a NAMESPACE_ERR
65 shouldThrow( 65 shouldThrow(
66 "document.register('xml-foo', { prototype: Object.create(Element.prototype) })", 66 "document.register('xml-foo', { prototype: Object.create(Element.prototype) })",
67 "'Error: NamespaceError: DOM Exception 14'"); 67 "'NamespaceError: An attempt was made to create or change an object in a way which is incorrect with regard to namespaces.'");
68 68
69 </script> 69 </script>
70 <script src="../../js/resources/js-test-post.js"></script> 70 <script src="../../js/resources/js-test-post.js"></script>
71 </body> 71 </body>
72 </html> 72 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698