Index: test/mjsunit/harmony/object-literals-method.js |
diff --git a/test/mjsunit/harmony/object-literals-method.js b/test/mjsunit/harmony/object-literals-method.js |
index 605e269fcb08f4f72d08e732200c2192a1ca508f..3a3673b365b9c10bbc7e6c8ceaf211bce89ec7b7 100644 |
--- a/test/mjsunit/harmony/object-literals-method.js |
+++ b/test/mjsunit/harmony/object-literals-method.js |
@@ -104,6 +104,30 @@ |
})(); |
+(function TestNoRestrictedPropertiesStrict() { |
+ var obj = { |
+ method() { "use strict"; } |
+ }; |
+ assertEquals(false, obj.method.hasOwnProperty("arguments")); |
+ assertEquals(null, obj.method.arguments); |
+ |
+ assertEquals(false, obj.method.hasOwnProperty("caller")); |
+ assertEquals(null, obj.method.caller); |
+})(); |
+ |
+ |
+(function TestNoRestrictedPropertiesSloppy() { |
+ var obj = { |
+ method() {} |
+ }; |
+ assertEquals(false, obj.method.hasOwnProperty("arguments")); |
+ assertEquals(null, obj.method.arguments); |
+ |
+ assertEquals(false, obj.method.hasOwnProperty("caller")); |
+ assertEquals(null, obj.method.caller); |
+})(); |
+ |
+ |
(function TestToString() { |
var object = { |
method() { 42; } |