OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../resources/js-test.js"></script> | 3 <script src="../../resources/js-test.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"); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 'CSSFontFaceRule', | 81 'CSSFontFaceRule', |
82 'CSSImportRule', | 82 'CSSImportRule', |
83 'CSSMediaRule', | 83 'CSSMediaRule', |
84 'CSSPageRule', | 84 'CSSPageRule', |
85 'CSSRule', | 85 'CSSRule', |
86 'CSSRuleList', | 86 'CSSRuleList', |
87 'CSSStyleDeclaration', | 87 'CSSStyleDeclaration', |
88 'CSSStyleRule', | 88 'CSSStyleRule', |
89 'CSSStyleSheet', | 89 'CSSStyleSheet', |
90 'DOMImplementation', | 90 'DOMImplementation', |
91 'DataTransfer', | |
92 'HTMLCollection', | 91 'HTMLCollection', |
93 'MediaList', | 92 'MediaList', |
94 'MimeType', | 93 'MimeType', |
95 'MimeTypeArray', | 94 'MimeTypeArray', |
96 'MutationEvent', | 95 'MutationEvent', |
97 'NamedNodeMap', | 96 'NamedNodeMap', |
98 'NodeFilter', | 97 'NodeFilter', |
99 'NodeList', | 98 'NodeList', |
100 'Plugin', | 99 'Plugin', |
101 'PluginArray', | 100 'PluginArray', |
(...skipping 14 matching lines...) Expand all Loading... |
116 'NodeIterator', | 115 'NodeIterator', |
117 'Screen', | 116 'Screen', |
118 'TreeWalker', | 117 'TreeWalker', |
119 'XPathExpression', | 118 'XPathExpression', |
120 'Worker' | 119 'Worker' |
121 ]; | 120 ]; |
122 | 121 |
123 // These objects should have a working constructor. | 122 // These objects should have a working constructor. |
124 var objects_constructor = [ | 123 var objects_constructor = [ |
125 'Comment', | 124 'Comment', |
| 125 'DataTransfer', |
126 'DOMParser', | 126 'DOMParser', |
127 'DocumentFragment', | 127 'DocumentFragment', |
128 'Range', | 128 'Range', |
129 'Text', | 129 'Text', |
130 'XMLHttpRequest', | 130 'XMLHttpRequest', |
131 'XMLSerializer', | 131 'XMLSerializer', |
132 'XPathEvaluator', | 132 'XPathEvaluator', |
133 'XSLTProcessor' | 133 'XSLTProcessor' |
134 ]; | 134 ]; |
135 | 135 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 "'[object " + objects_different_constructor[obj] + "]'"); | 197 "'[object " + objects_different_constructor[obj] + "]'"); |
198 element.id = "element"; | 198 element.id = "element"; |
199 element.name = obj; | 199 element.name = obj; |
200 shouldBe("TryAllocate('" + obj + "')", | 200 shouldBe("TryAllocate('" + obj + "')", |
201 "'[object " + objects_different_constructor[obj] + "]'"); | 201 "'[object " + objects_different_constructor[obj] + "]'"); |
202 element.name = "element_name"; | 202 element.name = "element_name"; |
203 } | 203 } |
204 </script> | 204 </script> |
205 </body> | 205 </body> |
206 </html> | 206 </html> |
OLD | NEW |