2016-10-02 21:22:49 +00:00
|
|
|
// Copyright 2016 the V8 project authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2017-02-28 20:22:24 +00:00
|
|
|
InspectorTest.log("Check that stepInto at then end of the script go to next user script instead InjectedScriptSource.js.");
|
2016-10-02 21:22:49 +00:00
|
|
|
|
2016-10-03 23:32:52 +00:00
|
|
|
InspectorTest.addScript(
|
2016-10-02 21:22:49 +00:00
|
|
|
`function foo()
|
|
|
|
{
|
|
|
|
return 239;
|
|
|
|
}`);
|
|
|
|
|
2016-10-03 23:32:52 +00:00
|
|
|
Protocol.Debugger.enable();
|
|
|
|
Protocol.Debugger.onPaused(debuggerPaused);
|
|
|
|
Protocol.Runtime.evaluate({ "expression": "(function boo() { setTimeout(foo, 0); debugger; })()" });
|
2016-10-02 21:22:49 +00:00
|
|
|
|
|
|
|
var actions = [ "stepInto", "stepInto", "stepInto" ];
|
|
|
|
function debuggerPaused(result)
|
|
|
|
{
|
|
|
|
InspectorTest.log("Stack trace:");
|
|
|
|
for (var callFrame of result.params.callFrames)
|
|
|
|
InspectorTest.log(callFrame.functionName + ":" + callFrame.location.lineNumber + ":" + callFrame.location.columnNumber);
|
|
|
|
InspectorTest.log("");
|
|
|
|
|
|
|
|
var action = actions.shift();
|
|
|
|
if (!action) {
|
2016-10-03 23:32:52 +00:00
|
|
|
Protocol.Debugger.resume().then(InspectorTest.completeTest);
|
2016-10-02 21:22:49 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
InspectorTest.log("Perform " + action);
|
2016-10-03 23:32:52 +00:00
|
|
|
Protocol.Debugger[action]();
|
2016-10-02 21:22:49 +00:00
|
|
|
}
|