Index: test/mjsunit/object-freeze.js |
diff --git a/test/mjsunit/object-freeze.js b/test/mjsunit/object-freeze.js |
index a48251304d85c536c055261c88867f623df97d99..5d1f8b7c5b0abb092639c90945c70aec48753a44 100644 |
--- a/test/mjsunit/object-freeze.js |
+++ b/test/mjsunit/object-freeze.js |
@@ -339,3 +339,12 @@ obj.__proto__[1] = 1; |
assertEquals(1, obj[1]); |
Object.freeze(obj); |
assertThrows(function() { obj.unshift(); }, TypeError); |
+ |
+// Sealing and then Freezing should do the right thing. |
+var obj = { foo: 'bar', 0: 'element' }; |
+Object.seal(obj); |
+assertTrue(Object.isSealed(obj)); |
+assertFalse(Object.isFrozen(obj)); |
+Object.freeze(obj); |
+assertTrue(Object.isSealed(obj)); |
+assertTrue(Object.isFrozen(obj)); |