| Index: test/inspector/debugger/es6-module-resolved.js
|
| diff --git a/test/inspector/debugger/es6-module-resolved.js b/test/inspector/debugger/es6-module-resolved.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c8d225efa509733e5cb9b80e75c5b757b9c7a8a1
|
| --- /dev/null
|
| +++ b/test/inspector/debugger/es6-module-resolved.js
|
| @@ -0,0 +1,48 @@
|
| +// Copyright 2017 the V8 project authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +print('Checks Debugger.moduleResolved notifications.');
|
| +
|
| +var module1 = `
|
| +export let a1 = 1
|
| +function foo() {
|
| +}`;
|
| +
|
| +var module2 = `
|
| +export let a2 = 2
|
| +function foo() {
|
| +}`;
|
| +
|
| +var module3 = `
|
| +import { a1 } from 'module1';
|
| +import { a2 } from 'module2';
|
| +function foo() {}
|
| +`;
|
| +
|
| +var module4 = `
|
| +import { a1 } from 'module1';
|
| +import { a2 } from 'module2';
|
| +`;
|
| +
|
| +InspectorTest.setupScriptMap();
|
| +Protocol.Debugger.onModuleResolved(message => {
|
| + var refererModule = InspectorTest._scriptMap.get(message.params.refererId);
|
| + var requestedModule = InspectorTest._scriptMap.get(message.params.requestedId);
|
| + InspectorTest.log(`${refererModule.url} requested ${requestedModule.url} with import .. '${message.params.specifier}'`);
|
| +});
|
| +
|
| +InspectorTest.addModule(module1, "module1");
|
| +InspectorTest.addModule(module2, "module2");
|
| +InspectorTest.addModule(module3, "module3");
|
| +
|
| +InspectorTest.runTestSuite([
|
| + function reportExistingResolvedModulesOnDebuggerEnable(next) {
|
| + Protocol.Debugger.enable().then(next);
|
| + },
|
| +
|
| + function moduleResolvedWhenDebuggerIsEnabled(next) {
|
| + InspectorTest.addModule(module4, "module4");
|
| + InspectorTest.waitPendingTasks().then(next);
|
| + }
|
| +]);
|
|
|