Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: LayoutTests/fast/js/script-tests/constructor.js

Issue 143453010: Have getElementsByClassName() / getElementsByTagName*() return an HTMLCollection (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 description("This tests the constructor property of DOM objects: http://bugs.web kit.org/show_bug.cgi?id=11315"); 1 description("This tests the constructor property of DOM objects: http://bugs.web kit.org/show_bug.cgi?id=11315");
2 2
3 shouldBeFalse("window.document.constructor === window.Object"); 3 shouldBeFalse("window.document.constructor === window.Object");
4 shouldBeTrue("window.document.constructor === window.HTMLDocument"); 4 shouldBeTrue("window.document.constructor === window.HTMLDocument");
5 shouldBeTrue("window.document.constructor.prototype === window.HTMLDocument.prot otype"); 5 shouldBeTrue("window.document.constructor.prototype === window.HTMLDocument.prot otype");
6 shouldBeTrue("window.document.constructor.prototype.__proto__ === window.HTMLDoc ument.prototype.__proto__"); 6 shouldBeTrue("window.document.constructor.prototype.__proto__ === window.HTMLDoc ument.prototype.__proto__");
7 shouldBeTrue("window.document.constructor.prototype.__proto__ === window.Documen t.prototype"); 7 shouldBeTrue("window.document.constructor.prototype.__proto__ === window.Documen t.prototype");
8 8
9 shouldBeTrue("window.document.body.constructor === window.HTMLBodyElement"); 9 shouldBeTrue("window.document.body.constructor === window.HTMLBodyElement");
10 shouldBeTrue("window.document.body.constructor.prototype === window.HTMLBodyElem ent.prototype"); 10 shouldBeTrue("window.document.body.constructor.prototype === window.HTMLBodyElem ent.prototype");
11 shouldBeTrue("window.document.body.constructor.prototype.__proto__ === window.HT MLBodyElement.prototype.__proto__"); 11 shouldBeTrue("window.document.body.constructor.prototype.__proto__ === window.HT MLBodyElement.prototype.__proto__");
12 shouldBeTrue("window.document.body.constructor.prototype.__proto__ === window.HT MLElement.prototype"); 12 shouldBeTrue("window.document.body.constructor.prototype.__proto__ === window.HT MLElement.prototype");
13 13
14 var nodeList = document.getElementsByTagName('script'); 14 var htmlCollection = document.getElementsByTagName('script');
15 shouldBeTrue("nodeList.constructor === window.NodeList"); 15 shouldBeTrue("htmlCollection.constructor === window.HTMLCollection");
16 shouldBeTrue("nodeList.constructor.prototype === window.NodeList.prototype"); 16 shouldBeTrue("htmlCollection.constructor.prototype === window.HTMLCollection.pro totype");
17 17
18 var mutationEvent = document.createEvent("MutationEvent"); 18 var mutationEvent = document.createEvent("MutationEvent");
19 shouldBeTrue("mutationEvent.constructor === window.MutationEvent"); 19 shouldBeTrue("mutationEvent.constructor === window.MutationEvent");
20 shouldBeTrue("mutationEvent.constructor.prototype.__proto__ === window.Event.pro totype"); 20 shouldBeTrue("mutationEvent.constructor.prototype.__proto__ === window.Event.pro totype");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698