| 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("Checks breakProgram,(schedule|cancel)PauseOnNextStatement tes
t API"); | 5 InspectorTest.log("Checks breakProgram,(schedule|cancel)PauseOnNextStatement tes
t API"); |
| 6 | 6 |
| 7 InspectorTest.addScript(` | 7 InspectorTest.addScript(` |
| 8 function callBreakProgram() { | 8 function callBreakProgram() { |
| 9 breakProgram('reason', JSON.stringify({a: 42})); | 9 inspector.breakProgram('reason', JSON.stringify({a: 42})); |
| 10 } | 10 } |
| 11 | 11 |
| 12 function foo() { | 12 function foo() { |
| 13 return 42; | 13 return 42; |
| 14 }`, 7, 26); | 14 }`, 7, 26); |
| 15 | 15 |
| 16 InspectorTest.setupScriptMap(); | 16 InspectorTest.setupScriptMap(); |
| 17 Protocol.Debugger.onPaused(message => { | 17 Protocol.Debugger.onPaused(message => { |
| 18 InspectorTest.log('Stack:'); | 18 InspectorTest.log('Stack:'); |
| 19 InspectorTest.logCallFrames(message.params.callFrames); | 19 InspectorTest.logCallFrames(message.params.callFrames); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 41 .then(next); | 41 .then(next); |
| 42 }, | 42 }, |
| 43 | 43 |
| 44 function testCancelPauseOnNextStatement(next) { | 44 function testCancelPauseOnNextStatement(next) { |
| 45 utils.schedulePauseOnNextStatement('reason', JSON.stringify({a: 42})); | 45 utils.schedulePauseOnNextStatement('reason', JSON.stringify({a: 42})); |
| 46 utils.cancelPauseOnNextStatement(); | 46 utils.cancelPauseOnNextStatement(); |
| 47 Protocol.Runtime.evaluate({ expression: 'foo()'}) | 47 Protocol.Runtime.evaluate({ expression: 'foo()'}) |
| 48 .then(next); | 48 .then(next); |
| 49 } | 49 } |
| 50 ]); | 50 ]); |
| OLD | NEW |