3 <script type=
"text/javascript" src=
"../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
6 function TestFunction()
15 InspectorTest
.sendCommand("Debugger.enable", {});
17 InspectorTest
.eventHandler
["Debugger.paused"] = handleDebuggerPausedOne
;
19 InspectorTest
.sendCommand("Runtime.evaluate", { "expression": "setTimeout(TestFunction, 0)" });
21 function handleDebuggerPausedOne(messageObject
)
23 InspectorTest
.log("Paused on 'debugger;'");
25 InspectorTest
.eventHandler
["Debugger.paused"] = handleDebuggerPausedTwo
;
26 InspectorTest
.sendCommand("Debugger.stepOver", { });
29 function handleDebuggerPausedTwo(messageObject
)
31 InspectorTest
.log("Paused on the next statement");
32 var topFrame
= messageObject
.params
.callFrames
[0];
34 InspectorTest
.eventHandler
["Debugger.paused"] = undefined;
36 InspectorTest
.sendCommand("Debugger.getStepInPositions", { callFrameId
: topFrame
.callFrameId
}, callbackGetStepInPositions
);
39 function callbackGetStepInPositions(response
)
41 var positions
= response
.result
.stepInPositions
;
42 if (positions
.length
>= 3)
43 InspectorTest
.log("PASS");
45 InspectorTest
.log("FAIL");
47 InspectorTest
.completeTest();
52 <body onLoad=
"runTest();">