OLD | NEW |
1 // Copyright 2017 the V8 project authors. All rights reserved. | 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 | 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('Stepping with natives and frameworks.'); | 5 InspectorTest.log('Stepping with natives and frameworks.'); |
6 | 6 |
7 InspectorTest.addScript(` | 7 InspectorTest.addScript(` |
8 function callAll() { | 8 function callAll() { |
9 for (var f of arguments) | 9 for (var f of arguments) |
10 f(); | 10 f(); |
11 } | 11 } |
12 //# sourceURL=framework.js`); | 12 //# sourceURL=framework.js`); |
13 | 13 |
14 InspectorTest.setupScriptMap(); | 14 InspectorTest.setupScriptMap(); |
15 InspectorTest.dumpProtocolCommand('Debugger.pause'); | 15 InspectorTest.logProtocolCommandCalls('Debugger.pause'); |
16 InspectorTest.dumpProtocolCommand('Debugger.stepInto'); | 16 InspectorTest.logProtocolCommandCalls('Debugger.stepInto'); |
17 InspectorTest.dumpProtocolCommand('Debugger.stepOver'); | 17 InspectorTest.logProtocolCommandCalls('Debugger.stepOver'); |
18 InspectorTest.dumpProtocolCommand('Debugger.stepOut'); | 18 InspectorTest.logProtocolCommandCalls('Debugger.stepOut'); |
19 InspectorTest.dumpProtocolCommand('Debugger.resume'); | 19 InspectorTest.logProtocolCommandCalls('Debugger.resume'); |
20 | 20 |
21 Protocol.Debugger.enable(); | 21 Protocol.Debugger.enable(); |
22 Protocol.Debugger.setBlackboxPatterns({patterns: ['framework\.js']}); | 22 Protocol.Debugger.setBlackboxPatterns({patterns: ['framework\.js']}); |
23 InspectorTest.runAsyncTestSuite([ | 23 InspectorTest.runAsyncTestSuite([ |
24 async function testNativeCodeStepOut() { | 24 async function testNativeCodeStepOut() { |
25 Protocol.Debugger.pause(); | 25 Protocol.Debugger.pause(); |
26 Protocol.Runtime.evaluate({expression: '[1,2].map(v => v);'}); | 26 Protocol.Runtime.evaluate({expression: '[1,2].map(v => v);'}); |
27 await logPauseLocation(await Protocol.Debugger.oncePaused()); | 27 await logPauseLocation(await Protocol.Debugger.oncePaused()); |
28 Protocol.Debugger.stepInto(); | 28 Protocol.Debugger.stepInto(); |
29 await logPauseLocation(await Protocol.Debugger.oncePaused()); | 29 await logPauseLocation(await Protocol.Debugger.oncePaused()); |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 await logPauseLocation(await Protocol.Debugger.oncePaused()); | 291 await logPauseLocation(await Protocol.Debugger.oncePaused()); |
292 Protocol.Debugger.stepOut(); | 292 Protocol.Debugger.stepOut(); |
293 await logPauseLocation(await Protocol.Debugger.oncePaused()); | 293 await logPauseLocation(await Protocol.Debugger.oncePaused()); |
294 await Protocol.Debugger.resume(); | 294 await Protocol.Debugger.resume(); |
295 } | 295 } |
296 ]); | 296 ]); |
297 | 297 |
298 function logPauseLocation(message) { | 298 function logPauseLocation(message) { |
299 return InspectorTest.logSourceLocation(message.params.callFrames[0].location); | 299 return InspectorTest.logSourceLocation(message.params.callFrames[0].location); |
300 } | 300 } |
OLD | NEW |