| 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..c396f83de59e126beb709aa8436c81cc09c77499 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"; }
|
| + };
|
| + assertFalse(obj.method.hasOwnProperty("arguments"));
|
| + assertThrows(function() { return obj.method.arguments; }, TypeError);
|
| +
|
| + assertFalse(obj.method.hasOwnProperty("caller"));
|
| + assertThrows(function() { return obj.method.caller; }, TypeError);
|
| +})();
|
| +
|
| +
|
| +(function TestNoRestrictedPropertiesSloppy() {
|
| + var obj = {
|
| + method() {}
|
| + };
|
| + assertFalse(obj.method.hasOwnProperty("arguments"));
|
| + assertThrows(function() { return obj.method.arguments; }, TypeError);
|
| +
|
| + assertFalse(obj.method.hasOwnProperty("caller"));
|
| + assertThrows(function() { return obj.method.caller; }, TypeError);
|
| +})();
|
| +
|
| +
|
| (function TestToString() {
|
| var object = {
|
| method() { 42; }
|
|
|