| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 InspectorTest.evaluateInPage( | |
| 6 `function testFunction() | |
| 7 { | |
| 8 var a = 2; | |
| 9 debugger; | |
| 10 }`); | |
| 11 | |
| 12 InspectorTest.sendCommand("Debugger.enable", {}); | |
| 13 InspectorTest.eventHandler["Debugger.paused"] = handleDebuggerPaused; | |
| 14 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "setTimeout(testFu
nction, 0)" }); | |
| 15 | |
| 16 function handleDebuggerPaused(messageObject) | |
| 17 { | |
| 18 InspectorTest.log("Paused on 'debugger;'"); | |
| 19 var topFrame = messageObject.params.callFrames[0]; | |
| 20 topFrame.location.scriptId = "42"; | |
| 21 topFrame.functionLocation.scriptId = "42"; | |
| 22 InspectorTest.log("Top frame location: " + JSON.stringify(topFrame.location)); | |
| 23 InspectorTest.log("Top frame functionLocation: " + JSON.stringify(topFrame.fun
ctionLocation)); | |
| 24 InspectorTest.completeTest(); | |
| 25 } | |
| OLD | NEW |