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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/dom/nodes/Comment-Text-constructor.js

Issue 1988983002: Move the dom directory from web-platform-tests/ to wpt/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
OLDNEW
1 function test_constructor(ctor) { 1 function test_constructor(ctor) {
2 test(function() { 2 test(function() {
3 var object = new window[ctor](); 3 var object = new window[ctor]();
4 assert_equals(Object.getPrototypeOf(object), 4 assert_equals(Object.getPrototypeOf(object),
5 window[ctor].prototype, "Prototype chain: " + ctor); 5 window[ctor].prototype, "Prototype chain: " + ctor);
6 assert_equals(Object.getPrototypeOf(Object.getPrototypeOf(object)), 6 assert_equals(Object.getPrototypeOf(Object.getPrototypeOf(object)),
7 CharacterData.prototype, "Prototype chain: CharacterData"); 7 CharacterData.prototype, "Prototype chain: CharacterData");
8 assert_equals(Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototyp eOf(object))), 8 assert_equals(Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototyp eOf(object))),
9 Node.prototype, "Prototype chain: Node"); 9 Node.prototype, "Prototype chain: Node");
10 }, "new " + ctor + "(): prototype chain"); 10 }, "new " + ctor + "(): prototype chain");
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 async_test("new " + ctor + "() should get the correct ownerDocument across glo bals").step(function() { 69 async_test("new " + ctor + "() should get the correct ownerDocument across glo bals").step(function() {
70 var iframe = document.createElement("iframe"); 70 var iframe = document.createElement("iframe");
71 iframe.onload = this.step_func_done(function() { 71 iframe.onload = this.step_func_done(function() {
72 var object = new iframe.contentWindow[ctor](); 72 var object = new iframe.contentWindow[ctor]();
73 assert_equals(object.ownerDocument, iframe.contentDocument); 73 assert_equals(object.ownerDocument, iframe.contentDocument);
74 }); 74 });
75 document.body.appendChild(iframe); 75 document.body.appendChild(iframe);
76 }); 76 });
77 } 77 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698