Index: webkit/data/layout_tests/chrome/fast/dom/dom-constructors.html |
=================================================================== |
--- webkit/data/layout_tests/chrome/fast/dom/dom-constructors.html (revision 12664) |
+++ webkit/data/layout_tests/chrome/fast/dom/dom-constructors.html (working copy) |
@@ -1,69 +0,0 @@ |
-<html> |
- <head></head> |
- <body> |
- |
-<p>This test checks that all but a handful of dom constructors throw |
-exceptions, and the rest return reasonable objects</p> |
- |
- <script> |
-if (window.layoutTestController) layoutTestController.dumpAsText(); |
- |
-var nodes = [ |
- 'Attr', 'CharacterData', 'CDATASection', 'Comment', 'Document', |
- 'DocumentFragment', 'DocumentType', 'Element', 'Entity', |
- 'EntityReference', 'EventTargetNode', 'HTMLDocument', 'Node', |
- 'Notation', 'ProcessingInstruction', 'Text', 'HTMLAnchorElement', |
- 'HTMLAppletElement', 'HTMLAreaElement', 'HTMLBaseElement', |
- 'HTMLBaseFontElement', 'HTMLBlockquoteElement', 'HTMLBodyElement', |
- 'HTMLBRElement', 'HTMLButtonElement', 'HTMLCanvasElement', |
- 'HTMLDirectoryElement', 'HTMLDivElement', 'HTMLDListElement', |
- 'HTMLEmbedElement', 'HTMLFieldSetElement', 'HTMLFontElement', |
- 'HTMLFormElement', 'HTMLFrameElement', 'HTMLFrameSetElement', |
- 'HTMLHeadingElement', 'HTMLHeadElement', 'HTMLHRElement', |
- 'HTMLHtmlElement', 'HTMLIFrameElement', 'HTMLImageElement', |
- 'HTMLInputElement', 'HTMLIsIndexElement', 'HTMLLabelElement', |
- 'HTMLLegendElement', 'HTMLLIElement', 'HTMLLinkElement', |
- 'HTMLMapElement', 'HTMLMarqueeElement', 'HTMLMenuElement', |
- 'HTMLMetaElement', 'HTMLModElement', 'HTMLObjectElement', |
- 'HTMLOListElement', 'HTMLOptGroupElement', 'HTMLOptionElement', |
- 'HTMLParagraphElement', 'HTMLParamElement', 'HTMLPreElement', |
- 'HTMLQuoteElement', 'HTMLScriptElement', 'HTMLSelectElement', |
- 'HTMLStyleElement', 'HTMLTableCaptionElement', |
- 'HTMLTableColElement', 'HTMLTableElement', |
- 'HTMLTableSectionElement', 'HTMLTableCellElement', |
- 'HTMLTableRowElement', 'HTMLTextAreaElement', 'HTMLTitleElement', |
- 'HTMLUListElement', 'HTMLElement', 'BarInfo', 'CanvasGradient', |
- 'CanvasPattern', 'CanvasRenderingContext2D', 'Clipboard', 'Console', |
- 'Counter', 'CSSCharsetRule', 'CSSFontFaceRule', 'CSSImportRule', |
- 'CSSMediaRule', 'CSSPageRule', 'CSSPrimitiveValue', 'CSSRule', |
- 'CSSRuleList', 'CSSStyleDeclaration', 'CSSStyleRule', |
- 'CSSStyleSheet', 'CSSValue', 'CSSValueList', 'DOMImplementation', |
- 'DOMParser', 'DOMSelection', 'DOMWindow', 'Event', 'History', |
- 'UndetectableHTMLCollection', 'HTMLCollection', |
- 'HTMLOptionsCollection', 'InspectorController', 'KeyboardEvent', |
- 'Location', 'MediaList', 'MimeType', 'MimeTypeArray', 'MouseEvent', |
- 'MutationEvent', 'NamedNodeMap', 'Navigator', 'NodeFilter', |
- 'NodeIterator', 'NodeList', 'OverflowEvent', 'Plugin', |
- 'PluginArray', 'Range', 'Rect', 'RGBColor', 'Screen', 'StyleSheet', |
- 'StyleSheetList', 'TextEvent', 'TreeWalker', 'UIEvent', |
- 'WheelEvent', 'XMLHttpRequest', 'XMLSerializer', |
- 'XPathEvaluator', 'XPathExpression', 'XPathNSResolver', |
- 'XPathResult', 'XSLTProcessor', 'EventTarget', 'EventListener', |
- 'NPObject', 'Console' |
-]; |
- |
-function TryAllocate(node) { |
- var Cons = this[node]; |
- if (!Cons) return 'no constructor'; |
- try { return new Cons(); } |
- catch (e) { return 'exception'; } |
-} |
- |
-for (var i = 0; i < nodes.length; i++) { |
- var node = nodes[i]; |
- document.write(node + ': ' + TryAllocate(node) + '</br>'); |
-} |
- |
- </script> |
- </body> |
-</html> |