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

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

Issue 2668613002: [inspector] added Debugger.moduleRequested notification
Patch Set: added missing test Created 3 years, 10 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
« no previous file with comments | « src/objects-printer.cc ('k') | test/inspector/debugger/es6-module-requested-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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('Checks Debugger.moduleRequested notifications.');
6
7 var module1 = `
8 export let a1 = 1
9 function foo() {
10 }`;
11
12 var module2 = `
13 export let a2 = 2
14 function foo() {
15 }`;
16
17 var module3 = `
18 import { a1 } from 'module1';
19 import { a2 } from 'module2';
20 function foo() {}
21 `;
22
23 var module4 = `
24 import { a1 } from 'module1';
25 import { a2 } from 'module2';
26 `;
27
28 InspectorTest.setupScriptMap();
29 Protocol.Debugger.onModuleRequested(message => {
30 var refererModule = InspectorTest._scriptMap.get(message.params.refererId);
31 var requestedModule = InspectorTest._scriptMap.get(message.params.requestedId) ;
32 InspectorTest.log(`${refererModule.url} requested ${requestedModule.url} with import .. '${message.params.specifier}'`);
33 });
34
35 InspectorTest.addModule(module1, "module1");
36 InspectorTest.addModule(module2, "module2");
37 InspectorTest.addModule(module3, "module3");
38
39 InspectorTest.runTestSuite([
40 function reportExistingResolvedModulesOnDebuggerEnable(next) {
41 Protocol.Debugger.enable().then(next);
42 },
43
44 function moduleResolvedWhenDebuggerIsEnabled(next) {
45 InspectorTest.addModule(module4, "module4");
46 InspectorTest.waitPendingTasks().then(next);
47 }
48 ]);
OLDNEW
« no previous file with comments | « src/objects-printer.cc ('k') | test/inspector/debugger/es6-module-requested-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698