Index: test/mjsunit/harmony/proxies-define-property.js |
diff --git a/test/mjsunit/harmony/proxies-define-property.js b/test/mjsunit/harmony/proxies-define-property.js |
index 78ab85e8a4c3ff8a0fc35fa2a1eee8472e231262..75e8f0d2b0430a4556e22dcaf12ad94d9927a150 100644 |
--- a/test/mjsunit/harmony/proxies-define-property.js |
+++ b/test/mjsunit/harmony/proxies-define-property.js |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-// Flags: --harmony-proxies |
+// Flags: --harmony-proxies --harmony-reflect --allow-natives-syntax |
// Check basic call to trap. |
@@ -73,3 +73,22 @@ assertThrows("Object.defineProperty(proxy, 'foo', {value: 2})", TypeError); |
target.bar = "baz"; |
assertThrows("Object.defineProperty(proxy, 'bar', {configurable: false})", |
TypeError); |
+ |
+(function testDefinePrivateSymbol() { |
+ var symbol = %CreatePrivateSymbol("secret"); |
+ var O = {}; |
+ Object.defineProperty(O, symbol, { value: "value", configurable: true }); |
+ assertEquals("value", O[symbol]); |
+ var proxy = new Proxy(O, { defineProperty(t, n, d) { assertUnreachable(); }}); |
+ Object.defineProperty(O, symbol, { value: "value", configurable: true }); |
+ assertEquals(undefined, proxy[symbol]); |
+ assertEquals(undefined, Reflect.get(proxy, symbol)); |
+ |
+ assertEquals( |
+ true, Reflect.defineProperty(O, symbol, |
+ { value: "value2", configurable: true })); |
neis
2015/12/03 12:01:24
assertTrue
|
+ |
+ assertEquals( |
+ false, Reflect.defineProperty(proxy, symbol, |
+ { value: "value2", configurable: true })); |
+})(); |
neis
2015/12/03 12:01:24
assertFalse
|