| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 InspectorTest.log('Check that stepInto at then end of the script go to next user
script instead InjectedScriptSource.js.'); | 5 let {session, contextGroup, Protocol} = InspectorTest.start('Check that stepInto
at then end of the script go to next user script instead InjectedScriptSource.j
s.'); |
| 6 | 6 |
| 7 (async function test() { | 7 (async function test() { |
| 8 InspectorTest.setupScriptMap(); | 8 session.setupScriptMap(); |
| 9 await Protocol.Debugger.enable(); | 9 await Protocol.Debugger.enable(); |
| 10 Protocol.Runtime.evaluate({expression: '(function boo() { setTimeout(() => 239
, 0); debugger; })()\n'}); | 10 Protocol.Runtime.evaluate({expression: '(function boo() { setTimeout(() => 239
, 0); debugger; })()\n'}); |
| 11 await waitPauseAndDumpLocation(); | 11 await waitPauseAndDumpLocation(); |
| 12 Protocol.Debugger.stepInto(); | 12 Protocol.Debugger.stepInto(); |
| 13 await waitPauseAndDumpLocation(); | 13 await waitPauseAndDumpLocation(); |
| 14 Protocol.Debugger.stepInto(); | 14 Protocol.Debugger.stepInto(); |
| 15 await waitPauseAndDumpLocation(); | 15 await waitPauseAndDumpLocation(); |
| 16 Protocol.Debugger.stepInto(); | 16 Protocol.Debugger.stepInto(); |
| 17 await waitPauseAndDumpLocation(); | 17 await waitPauseAndDumpLocation(); |
| 18 await Protocol.Debugger.disable(); | 18 await Protocol.Debugger.disable(); |
| 19 InspectorTest.completeTest(); | 19 InspectorTest.completeTest(); |
| 20 })(); | 20 })(); |
| 21 | 21 |
| 22 async function waitPauseAndDumpLocation() { | 22 async function waitPauseAndDumpLocation() { |
| 23 var message = await Protocol.Debugger.oncePaused(); | 23 var message = await Protocol.Debugger.oncePaused(); |
| 24 InspectorTest.log('paused at:'); | 24 InspectorTest.log('paused at:'); |
| 25 InspectorTest.logSourceLocation(message.params.callFrames[0].location); | 25 session.logSourceLocation(message.params.callFrames[0].location); |
| 26 return message; | 26 return message; |
| 27 } | 27 } |
| OLD | NEW |