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

Unified Diff: test/mjsunit/debug-stepin-positions.js

Issue 1181013007: Debugger: require debugger to be active when dealing with breaks. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix yet another test Created 5 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
« no previous file with comments | « test/mjsunit/debug-script-breakpoints.js ('k') | test/mjsunit/deserialize-script-id.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/debug-stepin-positions.js
diff --git a/test/mjsunit/debug-stepin-positions.js b/test/mjsunit/debug-stepin-positions.js
index ff532e3dd740a1d78df532475e6c981d179b089a..ac010aac4224175a5fcdc18ab7fee1f22ee2a67a 100644
--- a/test/mjsunit/debug-stepin-positions.js
+++ b/test/mjsunit/debug-stepin-positions.js
@@ -33,7 +33,7 @@ function DebuggerStatement() {
debugger; /*pause*/
}
-function TestCase(fun, frame_number) {
+function TestCase(fun, frame_number, line_number) {
var exception = false;
var codeSnippet = undefined;
var resultPositions = undefined;
@@ -64,8 +64,13 @@ function TestCase(fun, frame_number) {
Debug.setListener(listener);
+ var breakpointId;
+ if (line_number) breakpointId = Debug.setBreakPoint(fun, line_number);
+
fun();
+ if (line_number) Debug.clearBreakPoint(breakpointId);
+
Debug.setListener(null);
assertTrue(!exception, exception);
@@ -116,9 +121,7 @@ function TestCaseWithDebugger(fun) {
}
function TestCaseWithBreakpoint(fun, line_number, frame_number) {
- var breakpointId = Debug.setBreakPoint(fun, line_number);
- TestCase(fun, frame_number);
- Debug.clearBreakPoint(breakpointId);
+ TestCase(fun, frame_number, line_number);
}
function TestCaseWithException(fun, frame_number) {
« no previous file with comments | « test/mjsunit/debug-script-breakpoints.js ('k') | test/mjsunit/deserialize-script-id.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698