Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(718)

Side by Side Diff: test/inspector/debugger/es6-module-script-parsed.js

Issue 2891213002: [inspector] Refactor protocol-test.js (Closed)
Patch Set: comments addressed Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 ]);
OLDNEW
« no previous file with comments | « test/inspector/debugger/doesnt-step-into-injected-script.js ('k') | test/inspector/debugger/es6-module-set-script-source.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698