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

Unified Diff: test/mjsunit/es6/symbols.js

Issue 391683002: Include symbol properties in Object.{create,defineProperties} (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed DebugPrint Created 6 years, 5 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/v8natives.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/symbols.js
diff --git a/test/mjsunit/es6/symbols.js b/test/mjsunit/es6/symbols.js
index 220439291cb86125aee42f5ef5f76724f6d07766..b465bee14a9b4630af3eb56be4bf18ccf008fc9c 100644
--- a/test/mjsunit/es6/symbols.js
+++ b/test/mjsunit/es6/symbols.js
@@ -367,6 +367,34 @@ for (var i in objs) {
}
+function TestDefineProperties() {
+ var properties = {}
+ for (var i in symbols) {
+ Object.defineProperty(
+ properties, symbols[i], {value: {value: i}, enumerable: i % 2 === 0})
+ }
+ var o = Object.defineProperties({}, properties)
+ for (var i in symbols) {
+ assertEquals(i % 2 === 0, symbols[i] in o)
+ }
+}
+TestDefineProperties()
+
+
+function TestCreate() {
+ var properties = {}
+ for (var i in symbols) {
+ Object.defineProperty(
+ properties, symbols[i], {value: {value: i}, enumerable: i % 2 === 0})
+ }
+ var o = Object.create(Object.prototype, properties)
+ for (var i in symbols) {
+ assertEquals(i % 2 === 0, symbols[i] in o)
+ }
+}
+TestCreate()
+
+
function TestCachedKeyAfterScavenge() {
gc();
// Keyed property lookup are cached. Hereby we assume that the keys are
« no previous file with comments | « src/v8natives.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698