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

Side by Side Diff: LayoutTests/fast/js/script-tests/implicit-call-with-global-reentry.js

Issue 339363002: Fix invalid syntax for JS setters in tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 description( 1 description(
2 "This test checks that implicit reentry to global code through a getter does not clobber the calling register file." 2 "This test checks that implicit reentry to global code through a getter does not clobber the calling register file."
3 ); 3 );
4 4
5 var testVar = "FAIL"; 5 var testVar = "FAIL";
6 function testGlobalCode(test) { 6 function testGlobalCode(test) {
7 document.write("<script>"+test+"<"+"/script>"); 7 document.write("<script>"+test+"<"+"/script>");
8 } 8 }
9 var testObject = { 9 var testObject = {
10 get getterTest(){ testGlobalCode("var a, b, c, d; testVar = 'PASS';"); }, 10 get getterTest(){ testGlobalCode("var a, b, c, d; testVar = 'PASS';"); },
11 set setterTest(){ testGlobalCode("var e, f, g, h; testVar = 'PASS';"); }, 11 set setterTest(_){ testGlobalCode("var e, f, g, h; testVar = 'PASS';"); },
12 toString: function() { testGlobalCode("var i, j, k, l; testVar = 'PASS';"); return ''; }, 12 toString: function() { testGlobalCode("var i, j, k, l; testVar = 'PASS';"); return ''; },
13 valueOf: function() { testGlobalCode("var m, n, o, p; testVar = 'PASS';"); r eturn 0; }, 13 valueOf: function() { testGlobalCode("var m, n, o, p; testVar = 'PASS';"); r eturn 0; },
14 toStringTest: function() { "" + this; }, 14 toStringTest: function() { "" + this; },
15 valueOfTest: function() { 0 * this; } 15 valueOfTest: function() { 0 * this; }
16 }; 16 };
17 17
18 shouldBe("testObject.getterTest; testVar;", '"PASS"'); 18 shouldBe("testObject.getterTest; testVar;", '"PASS"');
19 var testVar = "FAIL"; 19 var testVar = "FAIL";
20 shouldBe("testObject.setterTest = 1; testVar;", '"PASS"'); 20 shouldBe("testObject.setterTest = 1; testVar;", '"PASS"');
21 var testVar = "FAIL"; 21 var testVar = "FAIL";
22 shouldBe("testObject.toStringTest(); testVar;", '"PASS"'); 22 shouldBe("testObject.toStringTest(); testVar;", '"PASS"');
23 var testVar = "FAIL"; 23 var testVar = "FAIL";
24 shouldBe("testObject.valueOfTest(); testVar;", '"PASS"'); 24 shouldBe("testObject.valueOfTest(); testVar;", '"PASS"');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698