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

Unified Diff: test/mjsunit/harmony/object-literals-method.js

Issue 1153633003: [es6] Define generator prototype as writable prop (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add requested regression test Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/es6/generators-runtime.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/object-literals-method.js
diff --git a/test/mjsunit/harmony/object-literals-method.js b/test/mjsunit/harmony/object-literals-method.js
index 535231ea62f3bf642074eba74c516d48ea2626aa..d2879ada8f7ca59d8ecb7ea515cdfb8459ac4243 100644
--- a/test/mjsunit/harmony/object-literals-method.js
+++ b/test/mjsunit/harmony/object-literals-method.js
@@ -156,6 +156,7 @@
var GeneratorFunction = function*() {}.__proto__.constructor;
+var GeneratorPrototype = Object.getPrototypeOf(function*() {}).prototype;
function assertIteratorResult(value, done, result) {
@@ -215,6 +216,19 @@ function assertIteratorResult(value, done, result) {
})();
+(function TestGeneratorPrototypeDescriptor() {
+ var object = {
+ *method() {}
+ };
+
+ var desc = Object.getOwnPropertyDescriptor(object.method, 'prototype');
+ assertFalse(desc.enumerable);
+ assertFalse(desc.configurable);
+ assertTrue(desc.writable);
+ assertEquals(GeneratorPrototype, Object.getPrototypeOf(desc.value));
+})();
+
+
(function TestGeneratorProto() {
var object = {
*method() {}
« no previous file with comments | « test/mjsunit/es6/generators-runtime.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698