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

Unified Diff: test/mjsunit/debug-evaluate-recursive.js

Issue 2532893002: [debug] remove debug command processor from debug evaluate 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/debug-evaluate-bool-constructor.js ('k') | test/mjsunit/debug-evaluate-with-context.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/debug-evaluate-recursive.js
diff --git a/test/mjsunit/debug-evaluate-recursive.js b/test/mjsunit/debug-evaluate-recursive.js
index f34943e5f40ab1be0bd6d8040140ee09c9d20d8f..06428dbe9d39e3ae0d48e7203edc426a629f265b 100644
--- a/test/mjsunit/debug-evaluate-recursive.js
+++ b/test/mjsunit/debug-evaluate-recursive.js
@@ -32,40 +32,6 @@ Debug = debug.Debug
listenerComplete = false;
exception = false;
-// The base part of all evaluate requests.
-var base_request = '"seq":0,"type":"request","command":"evaluate"'
-
-function safeEval(code) {
- try {
- return eval('(' + code + ')');
- } catch (e) {
- assertEquals(void 0, e);
- return undefined;
- }
-}
-
-function testRequest(exec_state, arguments, success, result) {
- // Get the debug command processor in paused state.
- var dcp = exec_state.debugCommandProcessor(false);
-
- // Generate request with the supplied arguments.
- var request;
- if (arguments) {
- request = '{' + base_request + ',"arguments":' + arguments + '}';
- } else {
- request = '{' + base_request + '}'
- }
- var response = safeEval(dcp.processDebugJSONRequest(request));
- if (success) {
- assertTrue(response.success, request + ' -> ' + response.message);
- assertEquals(result, response.body.value);
- } else {
- assertFalse(response.success, request + ' -> ' + response.message);
- }
- assertFalse(response.running, request + ' -> expected not running');
-}
-
-
// Event listener which evaluates with break disabled.
function listener(event, exec_state, event_data, data) {
try {
@@ -76,23 +42,6 @@ function listener(event, exec_state, event_data, data) {
assertEquals(2, exec_state.evaluateGlobal('g()', true).value());
assertEquals(1, exec_state.frame(0).evaluate('f()', true).value());
assertEquals(2, exec_state.frame(0).evaluate('g()', true).value());
-
- // Call functions with break using the JSON protocol. Tests that argument
- // disable_break is default true.
- testRequest(exec_state, '{"expression":"f()"}', true, 1);
- testRequest(exec_state, '{"expression":"f()","frame":0}', true, 1);
- testRequest(exec_state, '{"expression":"g()"}', true, 2);
- testRequest(exec_state, '{"expression":"g()","frame":0}', true, 2);
-
- // Call functions with break using the JSON protocol. Tests passing
- // argument disable_break is default true.
- testRequest(exec_state, '{"expression":"f()","disable_break":true}', true, 1);
- testRequest(exec_state, '{"expression":"f()","frame":0,"disable_break":true}',
- true, 1);
- testRequest(exec_state, '{"expression":"g()","disable_break":true}', true, 2);
- testRequest(exec_state, '{"expression":"g()","frame":0,"disable_break":true}',
- true, 2);
-
// Indicate that all was processed.
listenerComplete = true;
}
« no previous file with comments | « test/mjsunit/debug-evaluate-bool-constructor.js ('k') | test/mjsunit/debug-evaluate-with-context.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698