| 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('Debugger.scriptParsed and Debugger.scriptFailedToParse with E
S6 module'); | 5 let {session, contextGroup, Protocol} = InspectorTest.start('Debugger.scriptPars
ed and Debugger.scriptFailedToParse with ES6 module'); |
| 6 | 6 |
| 7 let moduleSource = ` | 7 let moduleSource = ` |
| 8 export function foo() { | 8 export function foo() { |
| 9 return 42; | 9 return 42; |
| 10 }`; | 10 }`; |
| 11 | 11 |
| 12 InspectorTest.addModule(moduleSource, 'module1.js'); | 12 contextGroup.addModule(moduleSource, 'module1.js'); |
| 13 InspectorTest.addModule('}', 'module-with-syntax-error-1.js'); | 13 contextGroup.addModule('}', 'module-with-syntax-error-1.js'); |
| 14 | 14 |
| 15 Protocol.Debugger.onScriptParsed(InspectorTest.logMessage); | 15 Protocol.Debugger.onScriptParsed(InspectorTest.logMessage); |
| 16 Protocol.Debugger.onScriptFailedToParse(InspectorTest.logMessage); | 16 Protocol.Debugger.onScriptFailedToParse(InspectorTest.logMessage); |
| 17 | 17 |
| 18 InspectorTest.runTestSuite([ | 18 InspectorTest.runTestSuite([ |
| 19 function testLoadedModulesOnDebuggerEnable(next) { | 19 function testLoadedModulesOnDebuggerEnable(next) { |
| 20 Protocol.Debugger.enable().then(next); | 20 Protocol.Debugger.enable().then(next); |
| 21 }, | 21 }, |
| 22 | 22 |
| 23 function testScriptEventsWhenDebuggerIsEnabled(next) { | 23 function testScriptEventsWhenDebuggerIsEnabled(next) { |
| 24 InspectorTest.addModule(moduleSource, 'module2.js'); | 24 contextGroup.addModule(moduleSource, 'module2.js'); |
| 25 InspectorTest.addModule('}', 'module-with-syntax-error-2.js'); | 25 contextGroup.addModule('}', 'module-with-syntax-error-2.js'); |
| 26 InspectorTest.waitPendingTasks().then(next); | 26 InspectorTest.waitForPendingTasks().then(next); |
| 27 } | 27 } |
| 28 ]); | 28 ]); |
| OLD | NEW |