1# 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: Duplicate parameter name not allowed in this context. 73PASS (function(){(function (a, a){'use strict';})}) threw exception SyntaxError: Duplicate parameter name not allowed in this context. 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' and 'arguments' are restricted function properties and cannot be accessed in this context.. 85PASS (function f(){'use strict'; f.caller; })() threw exception TypeError: 'caller' and 'arguments' are restricted function properties and cannot be accessed in this context.. 86PASS (function f(){'use strict'; f.arguments=5; })() threw exception TypeError: 'caller' and 'arguments' are restricted function properties and cannot be accessed in this context.. 87PASS (function f(){'use strict'; f.caller=5; })() threw exception TypeError: 'caller' and 'arguments' are restricted function properties and cannot be accessed in this context.. 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' and 'arguments' are restricted function properties and cannot be accessed in this context.. 91PASS (function f(arg){'use strict'; f.caller; })() threw exception TypeError: 'caller' and 'arguments' are restricted function properties and cannot be accessed in this context.. 92PASS (function f(arg){'use strict'; f.arguments=5; })() threw exception TypeError: 'caller' and 'arguments' are restricted function properties and cannot be accessed in this context.. 93PASS (function f(arg){'use strict'; f.caller=5; })() threw exception TypeError: 'caller' and 'arguments' are restricted function properties and cannot be accessed in this context.. 94PASS "caller" in function(){"use strict"} is true 95PASS (function(){"use strict";}).hasOwnProperty("caller") is false 96PASS (function(){"use strict";}).__proto__.hasOwnProperty("caller") is true 97PASS "arguments" in function(){"use strict"} is true 98PASS (function(){"use strict";}).hasOwnProperty("arguments") is false 99PASS (function(){"use strict";}).__proto__.hasOwnProperty("arguments") is true 100PASS 'use strict'; (function (){with(1){};}) threw exception SyntaxError: Strict mode code may not include a with statement. 101PASS (function(){'use strict'; (function (){with(1){};})}) threw exception SyntaxError: Strict mode code may not include a with statement. 102PASS 'use strict'; (function (){var a; delete a;}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. 103PASS (function(){'use strict'; (function (){var a; delete a;})}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. 104PASS 'use strict'; var a; (function (){ delete a;}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. 105PASS (function(){'use strict'; var a; (function (){ delete a;})}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. 106PASS var a; (function (){ 'use strict'; delete a;}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. 107PASS (function(){var a; (function (){ 'use strict'; delete a;})}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. 108PASS 'misc directive'; 'use strict'; with({}){} threw exception SyntaxError: Strict mode code may not include a with statement. 109PASS (function(){'misc directive'; 'use strict'; with({}){}}) threw exception SyntaxError: Strict mode code may not include a with statement. 110PASS 'use strict'; return threw exception SyntaxError: Illegal return statement. 111PASS 'use strict'; break threw exception SyntaxError: Illegal break statement. 112PASS (function(){'use strict'; break}) threw exception SyntaxError: Illegal break statement. 113PASS 'use strict'; continue threw exception SyntaxError: Illegal continue statement. 114PASS (function(){'use strict'; continue}) threw exception SyntaxError: Illegal continue statement. 115PASS 'use strict'; for(;;)return threw exception SyntaxError: Illegal return statement. 116PASS 'use strict'; for(;;)break missingLabel threw exception SyntaxError: Undefined label 'missingLabel'. 117PASS (function(){'use strict'; for(;;)break missingLabel}) threw exception SyntaxError: Undefined label 'missingLabel'. 118PASS 'use strict'; for(;;)continue missingLabel threw exception SyntaxError: Undefined label 'missingLabel'. 119PASS (function(){'use strict'; for(;;)continue missingLabel}) threw exception SyntaxError: Undefined label 'missingLabel'. 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 'use strict'; '\007'; threw exception SyntaxError: Octal literals are not allowed in strict mode.. 123PASS (function(){'use strict'; '\007';}) threw exception SyntaxError: Octal literals are not allowed in strict mode.. 124PASS '\007'; 'use strict'; threw exception SyntaxError: Octal literals are not allowed in strict mode.. 125PASS (function(){'\007'; 'use strict';}) threw exception SyntaxError: Octal literals are not allowed in strict mode.. 126PASS 'use strict'; delete aDeletableProperty; threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. 127PASS (function(){'use strict'; delete aDeletableProperty;}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. 128PASS 'use strict'; (function (){ delete someDeclaredGlobal;}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. 129PASS (function(){'use strict'; (function (){ delete someDeclaredGlobal;})}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. 130PASS (function (){ 'use strict'; delete someDeclaredGlobal;}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. 131PASS (function(){(function (){ 'use strict'; delete someDeclaredGlobal;})}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. 132PASS 'use strict'; if (0) { someGlobal = 'Shouldn\'t be able to assign this.'; }; true; is true 133PASS 'use strict'; someGlobal = 'Shouldn\'t be able to assign this.'; threw exception ReferenceError: someGlobal is not defined. 134PASS 'use strict'; (function f(){ f = 'shouldn\'t be able to assign to function expression name'; })() threw exception TypeError: Assignment to constant variable.. 135PASS 'use strict'; eval('var introducedVariable = "FAIL: variable introduced into containing scope";'); introducedVariable threw exception ReferenceError: introducedVariable is not defined. 136PASS 'use strict'; objectWithReadonlyProperty.prop = 'fail' threw exception TypeError: Cannot assign to read only property 'prop' of object '#<Object>'. 137PASS 'use strict'; delete objectWithReadonlyProperty.prop threw exception TypeError: Cannot delete property 'prop' of #<Object>. 138PASS 'use strict'; delete objectWithReadonlyProperty[readonlyPropName] threw exception TypeError: Cannot delete property 'prop' of #<Object>. 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'; eval-- threw exception SyntaxError: Unexpected eval or arguments in strict mode. 146PASS (function(){'use strict'; eval--}) 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 'use strict'; function f() { arguments-- } threw exception SyntaxError: Unexpected eval or arguments in strict mode. 154PASS (function(){'use strict'; function f() { arguments-- }}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. 155PASS global.eval('"use strict"; if (0) ++arguments; true;') threw exception SyntaxError: Unexpected eval or arguments in strict mode. 156PASS 'use strict'; ++(1, eval) threw exception ReferenceError: Invalid left-hand side expression in prefix operation. 157PASS (function(){'use strict'; ++(1, eval)}) threw exception ReferenceError: Invalid left-hand side expression in prefix operation. 158PASS 'use strict'; (1, eval)++ threw exception ReferenceError: Invalid left-hand side expression in postfix operation. 159PASS (function(){'use strict'; (1, eval)++}) threw exception ReferenceError: Invalid left-hand side expression in postfix operation. 160PASS 'use strict'; --(1, eval) threw exception ReferenceError: Invalid left-hand side expression in prefix operation. 161PASS (function(){'use strict'; --(1, eval)}) threw exception ReferenceError: Invalid left-hand side expression in prefix operation. 162PASS 'use strict'; (1, eval)-- threw exception ReferenceError: Invalid left-hand side expression in postfix operation. 163PASS (function(){'use strict'; (1, eval)--}) threw exception ReferenceError: Invalid left-hand side expression in postfix operation. 164PASS 'use strict'; function f() { ++(1, arguments) } threw exception ReferenceError: Invalid left-hand side expression in prefix operation. 165PASS (function(){'use strict'; function f() { ++(1, arguments) }}) threw exception ReferenceError: Invalid left-hand side expression in prefix operation. 166PASS 'use strict'; function f() { (1, arguments)++ } threw exception ReferenceError: Invalid left-hand side expression in postfix operation. 167PASS (function(){'use strict'; function f() { (1, arguments)++ }}) threw exception ReferenceError: Invalid left-hand side expression in postfix operation. 168PASS 'use strict'; function f() { --(1, arguments) } threw exception ReferenceError: Invalid left-hand side expression in prefix operation. 169PASS (function(){'use strict'; function f() { --(1, arguments) }}) threw exception ReferenceError: Invalid left-hand side expression in prefix operation. 170PASS 'use strict'; function f() { (1, arguments)-- } threw exception ReferenceError: Invalid left-hand side expression in postfix operation. 171PASS (function(){'use strict'; function f() { (1, arguments)-- }}) threw exception ReferenceError: Invalid left-hand side expression in postfix operation. 172FAIL 'use strict'; undefined; if (0) delete +a.b should throw an exception. Was undefined. 173FAIL (function(){'use strict'; undefined; if (0) delete +a.b}) should throw an exception. Was function (){'use strict'; undefined; if (0) delete +a.b}. 174FAIL 'use strict'; undefined; if (0) delete ++a.b should throw an exception. Was undefined. 175FAIL (function(){'use strict'; undefined; if (0) delete ++a.b}) should throw an exception. Was function (){'use strict'; undefined; if (0) delete ++a.b}. 176FAIL 'use strict'; undefined; if (0) delete void a.b should throw an exception. Was undefined. 177FAIL (function(){'use strict'; undefined; if (0) delete void a.b}) should throw an exception. Was function (){'use strict'; undefined; if (0) delete void a.b}. 178PASS (function (a){'use strict'; a = false; return a !== arguments[0]; })(true) is true 179PASS (function (a){'use strict'; arguments[0] = false; return a !== arguments[0]; })(true) is true 180PASS (function (a){'use strict'; a=false; return arguments; })(true)[0] is true 181PASS (function (a){'use strict'; arguments[0]=false; return a; })(true) is true 182PASS (function (a){'use strict'; arguments[0]=true; return arguments; })(false)[0] is true 183PASS (function (){'use strict'; arguments[0]=true; return arguments; })(false)[0] is true 184PASS (function (a){'use strict'; arguments[0]=true; a=false; return arguments; })()[0] is true 185PASS (function (a){'use strict'; arguments[0]=false; a=true; return a; })() is true 186PASS (function (a){'use strict'; arguments[0]=true; return arguments; })()[0] is true 187PASS (function (){'use strict'; arguments[0]=true; return arguments; })()[0] is true 188PASS (function (a){'use strict'; var local; (function (){local;})(); a = false; return a !== arguments[0]; })(true) is true 189PASS (function (a){'use strict'; var local; (function (){local;})(); arguments[0] = false; return a !== arguments[0]; })(true) is true 190PASS (function (a){'use strict'; var local; (function (){local;})(); a=false; return arguments; })(true)[0] is true 191PASS (function (a){'use strict'; var local; (function (){local;})(); arguments[0]=false; return a; })(true) is true 192PASS (function (a){'use strict'; var local; (function (){local;})(); arguments[0]=true; return arguments; })(false)[0] is true 193PASS (function (){'use strict'; var local; (function (){local;})(); arguments[0]=true; return arguments; })(false)[0] is true 194PASS (function (a){'use strict'; var local; (function (){local;})(); arguments[0]=true; a=false; return arguments; })()[0] is true 195PASS (function (a){'use strict'; var local; (function (){local;})(); arguments[0]=true; return arguments; })()[0] is true 196PASS (function (a){'use strict'; var local; (function (){local;})(); arguments[0]=false; a=true; return a; })() is true 197PASS (function (){'use strict'; var local; (function (){local;})(); arguments[0]=true; return arguments; })()[0] is true 198PASS 'use strict'; (function (){var a = true; eval('var a = false'); return a; })() is true 199PASS (function (){var a = true; eval('"use strict"; var a = false'); return a; })() is true 200PASS (function f(arg){'use strict'; return Object.getOwnPropertyDescriptor(f.__proto__, 'arguments').value; })() is undefined. 201PASS (function f(arg){'use strict'; return Object.getOwnPropertyDescriptor(f.__proto__, 'caller').value; })() is undefined. 202PASS (function f(arg){'use strict'; return Object.getOwnPropertyDescriptor(arguments, 'callee').value; })() is undefined. 203PASS (function f(arg){'use strict'; return Object.getOwnPropertyDescriptor(arguments, 'caller').value; })() is undefined. 204PASS (function f(arg){'use strict'; var descriptor = Object.getOwnPropertyDescriptor(arguments, 'caller'); return descriptor.get === descriptor.set; })() is true 205PASS (function f(arg){'use strict'; var descriptor = Object.getOwnPropertyDescriptor(arguments, 'callee'); return descriptor.get === descriptor.set; })() is true 206PASS (function f(arg){'use strict'; var descriptor = Object.getOwnPropertyDescriptor(f.__proto__, 'caller'); return descriptor.get === descriptor.set; })() is true 207PASS (function f(arg){'use strict'; var descriptor = Object.getOwnPropertyDescriptor(f.__proto__, 'arguments'); return descriptor.get === descriptor.set; })() is true 208PASS 'use strict'; (function f() { for(var i in this); })(); true; is true 209PASS 'use strict'̻ threw exception SyntaxError: Unexpected token ILLEGAL. 210PASS (function(){'use strict'̻}) threw exception SyntaxError: Unexpected token ILLEGAL. 211PASS 'use strict'5.f threw exception SyntaxError: Unexpected token ILLEGAL. 212PASS (function(){'use strict'5.f}) threw exception SyntaxError: Unexpected token ILLEGAL. 213PASS 'use strict';̻ threw exception SyntaxError: Unexpected token ILLEGAL. 214PASS (function(){'use strict';̻}) threw exception SyntaxError: Unexpected token ILLEGAL. 215PASS 'use strict';5.f threw exception SyntaxError: Unexpected token ILLEGAL. 216PASS (function(){'use strict';5.f}) threw exception SyntaxError: Unexpected token ILLEGAL. 217PASS 'use strict';1-(eval=1); threw exception SyntaxError: Unexpected eval or arguments in strict mode. 218PASS (function(){'use strict';1-(eval=1);}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. 219PASS 'use strict';arguments=1; threw exception SyntaxError: Unexpected eval or arguments in strict mode. 220PASS (function(){'use strict';arguments=1;}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. 221PASS 'use strict';1-(arguments=1); threw exception SyntaxError: Unexpected eval or arguments in strict mode. 222PASS (function(){'use strict';1-(arguments=1);}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. 223PASS 'use strict';var a=(eval=1); threw exception SyntaxError: Unexpected eval or arguments in strict mode. 224PASS (function(){'use strict';var a=(eval=1);}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. 225PASS 'use strict';var a=(arguments=1); threw exception SyntaxError: Unexpected eval or arguments in strict mode. 226PASS (function(){'use strict';var a=(arguments=1);}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. 227PASS 'use strict'; try { throw 1; } catch (e) { aGlobal = true; } is true 228PASS 'use strict'; (function () { try { throw 1; } catch (e) { aGlobal = true; }})(); aGlobal; is true 229PASS (function () {'use strict'; try { throw 1; } catch (e) { aGlobal = true; }})(); aGlobal; is true 230PASS try { throw 1; } catch (e) { aGlobal = true; } is true 231PASS (function () { try { throw 1; } catch (e) { aGlobal = true; }})(); aGlobal; is true 232PASS (function () {try { throw 1; } catch (e) { aGlobal = true; }})(); aGlobal; is true 233FAIL String(Object.getOwnPropertyDescriptor((function() { "use strict"; }).__proto__, "caller").get) should be function () { 234 [native code] 235}. Was function ThrowTypeError() { [native code] }. 236PASS successfullyParsed is true 237 238TEST COMPLETE 239 240