1de98a5a1973d042e2270f1fd4e14bdae912e408
[framework/web/webkit-efl.git] / LayoutTests / fast / js / script-tests / constructor.js
1 description("This tests the constructor property of DOM objects: http://bugs.webkit.org/show_bug.cgi?id=11315");
2
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");
8
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");
13
14 var nodeList = document.getElementsByTagName('script');
15 shouldBeTrue("nodeList.constructor === window.NodeList");
16 shouldBeTrue("nodeList.constructor.prototype === window.NodeList.prototype");
17
18 var mutationEvent = document.createEvent("MutationEvent");
19 shouldBeTrue("mutationEvent.constructor === window.MutationEvent");
20 shouldBeTrue("mutationEvent.constructor.prototype.__proto__ === window.Event.prototype");
21
22 var successfullyParsed = true;