Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Side by Side Diff: test/webkit/fast/js/basic-strict-mode.js

Issue 1415283003: Adapt tests in preparation of shipping --harmony-completion. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 // Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 1. Redistributions of source code must retain the above copyright 7 // 1. Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer. 8 // notice, this list of conditions and the following disclaimer.
9 // 2. Redistributions in binary form must reproduce the above copyright 9 // 2. Redistributions in binary form must reproduce the above copyright
10 // notice, this list of conditions and the following disclaimer in the 10 // notice, this list of conditions and the following disclaimer in the
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 var global = this; 159 var global = this;
160 shouldThrow("global.eval('\"use strict\"; if (0) ++arguments; true;')"); 160 shouldThrow("global.eval('\"use strict\"; if (0) ++arguments; true;')");
161 shouldBeSyntaxError("'use strict'; ++(1, eval)"); 161 shouldBeSyntaxError("'use strict'; ++(1, eval)");
162 shouldBeSyntaxError("'use strict'; (1, eval)++"); 162 shouldBeSyntaxError("'use strict'; (1, eval)++");
163 shouldBeSyntaxError("'use strict'; --(1, eval)"); 163 shouldBeSyntaxError("'use strict'; --(1, eval)");
164 shouldBeSyntaxError("'use strict'; (1, eval)--"); 164 shouldBeSyntaxError("'use strict'; (1, eval)--");
165 shouldBeSyntaxError("'use strict'; function f() { ++(1, arguments) }"); 165 shouldBeSyntaxError("'use strict'; function f() { ++(1, arguments) }");
166 shouldBeSyntaxError("'use strict'; function f() { (1, arguments)++ }"); 166 shouldBeSyntaxError("'use strict'; function f() { (1, arguments)++ }");
167 shouldBeSyntaxError("'use strict'; function f() { --(1, arguments) }"); 167 shouldBeSyntaxError("'use strict'; function f() { --(1, arguments) }");
168 shouldBeSyntaxError("'use strict'; function f() { (1, arguments)-- }"); 168 shouldBeSyntaxError("'use strict'; function f() { (1, arguments)-- }");
169 shouldBeSyntaxError("'use strict'; if (0) delete +a.b"); 169 shouldBeSyntaxError("'use strict'; undefined; if (0) delete +a.b");
170 shouldBeSyntaxError("'use strict'; if (0) delete ++a.b"); 170 shouldBeSyntaxError("'use strict'; undefined; if (0) delete ++a.b");
171 shouldBeSyntaxError("'use strict'; if (0) delete void a.b"); 171 shouldBeSyntaxError("'use strict'; undefined; if (0) delete void a.b");
172 172
173 shouldBeTrue("(function (a){'use strict'; a = false; return a !== arguments[0]; })(true)"); 173 shouldBeTrue("(function (a){'use strict'; a = false; return a !== arguments[0]; })(true)");
174 shouldBeTrue("(function (a){'use strict'; arguments[0] = false; return a !== arg uments[0]; })(true)"); 174 shouldBeTrue("(function (a){'use strict'; arguments[0] = false; return a !== arg uments[0]; })(true)");
175 shouldBeTrue("(function (a){'use strict'; a=false; return arguments; })(true)[0] "); 175 shouldBeTrue("(function (a){'use strict'; a=false; return arguments; })(true)[0] ");
176 shouldBeTrue("(function (a){'use strict'; arguments[0]=false; return a; })(true) "); 176 shouldBeTrue("(function (a){'use strict'; arguments[0]=false; return a; })(true) ");
177 shouldBeTrue("(function (a){'use strict'; arguments[0]=true; return arguments; } )(false)[0]"); 177 shouldBeTrue("(function (a){'use strict'; arguments[0]=true; return arguments; } )(false)[0]");
178 shouldBeTrue("(function (){'use strict'; arguments[0]=true; return arguments; } )(false)[0]"); 178 shouldBeTrue("(function (){'use strict'; arguments[0]=true; return arguments; } )(false)[0]");
179 shouldBeTrue("(function (a){'use strict'; arguments[0]=true; a=false; return arg uments; })()[0]"); 179 shouldBeTrue("(function (a){'use strict'; arguments[0]=true; a=false; return arg uments; })()[0]");
180 shouldBeTrue("(function (a){'use strict'; arguments[0]=false; a=true; return a; })()"); 180 shouldBeTrue("(function (a){'use strict'; arguments[0]=false; a=true; return a; })()");
181 shouldBeTrue("(function (a){'use strict'; arguments[0]=true; return arguments; } )()[0]"); 181 shouldBeTrue("(function (a){'use strict'; arguments[0]=true; return arguments; } )()[0]");
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 shouldBeTrue("(function () {'use strict'; try { throw 1; } catch (e) { aGlobal = true; }})(); aGlobal;"); 224 shouldBeTrue("(function () {'use strict'; try { throw 1; } catch (e) { aGlobal = true; }})(); aGlobal;");
225 aGlobal = false; 225 aGlobal = false;
226 shouldBeTrue("try { throw 1; } catch (e) { aGlobal = true; }"); 226 shouldBeTrue("try { throw 1; } catch (e) { aGlobal = true; }");
227 aGlobal = false; 227 aGlobal = false;
228 shouldBeTrue("(function () { try { throw 1; } catch (e) { aGlobal = true; }})(); aGlobal;"); 228 shouldBeTrue("(function () { try { throw 1; } catch (e) { aGlobal = true; }})(); aGlobal;");
229 aGlobal = false; 229 aGlobal = false;
230 shouldBeTrue("(function () {try { throw 1; } catch (e) { aGlobal = true; }})(); aGlobal;"); 230 shouldBeTrue("(function () {try { throw 1; } catch (e) { aGlobal = true; }})(); aGlobal;");
231 231
232 // Make sure this doesn't crash! 232 // Make sure this doesn't crash!
233 shouldBe('String(Object.getOwnPropertyDescriptor((function() { "use strict"; }). __proto__, "caller").get)', "'function () {\\n [native code]\\n}'"); 233 shouldBe('String(Object.getOwnPropertyDescriptor((function() { "use strict"; }). __proto__, "caller").get)', "'function () {\\n [native code]\\n}'");
OLDNEW
« no previous file with comments | « test/webkit/eval-throw-return-expected.txt ('k') | test/webkit/fast/js/basic-strict-mode-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698