| 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 print('Checks nested scheduled break in framework code.'); | 5 InspectorTest.log('Checks nested scheduled break in framework code.'); |
| 6 | 6 |
| 7 InspectorTest.addScript(` | 7 InspectorTest.addScript(` |
| 8 function frameworkCall(callback) { | 8 function frameworkCall(callback) { |
| 9 callWithScheduledBreak(doFrameworkWork.bind(null, callback), | 9 callWithScheduledBreak(doFrameworkWork.bind(null, callback), |
| 10 'top-framework-scheduled-break', | 10 'top-framework-scheduled-break', |
| 11 JSON.stringify({ data: 'data for top-framework-scheduled-break' })); | 11 JSON.stringify({ data: 'data for top-framework-scheduled-break' })); |
| 12 } | 12 } |
| 13 | 13 |
| 14 function doFrameworkWork(callback) { | 14 function doFrameworkWork(callback) { |
| 15 callWithScheduledBreak(doFrameworkBreak, 'should-not-be-a-reason', ''); | 15 callWithScheduledBreak(doFrameworkBreak, 'should-not-be-a-reason', ''); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 40 InspectorTest.log('break reason: ' + message.params.reason); | 40 InspectorTest.log('break reason: ' + message.params.reason); |
| 41 InspectorTest.log('break aux data: ' + JSON.stringify(message.params.data || {
}, null, ' ')); | 41 InspectorTest.log('break aux data: ' + JSON.stringify(message.params.data || {
}, null, ' ')); |
| 42 InspectorTest.logCallFrames(message.params.callFrames); | 42 InspectorTest.logCallFrames(message.params.callFrames); |
| 43 InspectorTest.log(''); | 43 InspectorTest.log(''); |
| 44 Protocol.Debugger.resume(); | 44 Protocol.Debugger.resume(); |
| 45 }); | 45 }); |
| 46 Protocol.Debugger.enable() | 46 Protocol.Debugger.enable() |
| 47 .then(() => Protocol.Debugger.setBlackboxPatterns({patterns: ['framework\.js']
})) | 47 .then(() => Protocol.Debugger.setBlackboxPatterns({patterns: ['framework\.js']
})) |
| 48 .then(() => Protocol.Runtime.evaluate({ expression: 'testFunction()//# sourceU
RL=expr.js'})) | 48 .then(() => Protocol.Runtime.evaluate({ expression: 'testFunction()//# sourceU
RL=expr.js'})) |
| 49 .then(InspectorTest.completeTest); | 49 .then(InspectorTest.completeTest); |
| OLD | NEW |