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

Unified Diff: test/mjsunit/harmony/reflect-construct.js

Issue 1484473002: Fix Reflect.construct wrt proxy, generator, and non-subclass new.target (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/es6/classes-proxy.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/reflect-construct.js
diff --git a/test/mjsunit/harmony/reflect-construct.js b/test/mjsunit/harmony/reflect-construct.js
index 2211e3f7837a03e1e8fc0b48cf4f04c363044b58..8e43b19a34269e3687ad9bc7f43cf1bb5239e535 100644
--- a/test/mjsunit/harmony/reflect-construct.js
+++ b/test/mjsunit/harmony/reflect-construct.js
@@ -275,3 +275,12 @@
assertEquals(10, Reflect.construct(sumSloppy,
{ 0: 1, 1: 2, 2: 3, 3: 4, length: 4 }).a);
})();
+
+(function() {
+ function* f() { yield 1; yield 2; }
+ function* g() { yield 3; yield 4; }
+ var o = Reflect.construct(f, [], g);
+ assertEquals([1, 2], [...o]);
+ assertTrue(o.__proto__ === g.prototype);
+ assertTrue(o.__proto__ !== f.prototype);
+})();
« no previous file with comments | « test/mjsunit/es6/classes-proxy.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698