Test chromium/chrome/fast/dom/dom-constructors.html Detail

id
chromium/chrome/fast/dom/dom-constructors.html
type
layouttest
version
0
enabled
1
tags
flags
sections
url
http://localhost:8888/chromium/chrome/fast/dom/dom-constructors.html
file
chromium/chrome/fast/dom/dom-constructors.html

results
Firefox 2 Win (2.0.0.20) Firefox 2 Lin (2.0.0.20) Firefox 3 Win (3.0.6) Firefox 3 Lin (3.0.6) Firefox 3.1 Win (3.1b2) Firefox 3.1 Lin (3.1b2) Firefox trunk Win (2009 02 22) Firefox trunk Lin (2009 02 22) Safari 3 Win (3.2) Safari trunk Win (41121) Opera 9 Win (9.62) Opera 9 Lin (9.62) IE 6 Win (6) IE 7 Win (7) IE 8 Win (8rc1)
FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL PASS FAIL FAIL FAIL FAIL FAIL

Layouttest detail

expected:
This test checks that all but a handful of dom constructors throw exceptions, and the rest return reasonable objects

Attr: exception
CharacterData: exception
CDATASection: exception
Comment: exception
Document: exception
DocumentFragment: exception
DocumentType: exception
Element: exception
Entity: exception
EntityReference: exception
EventTargetNode: no constructor
HTMLDocument: exception
Node: exception
Notation: exception
ProcessingInstruction: exception
Text: exception
HTMLAnchorElement: exception
HTMLAppletElement: exception
HTMLAreaElement: exception
HTMLBaseElement: exception
HTMLBaseFontElement: exception
HTMLBlockquoteElement: exception
HTMLBodyElement: exception
HTMLBRElement: exception
HTMLButtonElement: exception
HTMLCanvasElement: exception
HTMLDirectoryElement: exception
HTMLDivElement: exception
HTMLDListElement: exception
HTMLEmbedElement: exception
HTMLFieldSetElement: exception
HTMLFontElement: exception
HTMLFormElement: exception
HTMLFrameElement: exception
HTMLFrameSetElement: exception
HTMLHeadingElement: exception
HTMLHeadElement: exception
HTMLHRElement: exception
HTMLHtmlElement: exception
HTMLIFrameElement: exception
HTMLImageElement: exception
HTMLInputElement: exception
HTMLIsIndexElement: exception
HTMLLabelElement: exception
HTMLLegendElement: exception
HTMLLIElement: exception
HTMLLinkElement: exception
HTMLMapElement: exception
HTMLMarqueeElement: exception
HTMLMenuElement: exception
HTMLMetaElement: exception
HTMLModElement: exception
HTMLObjectElement: exception
HTMLOListElement: exception
HTMLOptGroupElement: exception
HTMLOptionElement: exception
HTMLParagraphElement: exception
HTMLParamElement: exception
HTMLPreElement: exception
HTMLQuoteElement: exception
HTMLScriptElement: exception
HTMLSelectElement: exception
HTMLStyleElement: exception
HTMLTableCaptionElement: exception
HTMLTableColElement: exception
HTMLTableElement: exception
HTMLTableSectionElement: exception
HTMLTableCellElement: exception
HTMLTableRowElement: exception
HTMLTextAreaElement: exception
HTMLTitleElement: exception
HTMLUListElement: exception
HTMLElement: exception
BarInfo: no constructor
CanvasGradient: no constructor
CanvasPattern: no constructor
CanvasRenderingContext2D: exception
Clipboard: exception
Console: no constructor
Counter: exception
CSSCharsetRule: exception
CSSFontFaceRule: exception
CSSImportRule: exception
CSSMediaRule: exception
CSSPageRule: exception
CSSPrimitiveValue: exception
CSSRule: exception
CSSRuleList: exception
CSSStyleDeclaration: exception
CSSStyleRule: exception
CSSStyleSheet: exception
CSSValue: exception
CSSValueList: exception
DOMImplementation: exception
DOMParser: [object DOMParser]
DOMSelection: no constructor
DOMWindow: no constructor
Event: exception
History: no constructor
UndetectableHTMLCollection: no constructor
HTMLCollection: exception
HTMLOptionsCollection: no constructor
InspectorController: no constructor
KeyboardEvent: exception
Location: no constructor
MediaList: exception
MimeType: exception
MimeTypeArray: exception
MouseEvent: exception
MutationEvent: exception
NamedNodeMap: exception
Navigator: no constructor
NodeFilter: exception
NodeIterator: no constructor
NodeList: exception
OverflowEvent: exception
Plugin: exception
PluginArray: exception
Range: exception
Rect: exception
RGBColor: no constructor
Screen: no constructor
StyleSheet: exception
StyleSheetList: exception
TextEvent: exception
TreeWalker: no constructor
UIEvent: exception
WheelEvent: exception
XMLHttpRequest: [object XMLHttpRequest]
XMLSerializer: [object XMLSerializer]
XPathEvaluator: [object XPathEvaluator]
XPathExpression: no constructor
XPathNSResolver: no constructor
XPathResult: exception
XSLTProcessor: [object XSLTProcessor]
EventTarget: no constructor
EventListener: no constructor
NPObject: no constructor
Console: no constructor
file:
<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>
file frame show/hide: