| 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('getPossibleBreakpoints should not crash during lazy compilati
on (crbug.com/715334)'); | 5 let {session, contextGroup, Protocol} = InspectorTest.start('getPossibleBreakpoi
nts should not crash during lazy compilation (crbug.com/715334)'); |
| 6 | 6 |
| 7 InspectorTest.addScript(` | 7 contextGroup.addScript(` |
| 8 function test() { continue; } | 8 function test() { continue; } |
| 9 //# sourceURL=test.js`); | 9 //# sourceURL=test.js`); |
| 10 | 10 |
| 11 (async function test() { | 11 (async function test() { |
| 12 Protocol.Debugger.enable(); | 12 Protocol.Debugger.enable(); |
| 13 let script = await Protocol.Debugger.onceScriptParsed(); | 13 let script = await Protocol.Debugger.onceScriptParsed(); |
| 14 InspectorTest.logMessage(script); | 14 InspectorTest.logMessage(script); |
| 15 let scriptId = script.params.scriptId; | 15 let scriptId = script.params.scriptId; |
| 16 Protocol.Debugger.onScriptFailedToParse(msg => { | 16 Protocol.Debugger.onScriptFailedToParse(msg => { |
| 17 InspectorTest.logMessage(msg); | 17 InspectorTest.logMessage(msg); |
| 18 if (msg.params.scriptId !== script.params.scriptId) { | 18 if (msg.params.scriptId !== script.params.scriptId) { |
| 19 InspectorTest.log('Failed script to parse event has different scriptId'); | 19 InspectorTest.log('Failed script to parse event has different scriptId'); |
| 20 } else { | 20 } else { |
| 21 InspectorTest.log('One script is reported twice'); | 21 InspectorTest.log('One script is reported twice'); |
| 22 } | 22 } |
| 23 }); | 23 }); |
| 24 let response = await Protocol.Debugger.getPossibleBreakpoints({ | 24 let response = await Protocol.Debugger.getPossibleBreakpoints({ |
| 25 start: {scriptId, lineNumber: 0, columnNumber: 0}}); | 25 start: {scriptId, lineNumber: 0, columnNumber: 0}}); |
| 26 InspectorTest.logMessage(response); | 26 InspectorTest.logMessage(response); |
| 27 InspectorTest.completeTest(); | 27 InspectorTest.completeTest(); |
| 28 })(); | 28 })(); |
| OLD | NEW |