Index: test/mjsunit/harmony/proxies-has.js |
diff --git a/test/mjsunit/harmony/proxies-has.js b/test/mjsunit/harmony/proxies-has.js |
index ffeb0312aad6884519c30d46a0a281463aa95af7..8eda812503ea642b54174ef60dcd7c3e1012de08 100644 |
--- a/test/mjsunit/harmony/proxies-has.js |
+++ b/test/mjsunit/harmony/proxies-has.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 |
var target = { |
"target_one": 1 |
@@ -54,3 +54,15 @@ assertThrows("'nonconf' in proxy", TypeError); |
assertThrows("'target_one' in proxy", TypeError); |
assertFalse("target_two" in proxy); |
assertFalse("in_your_dreams" in proxy); |
+ |
+(function testHasPrivateSymbol() { |
+ var symbol = %CreatePrivateSymbol("secret"); |
+ var O = {}; |
+ var proxy = new Proxy(O, { has(t, name) { assertUnreachable(); }}); |
+ O[symbol] = "value"; |
+ proxy[symbol] = "value"; |
+ assertEquals(false, symbol in proxy); |
+ assertEquals(false, Reflect.has(proxy, symbol)); |
+ assertEquals(true, symbol in O); |
+ assertEquals(true, Reflect.has(O, symbol)); |
+})(); |