| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 'HTMLTableColElement', | 72 'HTMLTableColElement', |
| 73 'HTMLTableElement', | 73 'HTMLTableElement', |
| 74 'HTMLTableSectionElement', | 74 'HTMLTableSectionElement', |
| 75 'HTMLTableCellElement', | 75 'HTMLTableCellElement', |
| 76 'HTMLTableRowElement', | 76 'HTMLTableRowElement', |
| 77 'HTMLTextAreaElement', | 77 'HTMLTextAreaElement', |
| 78 'HTMLTitleElement', | 78 'HTMLTitleElement', |
| 79 'HTMLUListElement', | 79 'HTMLUListElement', |
| 80 'HTMLElement', | 80 'HTMLElement', |
| 81 'CanvasRenderingContext2D', | 81 'CanvasRenderingContext2D', |
| 82 'Counter', | |
| 83 'CSSCharsetRule', | 82 'CSSCharsetRule', |
| 84 'CSSFontFaceRule', | 83 'CSSFontFaceRule', |
| 85 'CSSImportRule', | 84 'CSSImportRule', |
| 86 'CSSMediaRule', | 85 'CSSMediaRule', |
| 87 'CSSPageRule', | 86 'CSSPageRule', |
| 88 'CSSPrimitiveValue', | |
| 89 'CSSRule', | 87 'CSSRule', |
| 90 'CSSRuleList', | 88 'CSSRuleList', |
| 91 'CSSStyleDeclaration', | 89 'CSSStyleDeclaration', |
| 92 'CSSStyleRule', | 90 'CSSStyleRule', |
| 93 'CSSStyleSheet', | 91 'CSSStyleSheet', |
| 94 'CSSValue', | |
| 95 'CSSValueList', | |
| 96 'DOMImplementation', | 92 'DOMImplementation', |
| 97 'DataTransfer', | 93 'DataTransfer', |
| 98 'HTMLCollection', | 94 'HTMLCollection', |
| 99 'MediaList', | 95 'MediaList', |
| 100 'MimeType', | 96 'MimeType', |
| 101 'MimeTypeArray', | 97 'MimeTypeArray', |
| 102 'MutationEvent', | 98 'MutationEvent', |
| 103 'NamedNodeMap', | 99 'NamedNodeMap', |
| 104 'NodeFilter', | 100 'NodeFilter', |
| 105 'NodeList', | 101 'NodeList', |
| 106 'Plugin', | 102 'Plugin', |
| 107 'PluginArray', | 103 'PluginArray', |
| 108 'Rect', | |
| 109 'StyleSheet', | 104 'StyleSheet', |
| 110 'StyleSheetList', | 105 'StyleSheetList', |
| 111 'TextEvent', | 106 'TextEvent', |
| 112 'XPathResult', | 107 'XPathResult', |
| 113 'BarInfo', | 108 'BarInfo', |
| 114 'CanvasGradient', | 109 'CanvasGradient', |
| 115 'CanvasPattern', | 110 'CanvasPattern', |
| 116 'Console', | 111 'Console', |
| 117 'Selection', | 112 'Selection', |
| 118 'Window', | 113 'Window', |
| 119 'History', | 114 'History', |
| 120 'HTMLOptionsCollection', | 115 'HTMLOptionsCollection', |
| 121 'Location', | 116 'Location', |
| 122 'Navigator', | 117 'Navigator', |
| 123 'NodeIterator', | 118 'NodeIterator', |
| 124 'RGBColor', | |
| 125 'Screen', | 119 'Screen', |
| 126 'TreeWalker', | 120 'TreeWalker', |
| 127 'XPathExpression', | 121 'XPathExpression', |
| 128 'Worker' | 122 'Worker' |
| 129 ]; | 123 ]; |
| 130 | 124 |
| 131 // These objects should have a working constructor. | 125 // These objects should have a working constructor. |
| 132 var objects_constructor = [ | 126 var objects_constructor = [ |
| 133 'Comment', | 127 'Comment', |
| 134 'DOMParser', | 128 'DOMParser', |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 "'[object " + objects_different_constructor[obj] + "]'"); | 199 "'[object " + objects_different_constructor[obj] + "]'"); |
| 206 element.id = "element"; | 200 element.id = "element"; |
| 207 element.name = obj; | 201 element.name = obj; |
| 208 shouldBe("TryAllocate('" + obj + "')", | 202 shouldBe("TryAllocate('" + obj + "')", |
| 209 "'[object " + objects_different_constructor[obj] + "]'"); | 203 "'[object " + objects_different_constructor[obj] + "]'"); |
| 210 element.name = "element_name"; | 204 element.name = "element_name"; |
| 211 } | 205 } |
| 212 </script> | 206 </script> |
| 213 </body> | 207 </body> |
| 214 </html> | 208 </html> |
| OLD | NEW |