blob: 45f71bfa65c807d57ca11b906a50d4ca4aac3abd [file] [log] [blame]
Ben Murdochb8a8cc12014-11-26 15:28:44 +00001# Copyright 2013 the V8 project authors. All rights reserved.
2# Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions
6# are met:
7# 1. Redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer.
9# 2. Redistributions in binary form must reproduce the above copyright
10# notice, this list of conditions and the following disclaimer in the
11# documentation and/or other materials provided with the distribution.
12#
13# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
14# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
17# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
24Test behaviour of strict mode
25
26On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
27
28
29PASS testThis.call(null) is null
30PASS testThis.call(1) is 1
31PASS testThis.call(true) is true
32PASS testThis.call(false) is false
33PASS testThis.call(undefined) is undefined
34PASS testLineContinuation.call(undefined) === undefined is false
35PASS testEscapeSequence.call(undefined) === undefined is false
36PASS testThis.call('a string') is 'a string'
37PASS testThisDotAccess.call('a string') is 'a string'.length
38PASS testThisDotAccess.call(null) threw exception TypeError: Cannot read property 'length' of null.
39PASS testThisDotAccess.call(undefined) threw exception TypeError: Cannot read property 'length' of undefined.
40PASS testThisDotAccess.call(true) is undefined.
41PASS testThisDotAccess.call(false) is undefined.
42PASS testThisDotAccess.call(1) is undefined.
43PASS testThisBracketAccess.call('a string', 'length') is 'a string'.length
44PASS testThisBracketAccess.call(null, 'length') threw exception TypeError: Cannot read property 'length' of null.
45PASS testThisBracketAccess.call(undefined, 'length') threw exception TypeError: Cannot read property 'length' of undefined.
46PASS testThisBracketAccess.call(true, 'length') is undefined.
47PASS testThisBracketAccess.call(false, 'length') is undefined.
48PASS testThisBracketAccess.call(1, 'length') is undefined.
49PASS Function('"use strict"; return this;')() is undefined.
50PASS Function('"use strict"; with({});') threw exception SyntaxError: Strict mode code may not include a with statement.
51PASS testGlobalAccess() is undefined
52PASS testThis.call() is undefined
53PASS testThis.apply() is undefined
54PASS testThis.call(undefined) is undefined
55PASS testThis.apply(undefined) is undefined
56PASS (function eval(){'use strict';}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
57PASS (function(){(function eval(){'use strict';})}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
58PASS (function (eval){'use strict';}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
59PASS (function(){(function (eval){'use strict';})}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
60PASS (function arguments(){'use strict';}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
61PASS (function(){(function arguments(){'use strict';})}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
62PASS (function (arguments){'use strict';}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
63PASS (function(){(function (arguments){'use strict';})}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
64PASS (function (){'use strict'; var eval;}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
65PASS (function(){(function (){'use strict'; var eval;})}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
66PASS (function (){'use strict'; var arguments;}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
67PASS (function(){(function (){'use strict'; var arguments;})}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
68PASS (function (){'use strict'; try{}catch(eval){}}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
69PASS (function(){(function (){'use strict'; try{}catch(eval){}})}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
70PASS (function (){'use strict'; try{}catch(arguments){}}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
71PASS (function(){(function (){'use strict'; try{}catch(arguments){}})}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
72PASS (function (a, a){'use strict';}) threw exception SyntaxError: Strict mode function may not have duplicate parameter names.
73PASS (function(){(function (a, a){'use strict';})}) threw exception SyntaxError: Strict mode function may not have duplicate parameter names.
74PASS (function (a){'use strict'; delete a;})() threw exception SyntaxError: Delete of an unqualified identifier in strict mode..
75PASS (function(){(function (a){'use strict'; delete a;})()}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode..
76PASS (function (){'use strict'; var a; delete a;})() threw exception SyntaxError: Delete of an unqualified identifier in strict mode..
77PASS (function(){(function (){'use strict'; var a; delete a;})()}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode..
78PASS (function (){var a; function f() {'use strict'; delete a;} })() threw exception SyntaxError: Delete of an unqualified identifier in strict mode..
79PASS (function(){(function (){var a; function f() {'use strict'; delete a;} })()}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode..
80PASS (function (){'use strict'; with(1){};}) threw exception SyntaxError: Strict mode code may not include a with statement.
81PASS (function(){(function (){'use strict'; with(1){};})}) threw exception SyntaxError: Strict mode code may not include a with statement.
82PASS (function (){'use strict'; arguments.callee; })() threw exception TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them.
83PASS (function (){'use strict'; arguments.caller; })() threw exception TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them.
84PASS (function f(){'use strict'; f.arguments; })() threw exception TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them.
85PASS (function f(){'use strict'; f.caller; })() threw exception TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them.
86PASS (function f(){'use strict'; f.arguments=5; })() threw exception TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them.
87PASS (function f(){'use strict'; f.caller=5; })() threw exception TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them.
88PASS (function (arg){'use strict'; arguments.callee; })() threw exception TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them.
89PASS (function (arg){'use strict'; arguments.caller; })() threw exception TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them.
90PASS (function f(arg){'use strict'; f.arguments; })() threw exception TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them.
91PASS (function f(arg){'use strict'; f.caller; })() threw exception TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them.
92PASS (function f(arg){'use strict'; f.arguments=5; })() threw exception TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them.
93PASS (function f(arg){'use strict'; f.caller=5; })() threw exception TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them.
94PASS "caller" in function(){"use strict"} is true
95PASS (function(){"use strict";}).hasOwnProperty("caller") is true
96PASS "arguments" in function(){"use strict"} is true
97PASS (function(){"use strict";}).hasOwnProperty("arguments") is true
98PASS 'use strict'; (function (){with(1){};}) threw exception SyntaxError: Strict mode code may not include a with statement.
99PASS (function(){'use strict'; (function (){with(1){};})}) threw exception SyntaxError: Strict mode code may not include a with statement.
100PASS 'use strict'; (function (){var a; delete a;}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode..
101PASS (function(){'use strict'; (function (){var a; delete a;})}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode..
102PASS 'use strict'; var a; (function (){ delete a;}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode..
103PASS (function(){'use strict'; var a; (function (){ delete a;})}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode..
104PASS var a; (function (){ 'use strict'; delete a;}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode..
105PASS (function(){var a; (function (){ 'use strict'; delete a;})}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode..
106PASS 'misc directive'; 'use strict'; with({}){} threw exception SyntaxError: Strict mode code may not include a with statement.
107PASS (function(){'misc directive'; 'use strict'; with({}){}}) threw exception SyntaxError: Strict mode code may not include a with statement.
108PASS 'use strict'; return threw exception SyntaxError: Illegal return statement.
109PASS 'use strict'; break threw exception SyntaxError: Illegal break statement.
110PASS (function(){'use strict'; break}) threw exception SyntaxError: Illegal break statement.
111PASS 'use strict'; continue threw exception SyntaxError: Illegal continue statement.
112PASS (function(){'use strict'; continue}) threw exception SyntaxError: Illegal continue statement.
113PASS 'use strict'; for(;;)return threw exception SyntaxError: Illegal return statement.
114PASS 'use strict'; for(;;)break missingLabel threw exception SyntaxError: Undefined label 'missingLabel'.
115PASS (function(){'use strict'; for(;;)break missingLabel}) threw exception SyntaxError: Undefined label 'missingLabel'.
116PASS 'use strict'; for(;;)continue missingLabel threw exception SyntaxError: Undefined label 'missingLabel'.
117PASS (function(){'use strict'; for(;;)continue missingLabel}) threw exception SyntaxError: Undefined label 'missingLabel'.
118PASS 'use strict'; 007; threw exception SyntaxError: Octal literals are not allowed in strict mode..
119PASS (function(){'use strict'; 007;}) threw exception SyntaxError: Octal literals are not allowed in strict mode..
120PASS 'use strict'; '\007'; threw exception SyntaxError: Octal literals are not allowed in strict mode..
121PASS (function(){'use strict'; '\007';}) threw exception SyntaxError: Octal literals are not allowed in strict mode..
122PASS '\007'; 'use strict'; threw exception SyntaxError: Octal literals are not allowed in strict mode..
123PASS (function(){'\007'; 'use strict';}) threw exception SyntaxError: Octal literals are not allowed in strict mode..
124PASS 'use strict'; delete aDeletableProperty; threw exception SyntaxError: Delete of an unqualified identifier in strict mode..
125PASS (function(){'use strict'; delete aDeletableProperty;}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode..
126PASS 'use strict'; (function (){ delete someDeclaredGlobal;}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode..
127PASS (function(){'use strict'; (function (){ delete someDeclaredGlobal;})}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode..
128PASS (function (){ 'use strict'; delete someDeclaredGlobal;}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode..
129PASS (function(){(function (){ 'use strict'; delete someDeclaredGlobal;})}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode..
130PASS 'use strict'; if (0) { someGlobal = 'Shouldn\'t be able to assign this.'; }; true; is true
131PASS 'use strict'; someGlobal = 'Shouldn\'t be able to assign this.'; threw exception ReferenceError: someGlobal is not defined.
132FAIL 'use strict'; (function f(){ f = 'shouldn\'t be able to assign to function expression name'; })() should throw an exception. Was undefined.
133PASS 'use strict'; eval('var introducedVariable = "FAIL: variable introduced into containing scope";'); introducedVariable threw exception ReferenceError: introducedVariable is not defined.
134PASS 'use strict'; objectWithReadonlyProperty.prop = 'fail' threw exception TypeError: Cannot assign to read only property 'prop' of #<Object>.
135PASS 'use strict'; delete objectWithReadonlyProperty.prop threw exception TypeError: Cannot delete property 'prop' of #<Object>.
136PASS 'use strict'; delete objectWithReadonlyProperty[readonlyPropName] threw exception TypeError: Cannot delete property 'prop' of #<Object>.
137PASS 'use strict'; ++eval threw exception SyntaxError: Unexpected eval or arguments in strict mode.
138PASS (function(){'use strict'; ++eval}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
139PASS 'use strict'; eval++ threw exception SyntaxError: Unexpected eval or arguments in strict mode.
140PASS (function(){'use strict'; eval++}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
141PASS 'use strict'; --eval threw exception SyntaxError: Unexpected eval or arguments in strict mode.
142PASS (function(){'use strict'; --eval}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
143PASS 'use strict'; eval-- threw exception SyntaxError: Unexpected eval or arguments in strict mode.
144PASS (function(){'use strict'; eval--}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
145PASS 'use strict'; function f() { ++arguments } threw exception SyntaxError: Unexpected eval or arguments in strict mode.
146PASS (function(){'use strict'; function f() { ++arguments }}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
147PASS 'use strict'; function f() { arguments++ } threw exception SyntaxError: Unexpected eval or arguments in strict mode.
148PASS (function(){'use strict'; function f() { arguments++ }}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
149PASS 'use strict'; function f() { --arguments } threw exception SyntaxError: Unexpected eval or arguments in strict mode.
150PASS (function(){'use strict'; function f() { --arguments }}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
151PASS 'use strict'; function f() { arguments-- } threw exception SyntaxError: Unexpected eval or arguments in strict mode.
152PASS (function(){'use strict'; function f() { arguments-- }}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
153PASS global.eval('"use strict"; if (0) ++arguments; true;') threw exception SyntaxError: Unexpected eval or arguments in strict mode.
154PASS 'use strict'; ++(1, eval) threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
155PASS (function(){'use strict'; ++(1, eval)}) threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
156PASS 'use strict'; (1, eval)++ threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
157PASS (function(){'use strict'; (1, eval)++}) threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
158PASS 'use strict'; --(1, eval) threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
159PASS (function(){'use strict'; --(1, eval)}) threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
160PASS 'use strict'; (1, eval)-- threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
161PASS (function(){'use strict'; (1, eval)--}) threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
162PASS 'use strict'; function f() { ++(1, arguments) } threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
163PASS (function(){'use strict'; function f() { ++(1, arguments) }}) threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
164PASS 'use strict'; function f() { (1, arguments)++ } threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
165PASS (function(){'use strict'; function f() { (1, arguments)++ }}) threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
166PASS 'use strict'; function f() { --(1, arguments) } threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
167PASS (function(){'use strict'; function f() { --(1, arguments) }}) threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
168PASS 'use strict'; function f() { (1, arguments)-- } threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
169PASS (function(){'use strict'; function f() { (1, arguments)-- }}) threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
170FAIL 'use strict'; if (0) delete +a.b should throw an exception. Was use strict.
171FAIL (function(){'use strict'; if (0) delete +a.b}) should throw an exception. Was function (){'use strict'; if (0) delete +a.b}.
172FAIL 'use strict'; if (0) delete ++a.b should throw an exception. Was use strict.
173FAIL (function(){'use strict'; if (0) delete ++a.b}) should throw an exception. Was function (){'use strict'; if (0) delete ++a.b}.
174FAIL 'use strict'; if (0) delete void a.b should throw an exception. Was use strict.
175FAIL (function(){'use strict'; if (0) delete void a.b}) should throw an exception. Was function (){'use strict'; if (0) delete void a.b}.
176PASS (function (a){'use strict'; a = false; return a !== arguments[0]; })(true) is true
177PASS (function (a){'use strict'; arguments[0] = false; return a !== arguments[0]; })(true) is true
178PASS (function (a){'use strict'; a=false; return arguments; })(true)[0] is true
179PASS (function (a){'use strict'; arguments[0]=false; return a; })(true) is true
180PASS (function (a){'use strict'; arguments[0]=true; return arguments; })(false)[0] is true
181PASS (function (){'use strict'; arguments[0]=true; return arguments; })(false)[0] is true
182PASS (function (a){'use strict'; arguments[0]=true; a=false; return arguments; })()[0] is true
183PASS (function (a){'use strict'; arguments[0]=false; a=true; return a; })() is true
184PASS (function (a){'use strict'; arguments[0]=true; return arguments; })()[0] is true
185PASS (function (){'use strict'; arguments[0]=true; return arguments; })()[0] is true
186PASS (function (a){'use strict'; var local; (function (){local;})(); a = false; return a !== arguments[0]; })(true) is true
187PASS (function (a){'use strict'; var local; (function (){local;})(); arguments[0] = false; return a !== arguments[0]; })(true) is true
188PASS (function (a){'use strict'; var local; (function (){local;})(); a=false; return arguments; })(true)[0] is true
189PASS (function (a){'use strict'; var local; (function (){local;})(); arguments[0]=false; return a; })(true) is true
190PASS (function (a){'use strict'; var local; (function (){local;})(); arguments[0]=true; return arguments; })(false)[0] is true
191PASS (function (){'use strict'; var local; (function (){local;})(); arguments[0]=true; return arguments; })(false)[0] is true
192PASS (function (a){'use strict'; var local; (function (){local;})(); arguments[0]=true; a=false; return arguments; })()[0] is true
193PASS (function (a){'use strict'; var local; (function (){local;})(); arguments[0]=true; return arguments; })()[0] is true
194PASS (function (a){'use strict'; var local; (function (){local;})(); arguments[0]=false; a=true; return a; })() is true
195PASS (function (){'use strict'; var local; (function (){local;})(); arguments[0]=true; return arguments; })()[0] is true
196PASS 'use strict'; (function (){var a = true; eval('var a = false'); return a; })() is true
197PASS (function (){var a = true; eval('"use strict"; var a = false'); return a; })() is true
198PASS (function f(arg){'use strict'; return Object.getOwnPropertyDescriptor(f, 'arguments').value; })() is undefined.
199PASS (function f(arg){'use strict'; return Object.getOwnPropertyDescriptor(f, 'caller').value; })() is undefined.
200PASS (function f(arg){'use strict'; return Object.getOwnPropertyDescriptor(arguments, 'callee').value; })() is undefined.
201PASS (function f(arg){'use strict'; return Object.getOwnPropertyDescriptor(arguments, 'caller').value; })() is undefined.
202PASS (function f(arg){'use strict'; var descriptor = Object.getOwnPropertyDescriptor(arguments, 'caller'); return descriptor.get === descriptor.set; })() is true
203PASS (function f(arg){'use strict'; var descriptor = Object.getOwnPropertyDescriptor(arguments, 'callee'); return descriptor.get === descriptor.set; })() is true
204PASS (function f(arg){'use strict'; var descriptor = Object.getOwnPropertyDescriptor(f, 'caller'); return descriptor.get === descriptor.set; })() is true
205PASS (function f(arg){'use strict'; var descriptor = Object.getOwnPropertyDescriptor(f, 'arguments'); return descriptor.get === descriptor.set; })() is true
206PASS 'use strict'; (function f() { for(var i in this); })(); true; is true
207PASS 'use strict'̻ threw exception SyntaxError: Unexpected token ILLEGAL.
208PASS (function(){'use strict'̻}) threw exception SyntaxError: Unexpected token ILLEGAL.
209PASS 'use strict'5.f threw exception SyntaxError: Unexpected token ILLEGAL.
210PASS (function(){'use strict'5.f}) threw exception SyntaxError: Unexpected token ILLEGAL.
211PASS 'use strict' threw exception SyntaxError: Unexpected token ILLEGAL.
212PASS (function(){'use strict';̻}) threw exception SyntaxError: Unexpected token ILLEGAL.
213PASS 'use strict';5.f threw exception SyntaxError: Unexpected token ILLEGAL.
214PASS (function(){'use strict';5.f}) threw exception SyntaxError: Unexpected token ILLEGAL.
215PASS 'use strict';1-(eval=1); threw exception SyntaxError: Unexpected eval or arguments in strict mode.
216PASS (function(){'use strict';1-(eval=1);}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
217PASS 'use strict';arguments=1; threw exception SyntaxError: Unexpected eval or arguments in strict mode.
218PASS (function(){'use strict';arguments=1;}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
219PASS 'use strict';1-(arguments=1); threw exception SyntaxError: Unexpected eval or arguments in strict mode.
220PASS (function(){'use strict';1-(arguments=1);}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
221PASS 'use strict';var a=(eval=1); threw exception SyntaxError: Unexpected eval or arguments in strict mode.
222PASS (function(){'use strict';var a=(eval=1);}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
223PASS 'use strict';var a=(arguments=1); threw exception SyntaxError: Unexpected eval or arguments in strict mode.
224PASS (function(){'use strict';var a=(arguments=1);}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
225PASS 'use strict'; try { throw 1; } catch (e) { aGlobal = true; } is true
226PASS 'use strict'; (function () { try { throw 1; } catch (e) { aGlobal = true; }})(); aGlobal; is true
227PASS (function () {'use strict'; try { throw 1; } catch (e) { aGlobal = true; }})(); aGlobal; is true
228PASS try { throw 1; } catch (e) { aGlobal = true; } is true
229PASS (function () { try { throw 1; } catch (e) { aGlobal = true; }})(); aGlobal; is true
230PASS (function () {try { throw 1; } catch (e) { aGlobal = true; }})(); aGlobal; is true
231FAIL String(Object.getOwnPropertyDescriptor(function() { "use strict"; }, "caller").get) should be function () {
232 [native code]
233}. Was function ThrowTypeError() { [native code] }.
234PASS successfullyParsed is true
235
236TEST COMPLETE
237