3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
7 function throwAnException()
12 function handleClick()
17 function handleClick2()
28 var scriptFileName = "debugger-no-pause-on-antibreakpoint.html";
30 InspectorTest.startDebuggerTest(step1);
34 DebuggerAgent.setPauseOnExceptions(WebInspector.DebuggerModel.PauseOnExceptionsState.PauseOnAllExceptions);
35 InspectorTest.showScriptSource(scriptFileName, step2);
40 InspectorTest.addResult("Script source was shown.");
41 InspectorTest.waitUntilPaused(step3);
42 InspectorTest.evaluateInPage("setTimeout(handleClick, 0)");
45 // Now set antibreakpoint and check that we still pause on other spots.
46 function step3(callFrames)
48 InspectorTest.captureStackTrace(callFrames);
50 var exceptionLocation = callFrames[0].location();
51 DebuggerAgent.setBreakpointByUrl(exceptionLocation.lineNumber, undefined, scriptFileName,
52 exceptionLocation.columnNumber, undefined, true, undefined);
54 InspectorTest.resumeExecution(step4);
59 InspectorTest.addResult("Antibreakpoint must be set by now.");
60 InspectorTest.evaluateInPage("setTimeout(handleClick2, 0)");
61 InspectorTest.waitUntilPaused(step5);
63 function step5(callFrames)
65 InspectorTest.captureStackTrace(callFrames);
66 if (callFrames.length != 1)
67 InspectorTest.addResult("Failure: a stack of single frame ('handleClick2') is expected");
69 InspectorTest.resumeExecution(step6);
73 InspectorTest.completeDebuggerTest();
80 <body onload="runTest()">
82 Tests that anti-breakpoint works.