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

Side by Side Diff: LayoutTests/fast/dom/dom-constructors.html

Issue 14931009: Make Comment constructable (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase 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
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../js/resources/js-test-pre.js"></script> 3 <script src="../js/resources/js-test-pre.js"></script>
4 </head> 4 </head>
5 <body> 5 <body>
6 <div id="element" name="element_name"></div> 6 <div id="element" name="element_name"></div>
7 <script> 7 <script>
8 description('This test checks that all but a handful of dom constructors throw e xceptions, and the rest return reasonable objects. It also tests that those cons tructors have higher precedence than a document element with the same ID or name .'); 8 description('This test checks that all but a handful of dom constructors throw e xceptions, and the rest return reasonable objects. It also tests that those cons tructors have higher precedence than a document element with the same ID or name .');
9 9
10 var element = document.getElementById("element"); 10 var element = document.getElementById("element");
11 11
12 // These objects should throw an exception when their constructor is called 12 // These objects should throw an exception when their constructor is called
13 // with no arguments. (Some of them may have working constructors that require 13 // with no arguments. (Some of them may have working constructors that require
14 // arguments to be valid.) 14 // arguments to be valid.)
15 var objects_exception = [ 15 var objects_exception = [
16 'Attr', 16 'Attr',
17 'CharacterData', 17 'CharacterData',
18 'CDATASection', 18 'CDATASection',
19 'Comment',
20 'Document', 19 'Document',
21 'DocumentType', 20 'DocumentType',
22 'Element', 21 'Element',
23 'Entity', 22 'Entity',
24 'EntityReference', 23 'EntityReference',
25 'HTMLDocument', 24 'HTMLDocument',
26 'Node', 25 'Node',
27 'Notation', 26 'Notation',
28 'ProcessingInstruction', 27 'ProcessingInstruction',
29 'Text', 28 'Text',
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 'NodeIterator', 126 'NodeIterator',
128 'RGBColor', 127 'RGBColor',
129 'Screen', 128 'Screen',
130 'TreeWalker', 129 'TreeWalker',
131 'XPathExpression', 130 'XPathExpression',
132 'Worker' 131 'Worker'
133 ]; 132 ];
134 133
135 // These objects should have a working constructor. 134 // These objects should have a working constructor.
136 var objects_constructor = [ 135 var objects_constructor = [
136 'Comment',
137 'DOMParser', 137 'DOMParser',
138 'DocumentFragment', 138 'DocumentFragment',
139 'Range', 139 'Range',
140 'XMLHttpRequest', 140 'XMLHttpRequest',
141 'XMLSerializer', 141 'XMLSerializer',
142 'XPathEvaluator', 142 'XPathEvaluator',
143 'XSLTProcessor' 143 'XSLTProcessor'
144 ]; 144 ];
145 145
146 // These objects should have no constructor. 146 // These objects should have no constructor.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 element.id = "element"; 209 element.id = "element";
210 element.name = obj; 210 element.name = obj;
211 shouldBe("TryAllocate('" + obj + "')", 211 shouldBe("TryAllocate('" + obj + "')",
212 "'[object " + objects_different_constructor[obj] + "]'"); 212 "'[object " + objects_different_constructor[obj] + "]'");
213 element.name = "element_name"; 213 element.name = "element_name";
214 } 214 }
215 </script> 215 </script>
216 <script src="../js/resources/js-test-post.js"></script> 216 <script src="../js/resources/js-test-post.js"></script>
217 </body> 217 </body>
218 </html> 218 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/Comment/comment-constructor-expected.txt ('k') | LayoutTests/fast/dom/dom-constructors-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698