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

Unified Diff: test/mjsunit/debug-scripts-request.js

Issue 113335: Add optional 'ids' parameter to 'scripts' request (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/debug-delay.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/debug-scripts-request.js
===================================================================
--- test/mjsunit/debug-scripts-request.js (revision 1940)
+++ test/mjsunit/debug-scripts-request.js (working copy)
@@ -66,9 +66,6 @@
testArguments(dcp, '{"types":"xx"}', false);
// Test legal scripts requests.
- var request = '{' + base_request + '}'
- var response = safeEval(dcp.processDebugJSONRequest(request));
- assertTrue(response.success);
testArguments(dcp, '{}', true);
testArguments(dcp, '{"types":1}', true);
testArguments(dcp, '{"types":2}', true);
@@ -76,6 +73,21 @@
testArguments(dcp, '{"types":7}', true);
testArguments(dcp, '{"types":0xFF}', true);
+ // Test request for all scripts.
+ var request = '{' + base_request + '}'
+ var response = safeEval(dcp.processDebugJSONRequest(request));
+ assertTrue(response.success);
+
+ // Test filtering by id.
+ assertEquals(2, response.body.length);
+ var script = response.body[0];
+ var request = '{' + base_request + ',"arguments":{"ids":[' +
+ script.id + ']}}';
+ var response = safeEval(dcp.processDebugJSONRequest(request));
+ assertTrue(response.success);
+ assertEquals(1, response.body.length);
+ assertEquals(script.id, response.body[0].id);
+
// Indicate that all was processed.
listenerComplete = true;
}
@@ -91,5 +103,6 @@
debugger;
// Make sure that the debug event listener vas invoked with no exceptions.
-assertTrue(listenerComplete, "listener did not run to completion");
+assertTrue(listenerComplete,
+ "listener did not run to completion, exception: " + exception);
assertFalse(exception, "exception in listener")
« no previous file with comments | « src/debug-delay.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698