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 print('Checks nested scheduled break in framework code.'); |
| 6 |
| 7 InspectorTest.addScript(` |
| 8 function frameworkCall(callback) { |
| 9 callWithScheduledBreak(doFrameworkWork.bind(null, callback), 'doFrameworkWork'
, ''); |
| 10 } |
| 11 |
| 12 function doFrameworkWork(callback) { |
| 13 callWithScheduledBreak(() => 42, '() => 42', ''); |
| 14 callback(); |
| 15 } |
| 16 //# sourceURL=framework.js`, 7, 26); |
| 17 |
| 18 InspectorTest.addScript(` |
| 19 function testFunction() { |
| 20 callWithScheduledBreak(frameworkCall.bind(null, foo), 'frameworkCall', ''); |
| 21 } |
| 22 |
| 23 function foo() { |
| 24 breakProgram('break in user code', ''); |
| 25 return 42; |
| 26 } |
| 27 //# sourceURL=user.js`, 18, 26); |
| 28 |
| 29 InspectorTest.setupScriptMap(); |
| 30 Protocol.Debugger.onPaused(message => { |
| 31 InspectorTest.log('break reason: ' + message.params.reason); |
| 32 InspectorTest.logCallFrames(message.params.callFrames); |
| 33 Protocol.Debugger.resume(); |
| 34 }); |
| 35 Protocol.Debugger.enable() |
| 36 .then(() => Protocol.Debugger.setBlackboxPatterns({patterns: ['framework\.js']
})) |
| 37 .then(() => Protocol.Runtime.evaluate({ expression: 'testFunction()//# sourceU
RL=expr.js'})) |
| 38 .then(InspectorTest.logMessage) |
| 39 .then(InspectorTest.completeTest); |
OLD | NEW |