Index: test/mjsunit/harmony/private.js |
diff --git a/test/mjsunit/harmony/private.js b/test/mjsunit/harmony/private.js |
index 225799831cf696f3e5586485d6b642bc95c22d01..c4b0ed2b2bccc31737bc4f499955d9fd60434a8c 100644 |
--- a/test/mjsunit/harmony/private.js |
+++ b/test/mjsunit/harmony/private.js |
@@ -342,3 +342,18 @@ function TestGetOwnPropertySymbols() { |
assertEquals(syms, [publicSymbol, publicSymbol2]) |
} |
TestGetOwnPropertySymbols() |
+ |
+ |
+function TestSealAndFreeze(freeze) { |
+ var sym = %CreatePrivateSymbol("private") |
+ var obj = {} |
+ obj[sym] = 1 |
+ freeze(obj) |
+ obj[sym] = 2 |
+ assertEquals(2, obj[sym]) |
+ assertTrue(delete obj[sym]) |
+ assertEquals(undefined, obj[sym]) |
+} |
+TestSealAndFreeze(Object.seal) |
+TestSealAndFreeze(Object.freeze) |
+TestSealAndFreeze(Object.preventExtensions) |