blob: 68a5726c70d387e1760f0a1c913873a8a9fbcd53 [file] [log] [blame]
description("This tests the constructor property of DOM objects: http://bugs.webkit.org/show_bug.cgi?id=11315");
shouldBeFalse("window.document.constructor === window.Object");
shouldBeTrue("window.document.constructor === window.HTMLDocument");
shouldBeTrue("window.document.constructor.prototype === window.HTMLDocument.prototype");
shouldBeTrue("window.document.constructor.prototype.__proto__ === window.HTMLDocument.prototype.__proto__");
shouldBeTrue("window.document.constructor.prototype.__proto__ === window.Document.prototype");
shouldBeTrue("window.document.body.constructor === window.HTMLBodyElement");
shouldBeTrue("window.document.body.constructor.prototype === window.HTMLBodyElement.prototype");
shouldBeTrue("window.document.body.constructor.prototype.__proto__ === window.HTMLBodyElement.prototype.__proto__");
shouldBeTrue("window.document.body.constructor.prototype.__proto__ === window.HTMLElement.prototype");
var htmlCollection = document.getElementsByTagName('script');
shouldBeTrue("htmlCollection.constructor === window.HTMLCollection");
shouldBeTrue("htmlCollection.constructor.prototype === window.HTMLCollection.prototype");
var mutationEvent = document.createEvent("MutationEvent");
shouldBeTrue("mutationEvent.constructor === window.MutationEvent");
shouldBeTrue("mutationEvent.constructor.prototype.__proto__ === window.Event.prototype");