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