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

Unified Diff: test/mjsunit/debug-setbreakpoint.js

Issue 92011: Add setting break points by using handles (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 8 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-setbreakpoint.js
===================================================================
--- test/mjsunit/debug-setbreakpoint.js (revision 1765)
+++ test/mjsunit/debug-setbreakpoint.js (working copy)
@@ -54,14 +54,14 @@
var json_response = dcp.processDebugJSONRequest(request);
var response = safeEval(json_response);
if (success) {
- assertTrue(response.success, json_response);
+ assertTrue(response.success, request + ' -> ' + json_response);
if (is_script) {
- assertEquals('scriptName', response.body.type, json_response);
+ assertEquals('scriptName', response.body.type, request + ' -> ' + json_response);
} else {
- assertEquals('scriptId', response.body.type, json_response);
+ assertEquals('scriptId', response.body.type, request + ' -> ' + json_response);
}
} else {
- assertFalse(response.success, json_response);
+ assertFalse(response.success, request + ' -> ' + json_response);
}
}
@@ -75,6 +75,8 @@
var request = '{' + base_request + '}'
var response = safeEval(dcp.processDebugJSONRequest(request));
assertFalse(response.success);
+
+ var mirror;
testArguments(dcp, '{}', false);
testArguments(dcp, '{"type":"xx"}', false);
@@ -86,6 +88,9 @@
testArguments(dcp, '{"type":"function","target":"f","line":-1}', false);
testArguments(dcp, '{"type":"function","target":"f","column":-1}', false);
testArguments(dcp, '{"type":"function","target":"f","ignoreCount":-1}', false);
+ testArguments(dcp, '{"type":"handle","target":"-1"}', false);
+ mirror = debug.MakeMirror(o);
+ testArguments(dcp, '{"type":"handle","target":' + mirror.handle() + '}', false);
// Test some legal setbreakpoint requests.
testArguments(dcp, '{"type":"function","target":"f"}', true, false);
@@ -106,6 +111,11 @@
testArguments(dcp, '{"type":"scriptId","target":' + g_script_id + ',"line":' + g_line + '}', true, false);
testArguments(dcp, '{"type":"scriptId","target":' + h_script_id + ',"line":' + h_line + '}', true, false);
+ mirror = debug.MakeMirror(f);
+ testArguments(dcp, '{"type":"handle","target":' + mirror.handle() + '}', true, false);
+ mirror = debug.MakeMirror(o.a);
+ testArguments(dcp, '{"type":"handle","target":' + mirror.handle() + '}', true, false);
+
// Indicate that all was processed.
listenerComplete = true;
}
@@ -127,6 +137,8 @@
eval('function h(){}');
+o = {a:function(){},b:function(){}}
+
// Check the script ids for the test functions.
f_script_id = Debug.findScript(f).id;
g_script_id = Debug.findScript(g).id;
« 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