OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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.log('Checks stepping with more then one context group.'); |
| 6 |
| 7 (async function test() { |
| 8 InspectorTest.setupScriptMap(); |
| 9 await Protocol.Debugger.enable(); |
| 10 let contextGroupId = utils.createContextGroup(); |
| 11 await Protocol.Debugger.enable({}, contextGroupId); |
| 12 Protocol.Runtime.evaluate({expression: 'debugger'}); |
| 13 Protocol.Runtime.evaluate({expression: 'setTimeout(() => { debugger }, 0)'}, c
ontextGroupId); |
| 14 Protocol.Runtime.evaluate({expression: 'setTimeout(() => 42, 0)'}); |
| 15 await waitPauseAndDumpLocation(); |
| 16 Protocol.Debugger.stepOver(); |
| 17 await Protocol.Debugger.oncePaused(); |
| 18 Protocol.Debugger.stepOver(); |
| 19 await waitPauseAndDumpLocation(); |
| 20 await Protocol.Debugger.disable({}, contextGroupId); |
| 21 await Protocol.Debugger.disable(); |
| 22 InspectorTest.completeTest(); |
| 23 })(); |
| 24 |
| 25 async function waitPauseAndDumpLocation() { |
| 26 var message = await Protocol.Debugger.oncePaused(); |
| 27 InspectorTest.log('paused at:'); |
| 28 await InspectorTest.logSourceLocation(message.params.callFrames[0].location); |
| 29 return message; |
| 30 } |
OLD | NEW |