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) { |