Chromium Code Reviews| 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..5fe13317972c0c8ce6ba3c2913e2c6e9fb2900a1 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"); |
|
arv (Not doing code reviews)
2015/04/06 15:16:22
wrong indentation
|
| + 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"); |