Index: test/mjsunit/harmony/proxies-ownkeys.js |
diff --git a/test/mjsunit/harmony/proxies-ownkeys.js b/test/mjsunit/harmony/proxies-ownkeys.js |
index 6a7ae64d78b9602cf8bf579578ba4d98b46b4f6b..88350cca02d40c662fe5966ca287c202390114ef 100644 |
--- a/test/mjsunit/harmony/proxies-ownkeys.js |
+++ b/test/mjsunit/harmony/proxies-ownkeys.js |
@@ -56,6 +56,10 @@ assertEquals(["a", "b", "c"], Reflect.ownKeys(proxy)); |
keys.length = Math.pow(2, 33); |
assertThrows("Reflect.ownKeys(proxy)", RangeError); |
+// Check that we allow duplicated keys. |
+keys = ['a', 'a', 'a'] |
+assertEquals(keys, Reflect.ownKeys(proxy)); |
+ |
// Non-Name results throw. |
keys = [1]; |
assertThrows("Reflect.ownKeys(proxy)", TypeError); |
@@ -73,6 +77,10 @@ assertThrows("Reflect.ownKeys(proxy)", TypeError); |
keys = ["nonconf"]; |
assertEquals(keys, Reflect.ownKeys(proxy)); |
+// Check that we allow duplicated keys. |
+keys = ['nonconf', 'nonconf', 'nonconf'] |
+assertEquals(keys, Reflect.ownKeys(proxy)); |
+ |
// Step 19a: The trap result must all keys of a non-extensible target. |
Object.preventExtensions(target); |
assertThrows("Reflect.ownKeys(proxy)", TypeError); |
@@ -82,3 +90,7 @@ assertEquals(keys, Reflect.ownKeys(proxy)); |
// Step 20: The trap result must not add keys to a non-extensible target. |
keys = ["nonconf", "target_one", "fantasy"]; |
assertThrows("Reflect.ownKeys(proxy)", TypeError); |
+ |
+// Check that we allow duplicated keys. |
+keys = ['nonconf', 'target_one', 'nonconf', 'nonconf', 'target_one',] |
+assertEquals(keys, Reflect.ownKeys(proxy)); |