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

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

Issue 2161413002: Adjust whitespace to make tests oblivious to --harmony-function-tostring (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 23 matching lines...) Expand all
34 } 34 }
35 function testThisBracketAccess(prop) { 35 function testThisBracketAccess(prop) {
36 "use strict"; 36 "use strict";
37 return this[prop]; 37 return this[prop];
38 } 38 }
39 function testGlobalAccess() { 39 function testGlobalAccess() {
40 return testThis(); 40 return testThis();
41 } 41 }
42 function shouldBeSyntaxError(str) { 42 function shouldBeSyntaxError(str) {
43 shouldThrow(str); 43 shouldThrow(str);
44 shouldThrow("(function(){" + str + "})"); 44 shouldThrow("(function (){" + str + "})");
45 } 45 }
46 function testLineContinuation() { 46 function testLineContinuation() {
47 "use stric\ 47 "use stric\
48 t"; 48 t";
49 return this; 49 return this;
50 } 50 }
51 function testEscapeSequence() { 51 function testEscapeSequence() {
52 "use\u0020strict"; 52 "use\u0020strict";
53 return this; 53 return this;
54 } 54 }
(...skipping 169 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/dfg-resolve-global-specific-dictionary.js ('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