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

Unified Diff: test/mjsunit/es6/generators-runtime.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 | « src/bootstrapper.cc ('k') | test/mjsunit/harmony/object-literals-method.js » ('j') | 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 72a47d0fb093c567641ad3b80d07796a5bdcaf94..98015b7f7c811591d72fd6b0ae35a7d0300ead00 100644
--- a/test/mjsunit/es6/generators-runtime.js
+++ b/test/mjsunit/es6/generators-runtime.js
@@ -52,16 +52,9 @@ function TestGeneratorFunctionInstance() {
var prop = f_own_property_names[i];
var f_desc = Object.getOwnPropertyDescriptor(f, prop);
var g_desc = Object.getOwnPropertyDescriptor(g, prop);
- if (prop === "prototype") {
- // ES6 draft 03-17-2015 section 25.2.2.2
- assertFalse(g_desc.writable, prop);
- assertFalse(g_desc.enumerable, prop);
- assertFalse(g_desc.configurable, prop);
- } else {
- assertEquals(f_desc.configurable, g_desc.configurable, prop);
- assertEquals(f_desc.writable, g_desc.writable, prop);
- assertEquals(f_desc.enumerable, g_desc.enumerable, prop);
- }
+ assertEquals(f_desc.configurable, g_desc.configurable, prop);
+ assertEquals(f_desc.writable, g_desc.writable, prop);
+ assertEquals(f_desc.enumerable, g_desc.enumerable, prop);
}
}
TestGeneratorFunctionInstance();
@@ -156,6 +149,13 @@ function TestGeneratorFunction() {
assertTrue((new GeneratorFunction()) instanceof GeneratorFunction);
assertTrue(GeneratorFunction() instanceof GeneratorFunction);
+
+ // ES6 draft 04-14-15, section 25.2.2.2
+ var prototype_desc = Object.getOwnPropertyDescriptor(GeneratorFunction,
+ "prototype");
+ assertFalse(prototype_desc.writable);
+ assertFalse(prototype_desc.enumerable);
+ assertFalse(prototype_desc.configurable);
}
TestGeneratorFunction();
« no previous file with comments | « src/bootstrapper.cc ('k') | test/mjsunit/harmony/object-literals-method.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698