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

Unified Diff: test/mjsunit/regress/regress-1639-2.js

Issue 2535733002: [debug] remove debug command processor from regress tests. (Closed)
Patch Set: Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/regress/regress-1639.js ('k') | test/mjsunit/regress/regress-1853.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-1639-2.js
diff --git a/test/mjsunit/regress/regress-1639-2.js b/test/mjsunit/regress/regress-1639-2.js
index 01f0dc20485e270facd284e1dcafa5aaf3d2deb2..a6e7969c08892a430a3a073d571cc0e3525a972d 100644
--- a/test/mjsunit/regress/regress-1639-2.js
+++ b/test/mjsunit/regress/regress-1639-2.js
@@ -29,14 +29,6 @@
// Get the Debug object exposed from the debug context global object.
Debug = debug.Debug
var exception = false;
-
-function sendCommand(state, cmd) {
- // Get the debug command processor in paused state.
- var dcp = state.debugCommandProcessor(false);
- var request = JSON.stringify(cmd);
- var response = dcp.processDebugJSONRequest(request);
-}
-
var state = 0;
function listener(event, exec_state, event_data, data) {
@@ -44,8 +36,6 @@ function listener(event, exec_state, event_data, data) {
if (event == Debug.DebugEvent.Break) {
var line = event_data.sourceLineText();
print('break: ' + line);
- print('event data: ' + event_data.toJSONProtocol());
- print();
assertEquals('// BREAK', line.substr(-8),
"should not break outside evaluate");
@@ -56,25 +46,13 @@ function listener(event, exec_state, event_data, data) {
// executed in the evaluate command, the stepping must stop at the end
// of the said set of instructions and not step further into native
// debugger code.
- sendCommand(exec_state, {
- seq : 0,
- type : "request",
- command : "evaluate",
- arguments : {
- 'expression' : 'print("A"); debugger; print("B"); // BREAK',
- 'global' : true
- }
- });
+ exec_state.frame(0).evaluate(
+ "print('A');\n" +
+ "debugger; // BREAK\n" +
+ "print('B'); // BREAK");
break;
case 1:
- sendCommand(exec_state, {
- seq : 0,
- type : "request",
- command : "continue",
- arguments : {
- stepaction : "next"
- }
- });
+ exec_state.prepareStep(Debug.StepAction.StepNext);
break;
}
}
« no previous file with comments | « test/mjsunit/regress/regress-1639.js ('k') | test/mjsunit/regress/regress-1853.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698