| Index: test/inspector/debugger/doesnt-step-into-injected-script.js
|
| diff --git a/test/inspector/debugger/doesnt-step-into-injected-script.js b/test/inspector/debugger/doesnt-step-into-injected-script.js
|
| index 2023da51f477be131eb6bb34368278833352d86c..45ca0ee0ddecf84275443201c1984944bd166a68 100644
|
| --- a/test/inspector/debugger/doesnt-step-into-injected-script.js
|
| +++ b/test/inspector/debugger/doesnt-step-into-injected-script.js
|
| @@ -2,31 +2,26 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -InspectorTest.log("Check that stepInto at then end of the script go to next user script instead InjectedScriptSource.js.");
|
| +InspectorTest.log('Check that stepInto at then end of the script go to next user script instead InjectedScriptSource.js.');
|
|
|
| -InspectorTest.addScript(
|
| -`function foo()
|
| -{
|
| - return 239;
|
| -}`);
|
| +(async function test() {
|
| + InspectorTest.setupScriptMap();
|
| + await Protocol.Debugger.enable();
|
| + Protocol.Runtime.evaluate({expression: '(function boo() { setTimeout(() => 239, 0); debugger; })()\n'});
|
| + await waitPauseAndDumpLocation();
|
| + Protocol.Debugger.stepInto();
|
| + await waitPauseAndDumpLocation();
|
| + Protocol.Debugger.stepInto();
|
| + await waitPauseAndDumpLocation();
|
| + Protocol.Debugger.stepInto();
|
| + await waitPauseAndDumpLocation();
|
| + await Protocol.Debugger.disable();
|
| + InspectorTest.completeTest();
|
| +})();
|
|
|
| -Protocol.Debugger.enable();
|
| -Protocol.Debugger.onPaused(debuggerPaused);
|
| -Protocol.Runtime.evaluate({ "expression": "(function boo() { setTimeout(foo, 0); debugger; })()" });
|
| -
|
| -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) {
|
| - Protocol.Debugger.resume().then(InspectorTest.completeTest);
|
| - return;
|
| - }
|
| - InspectorTest.log("Perform " + action);
|
| - Protocol.Debugger[action]();
|
| +async function waitPauseAndDumpLocation() {
|
| + var message = await Protocol.Debugger.oncePaused();
|
| + InspectorTest.log('paused at:');
|
| + InspectorTest.logSourceLocation(message.params.callFrames[0].location);
|
| + return message;
|
| }
|
|
|