| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto
r-protocol-test.js"></script> | |
| 4 <script> | |
| 5 | |
| 6 function TestFunction() | |
| 7 { | |
| 8 debugger; | |
| 9 f(f1(2, 4), | |
| 10 f2(f3(), f4(5))); | |
| 11 } | |
| 12 | |
| 13 function test() | |
| 14 { | |
| 15 InspectorTest.sendCommand("Debugger.enable", {}); | |
| 16 | |
| 17 InspectorTest.eventHandler["Debugger.paused"] = handleDebuggerPausedOne; | |
| 18 | |
| 19 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "setTimeout(Te
stFunction, 0)" }); | |
| 20 | |
| 21 function handleDebuggerPausedOne(messageObject) | |
| 22 { | |
| 23 InspectorTest.log("Paused on 'debugger;'"); | |
| 24 | |
| 25 InspectorTest.eventHandler["Debugger.paused"] = handleDebuggerPausedTwo; | |
| 26 InspectorTest.sendCommand("Debugger.stepOver", { }); | |
| 27 } | |
| 28 | |
| 29 function handleDebuggerPausedTwo(messageObject) | |
| 30 { | |
| 31 InspectorTest.log("Paused on the next statement"); | |
| 32 var topFrame = messageObject.params.callFrames[0]; | |
| 33 | |
| 34 InspectorTest.eventHandler["Debugger.paused"] = undefined; | |
| 35 | |
| 36 InspectorTest.sendCommand("Debugger.getStepInPositions", { callFrameId:
topFrame.callFrameId }, callbackGetStepInPositions); | |
| 37 } | |
| 38 | |
| 39 function callbackGetStepInPositions(response) | |
| 40 { | |
| 41 var positions = response.result.stepInPositions; | |
| 42 if (positions.length >= 3) | |
| 43 InspectorTest.log("PASS"); | |
| 44 else | |
| 45 InspectorTest.log("FAIL"); | |
| 46 | |
| 47 InspectorTest.completeTest(); | |
| 48 } | |
| 49 } | |
| 50 </script> | |
| 51 </head> | |
| 52 <body onLoad="runTest();"> | |
| 53 </body> | |
| 54 </html> | |
| OLD | NEW |