| OLD | NEW |
| 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"); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 'HTMLTableRowElement', 'HTMLTextAreaElement', 'HTMLTitleElement', | 38 'HTMLTableRowElement', 'HTMLTextAreaElement', 'HTMLTitleElement', |
| 39 'HTMLUListElement', 'HTMLElement', 'CanvasRenderingContext2D', | 39 'HTMLUListElement', 'HTMLElement', 'CanvasRenderingContext2D', |
| 40 'Clipboard', 'Counter', 'CSSCharsetRule', 'CSSFontFaceRule', | 40 'Clipboard', 'Counter', 'CSSCharsetRule', 'CSSFontFaceRule', |
| 41 'CSSImportRule', 'CSSMediaRule', 'CSSPageRule', | 41 'CSSImportRule', 'CSSMediaRule', 'CSSPageRule', |
| 42 'CSSPrimitiveValue', 'CSSRule', 'CSSRuleList', | 42 'CSSPrimitiveValue', 'CSSRule', 'CSSRuleList', |
| 43 'CSSStyleDeclaration', 'CSSStyleRule', 'CSSStyleSheet', | 43 'CSSStyleDeclaration', 'CSSStyleRule', 'CSSStyleSheet', |
| 44 'CSSValue', 'CSSValueList', 'DOMImplementation', | 44 'CSSValue', 'CSSValueList', 'DOMImplementation', |
| 45 'HTMLCollection', 'MediaList', 'MimeType', | 45 'HTMLCollection', 'MediaList', 'MimeType', |
| 46 'MimeTypeArray', 'MutationEvent', 'NamedNodeMap', | 46 'MimeTypeArray', 'MutationEvent', 'NamedNodeMap', |
| 47 'NodeFilter', 'NodeList', 'Plugin', | 47 'NodeFilter', 'NodeList', 'Plugin', |
| 48 'PluginArray', 'Range', 'Rect', 'StyleSheet', 'StyleSheetList', | 48 'PluginArray', 'Rect', 'StyleSheet', 'StyleSheetList', |
| 49 'TextEvent', 'XPathResult', 'BarInfo', | 49 'TextEvent', 'XPathResult', 'BarInfo', |
| 50 'CanvasGradient', 'CanvasPattern', 'Console', 'Selection', | 50 'CanvasGradient', 'CanvasPattern', 'Console', 'Selection', |
| 51 'Window', 'History', 'HTMLOptionsCollection', 'Location', | 51 'Window', 'History', 'HTMLOptionsCollection', 'Location', |
| 52 'Navigator', 'NodeIterator', 'RGBColor', 'Screen', 'TreeWalker', | 52 'Navigator', 'NodeIterator', 'RGBColor', 'Screen', 'TreeWalker', |
| 53 'XPathExpression', 'Worker' | 53 'XPathExpression', 'Worker' |
| 54 ]; | 54 ]; |
| 55 | 55 |
| 56 // These objects should have a working constructor. | 56 // These objects should have a working constructor. |
| 57 var objects_constructor = [ | 57 var objects_constructor = [ |
| 58 'DOMParser', 'XMLHttpRequest', 'XMLSerializer', 'XPathEvaluator', | 58 'DOMParser', 'Range', 'XMLHttpRequest', 'XMLSerializer', 'XPathEvaluator', |
| 59 'XSLTProcessor' | 59 'XSLTProcessor' |
| 60 ]; | 60 ]; |
| 61 | 61 |
| 62 // These objects should have no constructor. | 62 // These objects should have no constructor. |
| 63 var objects_no_constructor = [ | 63 var objects_no_constructor = [ |
| 64 'EventTargetNode', 'UndetectableHTMLCollection', | 64 'EventTargetNode', 'UndetectableHTMLCollection', |
| 65 'XPathNSResolver', 'EventTarget', 'EventListener', 'NPObject' | 65 'XPathNSResolver', 'EventTarget', 'EventListener', 'NPObject' |
| 66 ]; | 66 ]; |
| 67 | 67 |
| 68 // These objects should have a working constructor, but their constructed | 68 // These objects should have a working constructor, but their constructed |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 element.id = "element"; | 121 element.id = "element"; |
| 122 element.name = obj; | 122 element.name = obj; |
| 123 shouldBe("TryAllocate('" + obj + "')", | 123 shouldBe("TryAllocate('" + obj + "')", |
| 124 "'[object " + objects_different_constructor[obj] + "]'"); | 124 "'[object " + objects_different_constructor[obj] + "]'"); |
| 125 element.name = "element_name"; | 125 element.name = "element_name"; |
| 126 } | 126 } |
| 127 </script> | 127 </script> |
| 128 <script src="../js/resources/js-test-post.js"></script> | 128 <script src="../js/resources/js-test-post.js"></script> |
| 129 </body> | 129 </body> |
| 130 </html> | 130 </html> |
| OLD | NEW |