| 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 // Flags: --turbo | 5 // Flags: --turbo |
| 6 | 6 |
| 7 InspectorTest.log('Checks Debugger.getPossibleBreakpoints'); | 7 let {session, contextGroup, Protocol} = InspectorTest.start('Checks Debugger.get
PossibleBreakpoints'); |
| 8 | 8 |
| 9 var source = utils.read('test/inspector/debugger/resources/break-locations.js'); | 9 var source = utils.read('test/inspector/debugger/resources/break-locations.js'); |
| 10 InspectorTest.addScript(source); | 10 contextGroup.addScript(source); |
| 11 | 11 |
| 12 Protocol.Debugger.onceScriptParsed() | 12 Protocol.Debugger.onceScriptParsed() |
| 13 .then(message => Protocol.Debugger.getPossibleBreakpoints({ start: { lineNumbe
r: 0, columnNumber : 0, scriptId: message.params.scriptId }})) | 13 .then(message => Protocol.Debugger.getPossibleBreakpoints({ start: { lineNumbe
r: 0, columnNumber : 0, scriptId: message.params.scriptId }})) |
| 14 .then(dumpAllLocations) | 14 .then(dumpAllLocations) |
| 15 .then(InspectorTest.completeTest); | 15 .then(InspectorTest.completeTest); |
| 16 Protocol.Debugger.enable(); | 16 Protocol.Debugger.enable(); |
| 17 | 17 |
| 18 function dumpAllLocations(message) { | 18 function dumpAllLocations(message) { |
| 19 if (message.error) { | 19 if (message.error) { |
| 20 InspectorTest.logMessage(message); | 20 InspectorTest.logMessage(message); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 34 InspectorTest.log(lines.join('\n')); | 34 InspectorTest.log(lines.join('\n')); |
| 35 return message; | 35 return message; |
| 36 } | 36 } |
| 37 | 37 |
| 38 function locationMark(type) { | 38 function locationMark(type) { |
| 39 if (type === 'return') return '|R|'; | 39 if (type === 'return') return '|R|'; |
| 40 if (type === 'call') return '|C|'; | 40 if (type === 'call') return '|C|'; |
| 41 if (type === 'debuggerStatement') return '|D|'; | 41 if (type === 'debuggerStatement') return '|D|'; |
| 42 return '|_|'; | 42 return '|_|'; |
| 43 } | 43 } |
| OLD | NEW |