| 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 type="text/javascript" src="resources/framework-with-inline-sourcemap.js
"></script> |
| 5 <script> |
| 6 function boo() |
| 7 { |
| 8 return 239; |
| 9 } |
| 10 |
| 11 function testFunction() |
| 12 { |
| 13 debugger; |
| 14 foo(boo); |
| 15 } |
| 16 |
| 17 function test() |
| 18 { |
| 19 var actions = [ "stepInto", "stepInto", "stepOut" ]; |
| 20 |
| 21 InspectorTest.eventHandler["Debugger.paused"] = printStackTraceAndMakeNextSt
ep; |
| 22 InspectorTest.sendCommand("Debugger.enable", {}, setSkipStackFrames); |
| 23 |
| 24 function setSkipStackFrames(response) |
| 25 { |
| 26 failIfError(response); |
| 27 InspectorTest.sendCommand("Debugger.skipStackFrames", { script: "foo\\.j
s$"}, callTestFunction); |
| 28 } |
| 29 |
| 30 function callTestFunction(response) |
| 31 { |
| 32 failIfError(response); |
| 33 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "setTimeou
t(testFunction, 0)"}); |
| 34 } |
| 35 |
| 36 function printStackTraceAndMakeNextStep(response) |
| 37 { |
| 38 failIfError(response); |
| 39 var callFrames = response.params.callFrames; |
| 40 InspectorTest.log("Stack trace:") |
| 41 for (var callFrame of callFrames) { |
| 42 var location = callFrame.functionLocation.lineNumber + ":" + callFra
me.functionLocation.columnNumber; |
| 43 InspectorTest.log(callFrame.functionName + ":" + location); |
| 44 } |
| 45 |
| 46 var action = actions.shift(); |
| 47 if (!action) |
| 48 InspectorTest.completeTest(); |
| 49 else |
| 50 InspectorTest.sendCommand("Debugger." + action); |
| 51 } |
| 52 |
| 53 function failIfError(response) |
| 54 { |
| 55 if (response.error) { |
| 56 InspectorTest.log(JSON.stringify(response)); |
| 57 InspectorTest.completeTest(); |
| 58 } |
| 59 } |
| 60 } |
| 61 </script> |
| 62 </head> |
| 63 <body onload="runTest()"> |
| 64 </body> |
| 65 </html> |
| OLD | NEW |