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

Side by Side Diff: test/mjsunit/debug-continue.js

Issue 1525173003: [debugger] remove step count parameter from prepare step. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 function listener(event, exec_state, event_data, data) { 68 function listener(event, exec_state, event_data, data) {
69 try { 69 try {
70 if (event == Debug.DebugEvent.Break) { 70 if (event == Debug.DebugEvent.Break) {
71 71
72 // Test simple continue request. 72 // Test simple continue request.
73 testArguments(exec_state, void 0, true); 73 testArguments(exec_state, void 0, true);
74 74
75 // Test some illegal continue requests. 75 // Test some illegal continue requests.
76 testArguments(exec_state, '{"stepaction":"maybe"}', false); 76 testArguments(exec_state, '{"stepaction":"maybe"}', false);
77 testArguments(exec_state, '{"stepcount":-1}', false);
78 77
79 // Test some legal continue requests. 78 // Test some legal continue requests.
80 testArguments(exec_state, '{"stepaction":"in"}', true); 79 testArguments(exec_state, '{"stepaction":"in"}', true);
81 testArguments(exec_state, '{"stepaction":"next"}', true); 80 testArguments(exec_state, '{"stepaction":"next"}', true);
82 testArguments(exec_state, '{"stepaction":"out"}', true); 81 testArguments(exec_state, '{"stepaction":"out"}', true);
82
83 // Step count argument is ignored.
84 testArguments(exec_state, '{"stepcount":-1}', true);
83 testArguments(exec_state, '{"stepcount":1}', true); 85 testArguments(exec_state, '{"stepcount":1}', true);
84 testArguments(exec_state, '{"stepcount":10}', true); 86 testArguments(exec_state, '{"stepcount":10}', true);
85 testArguments(exec_state, '{"stepcount":"10"}', true); 87 testArguments(exec_state, '{"stepcount":"10"}', true);
86 testArguments(exec_state, '{"stepaction":"next","stepcount":10}', true); 88 testArguments(exec_state, '{"stepaction":"next","stepcount":10}', true);
87 89
88 // Indicate that all was processed. 90 // Indicate that all was processed.
89 listenerComplete = true; 91 listenerComplete = true;
90 } 92 }
91 } catch (e) { 93 } catch (e) {
92 exception = e 94 exception = e
(...skipping 11 matching lines...) Expand all
104 f(); 106 f();
105 }; 107 };
106 108
107 // Set a break point and call to invoke the debug event listener. 109 // Set a break point and call to invoke the debug event listener.
108 Debug.setBreakPoint(g, 0, 0); 110 Debug.setBreakPoint(g, 0, 0);
109 g(); 111 g();
110 112
111 assertFalse(exception, "exception in listener") 113 assertFalse(exception, "exception in listener")
112 // Make sure that the debug event listener vas invoked. 114 // Make sure that the debug event listener vas invoked.
113 assertTrue(listenerComplete, "listener did not run to completion"); 115 assertTrue(listenerComplete, "listener did not run to completion");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698