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

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

Issue 14776002: Create wrappers for unresolved Custom Elements at the correct type (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use toV8 in the constructor. Remove unused variable. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/dom/custom/document-register-namespace-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 document.register = document.register || document.webkitRegister; 10 document.register = document.register || document.webkitRegister;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 var svg2 = document.createElementNS("http://www.w3.org/2000/svg", "svg-foo"); 46 var svg2 = document.createElementNS("http://www.w3.org/2000/svg", "svg-foo");
47 shouldBe("svg2.tagName", "'svg-foo'"); 47 shouldBe("svg2.tagName", "'svg-foo'");
48 shouldBe("svg2.namespaceURI", "'http://www.w3.org/2000/svg'"); 48 shouldBe("svg2.namespaceURI", "'http://www.w3.org/2000/svg'");
49 var svg3 = createElementFromSVG("<svg-foo></svg-foo>"); 49 var svg3 = createElementFromSVG("<svg-foo></svg-foo>");
50 shouldBe("svg3.tagName", "'svg-foo'"); 50 shouldBe("svg3.tagName", "'svg-foo'");
51 shouldBe("svg3.namespaceURI", "'http://www.w3.org/2000/svg'"); 51 shouldBe("svg3.namespaceURI", "'http://www.w3.org/2000/svg'");
52 52
53 var notSVG1 = document.createElement("svg-foo"); 53 var notSVG1 = document.createElement("svg-foo");
54 shouldBe("notSVG1.namespaceURI", "'http://www.w3.org/1999/xhtml'"); 54 shouldBe("notSVG1.namespaceURI", "'http://www.w3.org/1999/xhtml'");
55 shouldBeFalse("notSVG1 instanceof CustomSVGElement"); 55 shouldBeFalse("notSVG1 instanceof CustomSVGElement");
56 shouldBeTrue("notSVG1 instanceof HTMLUnknownElement"); 56 shouldBeFalse("notSVG1 instanceof HTMLUnknownElement");
57 shouldBeTrue("notSVG1 instanceof HTMLElement");
58 shouldBe("Object.getPrototypeOf(notSVG1)", "HTMLElement.prototype");
57 var notSVG2 = createElementFromHTML("<svg-foo></svg-foo>"); 59 var notSVG2 = createElementFromHTML("<svg-foo></svg-foo>");
58 shouldBe("notSVG2.namespaceURI", "'http://www.w3.org/1999/xhtml'"); 60 shouldBe("notSVG2.namespaceURI", "'http://www.w3.org/1999/xhtml'");
59 shouldBeFalse("notSVG2 instanceof CustomSVGElement"); 61 shouldBeFalse("notSVG2 instanceof CustomSVGElement");
60 shouldBeTrue("notSVG2 instanceof HTMLUnknownElement"); 62 shouldBeFalse("notSVG2 instanceof HTMLUnknownElement");
63 shouldBeTrue("notSVG2 instanceof HTMLElement");
64 shouldBe("Object.getPrototypeOf(notSVG2)", "HTMLElement.prototype");
61 65
62 // Trying to extend something outside HTML or SVG should throw a NAMESPACE_ERR 66 // Trying to extend something outside HTML or SVG should throw a NAMESPACE_ERR
63 shouldThrow( 67 shouldThrow(
64 "document.register('xml-foo', { prototype: Object.create(Element.prototype) })", 68 "document.register('xml-foo', { prototype: Object.create(Element.prototype) })",
65 "'Error: NamespaceError: DOM Exception 14'"); 69 "'Error: NamespaceError: DOM Exception 14'");
66 70
67 </script> 71 </script>
68 <script src="../../js/resources/js-test-post.js"></script> 72 <script src="../../js/resources/js-test-post.js"></script>
69 </body> 73 </body>
70 </html> 74 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/custom/document-register-namespace-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698