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

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

Issue 2799037: Provide actual breakpoints locations in response to setBreakpoint and listBreakpoints requests. (Closed)
Patch Set: Created 10 years, 6 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
« src/debug-debugger.js ('K') | « src/runtime.cc ('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
diff --git a/test/mjsunit/debug-setbreakpoint.js b/test/mjsunit/debug-setbreakpoint.js
old mode 100644
new mode 100755
index 9661c95a4ea7668f06b03831d47bfb198f3ecde5..8201d6394a94ace81870d5dffb7efd4101749cf2
--- a/test/mjsunit/debug-setbreakpoint.js
+++ b/test/mjsunit/debug-setbreakpoint.js
@@ -63,6 +63,7 @@ function testArguments(dcp, arguments, success, is_script) {
} else {
assertFalse(response.success, request + ' -> ' + json_response);
}
+ return response;
}
function listener(event, exec_state, event_data, data) {
@@ -75,7 +76,7 @@ function listener(event, exec_state, event_data, data) {
var request = '{' + base_request + '}'
var response = safeEval(dcp.processDebugJSONRequest(request));
assertFalse(response.success);
-
+
var mirror;
testArguments(dcp, '{}', false);
@@ -118,6 +119,12 @@ function listener(event, exec_state, event_data, data) {
testArguments(dcp, '{"type":"script","target":"sourceUrlScript","line":0}', true, true);
+ // Set a break point on a line with the comment, and check that actual position
+ // is the next line after the comment.
+ request = '{"type":"scriptId","target":' + g_script_id + ',"line":' + (g_line + 1) + '}';
+ response = testArguments(dcp, request, true, false);
+ assertEquals(g_line + 2, response.body.actual_locations[0].line);
+
// Indicate that all was processed.
listenerComplete = true;
}
@@ -185,8 +192,3 @@ Debug.setListener(breakListener);
sourceUrlFunc();
assertTrue(breakListenerCalled, "Break listener not called on breakpoint set by sourceURL");
-
-// Set a break point on a line with the comment, and check that actual position
-// is the next line after the comment.
-var number = Debug.setScriptBreakPointById(g_script_id, g_line + 1);
-assertEquals(g_line + 2, Debug.findBreakPoint(number).actual_location.line);
« src/debug-debugger.js ('K') | « src/runtime.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698