Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / js / script-tests / constructor.js
blob68a5726c70d387e1760f0a1c913873a8a9fbcd53
1 description("This tests the constructor property of DOM objects: http://bugs.webkit.org/show_bug.cgi?id=11315");
3 shouldBeFalse("window.document.constructor === window.Object");
4 shouldBeTrue("window.document.constructor === window.HTMLDocument");
5 shouldBeTrue("window.document.constructor.prototype === window.HTMLDocument.prototype");
6 shouldBeTrue("window.document.constructor.prototype.__proto__ === window.HTMLDocument.prototype.__proto__");
7 shouldBeTrue("window.document.constructor.prototype.__proto__ === window.Document.prototype");
9 shouldBeTrue("window.document.body.constructor === window.HTMLBodyElement");
10 shouldBeTrue("window.document.body.constructor.prototype === window.HTMLBodyElement.prototype");
11 shouldBeTrue("window.document.body.constructor.prototype.__proto__ === window.HTMLBodyElement.prototype.__proto__");
12 shouldBeTrue("window.document.body.constructor.prototype.__proto__ === window.HTMLElement.prototype");
14 var htmlCollection = document.getElementsByTagName('script');
15 shouldBeTrue("htmlCollection.constructor === window.HTMLCollection");
16 shouldBeTrue("htmlCollection.constructor.prototype === window.HTMLCollection.prototype");
18 var mutationEvent = document.createEvent("MutationEvent");
19 shouldBeTrue("mutationEvent.constructor === window.MutationEvent");
20 shouldBeTrue("mutationEvent.constructor.prototype.__proto__ === window.Event.prototype");