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

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

Issue 18778002: Inherit EventTarget interface instead of duplicating its code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 5 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/dom-constructors-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 <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 'Document', 19 'Document',
20 'DocumentType', 20 'DocumentType',
21 'Element', 21 'Element',
22 'Entity', 22 'Entity',
23 'EventTarget',
23 'HTMLDocument', 24 'HTMLDocument',
24 'Node', 25 'Node',
25 'Notation', 26 'Notation',
26 'ProcessingInstruction', 27 'ProcessingInstruction',
27 'HTMLAllCollection', 28 'HTMLAllCollection',
28 'HTMLAnchorElement', 29 'HTMLAnchorElement',
29 'HTMLAppletElement', 30 'HTMLAppletElement',
30 'HTMLAreaElement', 31 'HTMLAreaElement',
31 'HTMLBaseElement', 32 'HTMLBaseElement',
32 'HTMLBodyElement', 33 'HTMLBodyElement',
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 'XMLSerializer', 141 'XMLSerializer',
141 'XPathEvaluator', 142 'XPathEvaluator',
142 'XSLTProcessor' 143 'XSLTProcessor'
143 ]; 144 ];
144 145
145 // These objects should have no constructor. 146 // These objects should have no constructor.
146 var objects_no_constructor = [ 147 var objects_no_constructor = [
147 'EventTargetNode', 148 'EventTargetNode',
148 'UndetectableHTMLCollection', 149 'UndetectableHTMLCollection',
149 'XPathNSResolver', 150 'XPathNSResolver',
150 'EventTarget',
151 'EventListener', 151 'EventListener',
152 'NPObject' 152 'NPObject'
153 ]; 153 ];
154 154
155 // These objects should have a working constructor, but their constructed 155 // These objects should have a working constructor, but their constructed
156 // object names differ. This is therefore a map from constructor name to 156 // object names differ. This is therefore a map from constructor name to
157 // constructed object. 157 // constructed object.
158 var objects_different_constructor = { 158 var objects_different_constructor = {
159 'Audio': 'HTMLAudioElement', 159 'Audio': 'HTMLAudioElement',
160 'Option': 'HTMLOptionElement', 160 'Option': 'HTMLOptionElement',
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 element.id = "element"; 208 element.id = "element";
209 element.name = obj; 209 element.name = obj;
210 shouldBe("TryAllocate('" + obj + "')", 210 shouldBe("TryAllocate('" + obj + "')",
211 "'[object " + objects_different_constructor[obj] + "]'"); 211 "'[object " + objects_different_constructor[obj] + "]'");
212 element.name = "element_name"; 212 element.name = "element_name";
213 } 213 }
214 </script> 214 </script>
215 <script src="../js/resources/js-test-post.js"></script> 215 <script src="../js/resources/js-test-post.js"></script>
216 </body> 216 </body>
217 </html> 217 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/dom-constructors-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698