3 <script src=
"../../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../../http/tests/inspector/debugger-test.js"></script>
7 function testFunction()
14 var testName
= InspectorTest
.resourceTreeModel
.inspectedPageURL();
15 testName
= testName
.substring(testName
.lastIndexOf('/') + 1);
16 InspectorTest
.startDebuggerTest(step1
);
20 InspectorTest
.showScriptSource(testName
, step2
);
23 function step2(sourceFrame
)
25 InspectorTest
.addResult("Main resource was shown.");
26 InspectorTest
.setBreakpoint(sourceFrame
, 8, "", true);
27 InspectorTest
.debuggerModel
.addEventListener(WebInspector
.DebuggerModel
.Events
.DebuggerWasDisabled
, step3
, this);
28 InspectorTest
.debuggerModel
.disableDebugger();
33 InspectorTest
.addResult("Debugger disabled.");
34 InspectorTest
.addResult("Evaluating test function.");
35 InspectorTest
.evaluateInPage("testFunction()", step4
);
40 InspectorTest
.addResult("function evaluated without a pause on the breakpoint.");
41 InspectorTest
.debuggerModel
.addEventListener(WebInspector
.DebuggerModel
.Events
.DebuggerWasEnabled
, step5
, this);
42 InspectorTest
.debuggerModel
.enableDebugger();
47 InspectorTest
.addResult("Debugger was enabled");
48 InspectorTest
.runTestFunctionAndWaitUntilPaused(step6
);
53 InspectorTest
.completeDebuggerTest();
60 <body onload=
"runTest()">
62 Tests that breakpoints are successfully restored after debugger disabling.
</a>