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

Side by Side Diff: LayoutTests/fast/js/script-tests/stack-overflow-arrity-catch.js

Issue 20867002: Remove old tests that have been migrated to the v8 repo. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove unused script-tests as well Created 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 description('Test that if an arrity check causes a stack overflow, the exception goes to the right catch');
2
3 function funcWith20Args(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8,
4 arg9, arg10, arg11, arg12, arg13, arg14, arg15,
5 arg16, arg17, arg18, arg19, arg20)
6 {
7 debug("ERROR: Shouldn't arrive in 20 arg function!");
8 }
9
10 var gotRightCatch = false, gotWrongCatch1 = false, gotWrongCatch2 = false;
11
12 function test1()
13 {
14 try {
15 test2();
16 } catch (err) {
17 // Should get here because of stack overflow,
18 // now cause a stack overflow exception due to arrity processing
19 try {
20 var dummy = new RegExp('a|b|c');
21 } catch(err) {
22 gotWrongCatch1 = true;
23 }
24
25 try {
26 funcWith20Args(1, 2, 3);
27 } catch (err2) {
28 gotRightCatch = true;
29 }
30 }
31 }
32
33 function test2()
34 {
35 try {
36 var dummy = new Date();
37 } catch(err) {
38 gotWrongCatch2 = true;
39 }
40
41 try {
42 test1();
43 } catch (err) {
44 // Should get here because of stack overflow,
45 // now cause a stack overflow exception due to arrity processing
46 try {
47 funcWith20Args(1, 2, 3, 4, 5, 6);
48 } catch (err2) {
49 gotRightCatch = true;
50 }
51 }
52 }
53
54 test1();
55
56 shouldBeTrue("gotRightCatch");
57 shouldBeFalse("gotWrongCatch1");
58 shouldBeFalse("gotWrongCatch2");
OLDNEW
« no previous file with comments | « LayoutTests/fast/js/script-tests/reserved-words-strict.js ('k') | LayoutTests/fast/js/script-tests/string-capitalization.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698