Ben Murdoch | b8a8cc1 | 2014-11-26 15:28:44 +0000 | [diff] [blame^] | 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 | |
| 24 | Test behaviour of strict mode |
| 25 | |
| 26 | On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| 27 | |
| 28 | |
| 29 | PASS testThis.call(null) is null |
| 30 | PASS testThis.call(1) is 1 |
| 31 | PASS testThis.call(true) is true |
| 32 | PASS testThis.call(false) is false |
| 33 | PASS testThis.call(undefined) is undefined |
| 34 | PASS testLineContinuation.call(undefined) === undefined is false |
| 35 | PASS testEscapeSequence.call(undefined) === undefined is false |
| 36 | PASS testThis.call('a string') is 'a string' |
| 37 | PASS testThisDotAccess.call('a string') is 'a string'.length |
| 38 | PASS testThisDotAccess.call(null) threw exception TypeError: Cannot read property 'length' of null. |
| 39 | PASS testThisDotAccess.call(undefined) threw exception TypeError: Cannot read property 'length' of undefined. |
| 40 | PASS testThisDotAccess.call(true) is undefined. |
| 41 | PASS testThisDotAccess.call(false) is undefined. |
| 42 | PASS testThisDotAccess.call(1) is undefined. |
| 43 | PASS testThisBracketAccess.call('a string', 'length') is 'a string'.length |
| 44 | PASS testThisBracketAccess.call(null, 'length') threw exception TypeError: Cannot read property 'length' of null. |
| 45 | PASS testThisBracketAccess.call(undefined, 'length') threw exception TypeError: Cannot read property 'length' of undefined. |
| 46 | PASS testThisBracketAccess.call(true, 'length') is undefined. |
| 47 | PASS testThisBracketAccess.call(false, 'length') is undefined. |
| 48 | PASS testThisBracketAccess.call(1, 'length') is undefined. |
| 49 | PASS Function('"use strict"; return this;')() is undefined. |
| 50 | PASS Function('"use strict"; with({});') threw exception SyntaxError: Strict mode code may not include a with statement. |
| 51 | PASS testGlobalAccess() is undefined |
| 52 | PASS testThis.call() is undefined |
| 53 | PASS testThis.apply() is undefined |
| 54 | PASS testThis.call(undefined) is undefined |
| 55 | PASS testThis.apply(undefined) is undefined |
| 56 | PASS (function eval(){'use strict';}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 57 | PASS (function(){(function eval(){'use strict';})}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 58 | PASS (function (eval){'use strict';}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 59 | PASS (function(){(function (eval){'use strict';})}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 60 | PASS (function arguments(){'use strict';}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 61 | PASS (function(){(function arguments(){'use strict';})}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 62 | PASS (function (arguments){'use strict';}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 63 | PASS (function(){(function (arguments){'use strict';})}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 64 | PASS (function (){'use strict'; var eval;}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 65 | PASS (function(){(function (){'use strict'; var eval;})}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 66 | PASS (function (){'use strict'; var arguments;}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 67 | PASS (function(){(function (){'use strict'; var arguments;})}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 68 | PASS (function (){'use strict'; try{}catch(eval){}}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 69 | PASS (function(){(function (){'use strict'; try{}catch(eval){}})}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 70 | PASS (function (){'use strict'; try{}catch(arguments){}}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 71 | PASS (function(){(function (){'use strict'; try{}catch(arguments){}})}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 72 | PASS (function (a, a){'use strict';}) threw exception SyntaxError: Strict mode function may not have duplicate parameter names. |
| 73 | PASS (function(){(function (a, a){'use strict';})}) threw exception SyntaxError: Strict mode function may not have duplicate parameter names. |
| 74 | PASS (function (a){'use strict'; delete a;})() threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. |
| 75 | PASS (function(){(function (a){'use strict'; delete a;})()}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. |
| 76 | PASS (function (){'use strict'; var a; delete a;})() threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. |
| 77 | PASS (function(){(function (){'use strict'; var a; delete a;})()}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. |
| 78 | PASS (function (){var a; function f() {'use strict'; delete a;} })() threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. |
| 79 | PASS (function(){(function (){var a; function f() {'use strict'; delete a;} })()}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. |
| 80 | PASS (function (){'use strict'; with(1){};}) threw exception SyntaxError: Strict mode code may not include a with statement. |
| 81 | PASS (function(){(function (){'use strict'; with(1){};})}) threw exception SyntaxError: Strict mode code may not include a with statement. |
| 82 | PASS (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. |
| 83 | PASS (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. |
| 84 | PASS (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. |
| 85 | PASS (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. |
| 86 | PASS (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. |
| 87 | PASS (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. |
| 88 | PASS (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. |
| 89 | PASS (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. |
| 90 | PASS (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. |
| 91 | PASS (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. |
| 92 | PASS (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. |
| 93 | PASS (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. |
| 94 | PASS "caller" in function(){"use strict"} is true |
| 95 | PASS (function(){"use strict";}).hasOwnProperty("caller") is true |
| 96 | PASS "arguments" in function(){"use strict"} is true |
| 97 | PASS (function(){"use strict";}).hasOwnProperty("arguments") is true |
| 98 | PASS 'use strict'; (function (){with(1){};}) threw exception SyntaxError: Strict mode code may not include a with statement. |
| 99 | PASS (function(){'use strict'; (function (){with(1){};})}) threw exception SyntaxError: Strict mode code may not include a with statement. |
| 100 | PASS 'use strict'; (function (){var a; delete a;}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. |
| 101 | PASS (function(){'use strict'; (function (){var a; delete a;})}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. |
| 102 | PASS 'use strict'; var a; (function (){ delete a;}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. |
| 103 | PASS (function(){'use strict'; var a; (function (){ delete a;})}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. |
| 104 | PASS var a; (function (){ 'use strict'; delete a;}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. |
| 105 | PASS (function(){var a; (function (){ 'use strict'; delete a;})}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. |
| 106 | PASS 'misc directive'; 'use strict'; with({}){} threw exception SyntaxError: Strict mode code may not include a with statement. |
| 107 | PASS (function(){'misc directive'; 'use strict'; with({}){}}) threw exception SyntaxError: Strict mode code may not include a with statement. |
| 108 | PASS 'use strict'; return threw exception SyntaxError: Illegal return statement. |
| 109 | PASS 'use strict'; break threw exception SyntaxError: Illegal break statement. |
| 110 | PASS (function(){'use strict'; break}) threw exception SyntaxError: Illegal break statement. |
| 111 | PASS 'use strict'; continue threw exception SyntaxError: Illegal continue statement. |
| 112 | PASS (function(){'use strict'; continue}) threw exception SyntaxError: Illegal continue statement. |
| 113 | PASS 'use strict'; for(;;)return threw exception SyntaxError: Illegal return statement. |
| 114 | PASS 'use strict'; for(;;)break missingLabel threw exception SyntaxError: Undefined label 'missingLabel'. |
| 115 | PASS (function(){'use strict'; for(;;)break missingLabel}) threw exception SyntaxError: Undefined label 'missingLabel'. |
| 116 | PASS 'use strict'; for(;;)continue missingLabel threw exception SyntaxError: Undefined label 'missingLabel'. |
| 117 | PASS (function(){'use strict'; for(;;)continue missingLabel}) threw exception SyntaxError: Undefined label 'missingLabel'. |
| 118 | PASS 'use strict'; 007; threw exception SyntaxError: Octal literals are not allowed in strict mode.. |
| 119 | PASS (function(){'use strict'; 007;}) threw exception SyntaxError: Octal literals are not allowed in strict mode.. |
| 120 | PASS 'use strict'; '\007'; threw exception SyntaxError: Octal literals are not allowed in strict mode.. |
| 121 | PASS (function(){'use strict'; '\007';}) threw exception SyntaxError: Octal literals are not allowed in strict mode.. |
| 122 | PASS '\007'; 'use strict'; threw exception SyntaxError: Octal literals are not allowed in strict mode.. |
| 123 | PASS (function(){'\007'; 'use strict';}) threw exception SyntaxError: Octal literals are not allowed in strict mode.. |
| 124 | PASS 'use strict'; delete aDeletableProperty; threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. |
| 125 | PASS (function(){'use strict'; delete aDeletableProperty;}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. |
| 126 | PASS 'use strict'; (function (){ delete someDeclaredGlobal;}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. |
| 127 | PASS (function(){'use strict'; (function (){ delete someDeclaredGlobal;})}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. |
| 128 | PASS (function (){ 'use strict'; delete someDeclaredGlobal;}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. |
| 129 | PASS (function(){(function (){ 'use strict'; delete someDeclaredGlobal;})}) threw exception SyntaxError: Delete of an unqualified identifier in strict mode.. |
| 130 | PASS 'use strict'; if (0) { someGlobal = 'Shouldn\'t be able to assign this.'; }; true; is true |
| 131 | PASS 'use strict'; someGlobal = 'Shouldn\'t be able to assign this.'; threw exception ReferenceError: someGlobal is not defined. |
| 132 | FAIL 'use strict'; (function f(){ f = 'shouldn\'t be able to assign to function expression name'; })() should throw an exception. Was undefined. |
| 133 | PASS 'use strict'; eval('var introducedVariable = "FAIL: variable introduced into containing scope";'); introducedVariable threw exception ReferenceError: introducedVariable is not defined. |
| 134 | PASS 'use strict'; objectWithReadonlyProperty.prop = 'fail' threw exception TypeError: Cannot assign to read only property 'prop' of #<Object>. |
| 135 | PASS 'use strict'; delete objectWithReadonlyProperty.prop threw exception TypeError: Cannot delete property 'prop' of #<Object>. |
| 136 | PASS 'use strict'; delete objectWithReadonlyProperty[readonlyPropName] threw exception TypeError: Cannot delete property 'prop' of #<Object>. |
| 137 | PASS 'use strict'; ++eval threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 138 | PASS (function(){'use strict'; ++eval}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 139 | PASS 'use strict'; eval++ threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 140 | PASS (function(){'use strict'; eval++}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 141 | PASS 'use strict'; --eval threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 142 | PASS (function(){'use strict'; --eval}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 143 | PASS 'use strict'; eval-- threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 144 | PASS (function(){'use strict'; eval--}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 145 | PASS 'use strict'; function f() { ++arguments } threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 146 | PASS (function(){'use strict'; function f() { ++arguments }}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 147 | PASS 'use strict'; function f() { arguments++ } threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 148 | PASS (function(){'use strict'; function f() { arguments++ }}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 149 | PASS 'use strict'; function f() { --arguments } threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 150 | PASS (function(){'use strict'; function f() { --arguments }}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 151 | PASS 'use strict'; function f() { arguments-- } threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 152 | PASS (function(){'use strict'; function f() { arguments-- }}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 153 | PASS global.eval('"use strict"; if (0) ++arguments; true;') threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 154 | PASS 'use strict'; ++(1, eval) threw exception ReferenceError: Invalid left-hand side expression in prefix operation. |
| 155 | PASS (function(){'use strict'; ++(1, eval)}) threw exception ReferenceError: Invalid left-hand side expression in prefix operation. |
| 156 | PASS 'use strict'; (1, eval)++ threw exception ReferenceError: Invalid left-hand side expression in postfix operation. |
| 157 | PASS (function(){'use strict'; (1, eval)++}) threw exception ReferenceError: Invalid left-hand side expression in postfix operation. |
| 158 | PASS 'use strict'; --(1, eval) threw exception ReferenceError: Invalid left-hand side expression in prefix operation. |
| 159 | PASS (function(){'use strict'; --(1, eval)}) threw exception ReferenceError: Invalid left-hand side expression in prefix operation. |
| 160 | PASS 'use strict'; (1, eval)-- threw exception ReferenceError: Invalid left-hand side expression in postfix operation. |
| 161 | PASS (function(){'use strict'; (1, eval)--}) threw exception ReferenceError: Invalid left-hand side expression in postfix operation. |
| 162 | PASS 'use strict'; function f() { ++(1, arguments) } threw exception ReferenceError: Invalid left-hand side expression in prefix operation. |
| 163 | PASS (function(){'use strict'; function f() { ++(1, arguments) }}) threw exception ReferenceError: Invalid left-hand side expression in prefix operation. |
| 164 | PASS 'use strict'; function f() { (1, arguments)++ } threw exception ReferenceError: Invalid left-hand side expression in postfix operation. |
| 165 | PASS (function(){'use strict'; function f() { (1, arguments)++ }}) threw exception ReferenceError: Invalid left-hand side expression in postfix operation. |
| 166 | PASS 'use strict'; function f() { --(1, arguments) } threw exception ReferenceError: Invalid left-hand side expression in prefix operation. |
| 167 | PASS (function(){'use strict'; function f() { --(1, arguments) }}) threw exception ReferenceError: Invalid left-hand side expression in prefix operation. |
| 168 | PASS 'use strict'; function f() { (1, arguments)-- } threw exception ReferenceError: Invalid left-hand side expression in postfix operation. |
| 169 | PASS (function(){'use strict'; function f() { (1, arguments)-- }}) threw exception ReferenceError: Invalid left-hand side expression in postfix operation. |
| 170 | FAIL 'use strict'; if (0) delete +a.b should throw an exception. Was use strict. |
| 171 | FAIL (function(){'use strict'; if (0) delete +a.b}) should throw an exception. Was function (){'use strict'; if (0) delete +a.b}. |
| 172 | FAIL 'use strict'; if (0) delete ++a.b should throw an exception. Was use strict. |
| 173 | FAIL (function(){'use strict'; if (0) delete ++a.b}) should throw an exception. Was function (){'use strict'; if (0) delete ++a.b}. |
| 174 | FAIL 'use strict'; if (0) delete void a.b should throw an exception. Was use strict. |
| 175 | FAIL (function(){'use strict'; if (0) delete void a.b}) should throw an exception. Was function (){'use strict'; if (0) delete void a.b}. |
| 176 | PASS (function (a){'use strict'; a = false; return a !== arguments[0]; })(true) is true |
| 177 | PASS (function (a){'use strict'; arguments[0] = false; return a !== arguments[0]; })(true) is true |
| 178 | PASS (function (a){'use strict'; a=false; return arguments; })(true)[0] is true |
| 179 | PASS (function (a){'use strict'; arguments[0]=false; return a; })(true) is true |
| 180 | PASS (function (a){'use strict'; arguments[0]=true; return arguments; })(false)[0] is true |
| 181 | PASS (function (){'use strict'; arguments[0]=true; return arguments; })(false)[0] is true |
| 182 | PASS (function (a){'use strict'; arguments[0]=true; a=false; return arguments; })()[0] is true |
| 183 | PASS (function (a){'use strict'; arguments[0]=false; a=true; return a; })() is true |
| 184 | PASS (function (a){'use strict'; arguments[0]=true; return arguments; })()[0] is true |
| 185 | PASS (function (){'use strict'; arguments[0]=true; return arguments; })()[0] is true |
| 186 | PASS (function (a){'use strict'; var local; (function (){local;})(); a = false; return a !== arguments[0]; })(true) is true |
| 187 | PASS (function (a){'use strict'; var local; (function (){local;})(); arguments[0] = false; return a !== arguments[0]; })(true) is true |
| 188 | PASS (function (a){'use strict'; var local; (function (){local;})(); a=false; return arguments; })(true)[0] is true |
| 189 | PASS (function (a){'use strict'; var local; (function (){local;})(); arguments[0]=false; return a; })(true) is true |
| 190 | PASS (function (a){'use strict'; var local; (function (){local;})(); arguments[0]=true; return arguments; })(false)[0] is true |
| 191 | PASS (function (){'use strict'; var local; (function (){local;})(); arguments[0]=true; return arguments; })(false)[0] is true |
| 192 | PASS (function (a){'use strict'; var local; (function (){local;})(); arguments[0]=true; a=false; return arguments; })()[0] is true |
| 193 | PASS (function (a){'use strict'; var local; (function (){local;})(); arguments[0]=true; return arguments; })()[0] is true |
| 194 | PASS (function (a){'use strict'; var local; (function (){local;})(); arguments[0]=false; a=true; return a; })() is true |
| 195 | PASS (function (){'use strict'; var local; (function (){local;})(); arguments[0]=true; return arguments; })()[0] is true |
| 196 | PASS 'use strict'; (function (){var a = true; eval('var a = false'); return a; })() is true |
| 197 | PASS (function (){var a = true; eval('"use strict"; var a = false'); return a; })() is true |
| 198 | PASS (function f(arg){'use strict'; return Object.getOwnPropertyDescriptor(f, 'arguments').value; })() is undefined. |
| 199 | PASS (function f(arg){'use strict'; return Object.getOwnPropertyDescriptor(f, 'caller').value; })() is undefined. |
| 200 | PASS (function f(arg){'use strict'; return Object.getOwnPropertyDescriptor(arguments, 'callee').value; })() is undefined. |
| 201 | PASS (function f(arg){'use strict'; return Object.getOwnPropertyDescriptor(arguments, 'caller').value; })() is undefined. |
| 202 | PASS (function f(arg){'use strict'; var descriptor = Object.getOwnPropertyDescriptor(arguments, 'caller'); return descriptor.get === descriptor.set; })() is true |
| 203 | PASS (function f(arg){'use strict'; var descriptor = Object.getOwnPropertyDescriptor(arguments, 'callee'); return descriptor.get === descriptor.set; })() is true |
| 204 | PASS (function f(arg){'use strict'; var descriptor = Object.getOwnPropertyDescriptor(f, 'caller'); return descriptor.get === descriptor.set; })() is true |
| 205 | PASS (function f(arg){'use strict'; var descriptor = Object.getOwnPropertyDescriptor(f, 'arguments'); return descriptor.get === descriptor.set; })() is true |
| 206 | PASS 'use strict'; (function f() { for(var i in this); })(); true; is true |
| 207 | PASS 'use strict'̻ threw exception SyntaxError: Unexpected token ILLEGAL. |
| 208 | PASS (function(){'use strict'̻}) threw exception SyntaxError: Unexpected token ILLEGAL. |
| 209 | PASS 'use strict'5.f threw exception SyntaxError: Unexpected token ILLEGAL. |
| 210 | PASS (function(){'use strict'5.f}) threw exception SyntaxError: Unexpected token ILLEGAL. |
| 211 | PASS 'use strict';̻ threw exception SyntaxError: Unexpected token ILLEGAL. |
| 212 | PASS (function(){'use strict';̻}) threw exception SyntaxError: Unexpected token ILLEGAL. |
| 213 | PASS 'use strict';5.f threw exception SyntaxError: Unexpected token ILLEGAL. |
| 214 | PASS (function(){'use strict';5.f}) threw exception SyntaxError: Unexpected token ILLEGAL. |
| 215 | PASS 'use strict';1-(eval=1); threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 216 | PASS (function(){'use strict';1-(eval=1);}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 217 | PASS 'use strict';arguments=1; threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 218 | PASS (function(){'use strict';arguments=1;}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 219 | PASS 'use strict';1-(arguments=1); threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 220 | PASS (function(){'use strict';1-(arguments=1);}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 221 | PASS 'use strict';var a=(eval=1); threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 222 | PASS (function(){'use strict';var a=(eval=1);}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 223 | PASS 'use strict';var a=(arguments=1); threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 224 | PASS (function(){'use strict';var a=(arguments=1);}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. |
| 225 | PASS 'use strict'; try { throw 1; } catch (e) { aGlobal = true; } is true |
| 226 | PASS 'use strict'; (function () { try { throw 1; } catch (e) { aGlobal = true; }})(); aGlobal; is true |
| 227 | PASS (function () {'use strict'; try { throw 1; } catch (e) { aGlobal = true; }})(); aGlobal; is true |
| 228 | PASS try { throw 1; } catch (e) { aGlobal = true; } is true |
| 229 | PASS (function () { try { throw 1; } catch (e) { aGlobal = true; }})(); aGlobal; is true |
| 230 | PASS (function () {try { throw 1; } catch (e) { aGlobal = true; }})(); aGlobal; is true |
| 231 | FAIL String(Object.getOwnPropertyDescriptor(function() { "use strict"; }, "caller").get) should be function () { |
| 232 | [native code] |
| 233 | }. Was function ThrowTypeError() { [native code] }. |
| 234 | PASS successfullyParsed is true |
| 235 | |
| 236 | TEST COMPLETE |
| 237 | |