Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector-protocol / debugger / getStepInPositions.html
blob0f34335f21a888b954b48c300d31395c84e87f29
1 <html>
2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
4 <script>
6 function TestFunction()
8 debugger;
9 f(f1(2, 4),
10 f2(f3(), f4(5)));
13 function test()
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");
44 else
45 InspectorTest.log("FAIL");
47 InspectorTest.completeTest();
50 </script>
51 </head>
52 <body onLoad="runTest();">
53 </body>
54 </html>