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

Unified Diff: test/mjsunit/es6/generators-runtime.js

Issue 1062633002: Re-implement %Generator% intrinsic as an object (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add TODO contact and bug URL Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/builtins.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/generators-runtime.js
diff --git a/test/mjsunit/es6/generators-runtime.js b/test/mjsunit/es6/generators-runtime.js
index 8fa70b62e0f5a691ed84e55be3d6e661ee428013..88380dfec0b386a50a88d6d55312e3cf821cb5c1 100644
--- a/test/mjsunit/es6/generators-runtime.js
+++ b/test/mjsunit/es6/generators-runtime.js
@@ -78,6 +78,23 @@ function TestGeneratorFunctionPrototype() {
Object.getPrototypeOf(GeneratorFunctionPrototype));
assertSame(GeneratorFunctionPrototype,
Object.getPrototypeOf(function* () {}));
+ assertSame("object", typeof GeneratorFunctionPrototype);
+
+ var constructor_desc = Object.getOwnPropertyDescriptor(
+ GeneratorFunctionPrototype, "constructor");
+ assertTrue(constructor_desc !== undefined);
+ assertSame(GeneratorFunction, constructor_desc.value);
+ assertFalse(constructor_desc.writable);
+ assertFalse(constructor_desc.enumerable);
+ assertTrue(constructor_desc.configurable);
+
+ var prototype_desc = Object.getOwnPropertyDescriptor(
+ GeneratorFunctionPrototype, "prototype");
+ assertTrue(prototype_desc !== undefined);
+ assertSame(GeneratorObjectPrototype, prototype_desc.value);
+ assertFalse(prototype_desc.writable);
+ assertFalse(prototype_desc.enumerable);
+ assertTrue(prototype_desc.configurable);
}
TestGeneratorFunctionPrototype();
@@ -136,7 +153,6 @@ TestGeneratorFunction();
function TestPerGeneratorPrototype() {
assertTrue((function*(){}).prototype !== (function*(){}).prototype);
assertTrue((function*(){}).prototype !== g.prototype);
- assertTrue(g.prototype instanceof GeneratorFunctionPrototype);
assertSame(GeneratorObjectPrototype, Object.getPrototypeOf(g.prototype));
assertTrue(!(g.prototype instanceof Function));
assertSame(typeof (g.prototype), "object");
« no previous file with comments | « test/mjsunit/builtins.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698