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

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

Issue 2713023004: [inspector] added reconnect method for tests (Closed)
Patch Set: rebased Created 3 years, 9 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 print('Checks that Debugger.setScriptSource doesn\'t crash with modules'); 5 InspectorTest.log('Checks that Debugger.setScriptSource doesn\'t crash with modu les');
6 6
7 var module1 = ` 7 var module1 = `
8 export function foo() { 8 export function foo() {
9 return 42; 9 return 42;
10 }`; 10 }`;
11 11
12 var editedModule1 = ` 12 var editedModule1 = `
13 export function foo() { 13 export function foo() {
14 return 239; 14 return 239;
15 }`; 15 }`;
16 16
17 var module2 = ` 17 var module2 = `
18 import { foo } from 'module1'; 18 import { foo } from 'module1';
19 console.log(foo()); 19 console.log(foo());
20 `; 20 `;
21 21
22 var module1Id; 22 var module1Id;
23 Protocol.Debugger.onScriptParsed(message => { 23 Protocol.Debugger.onScriptParsed(message => {
24 if (message.params.url === 'module1') 24 if (message.params.url === 'module1')
25 module1Id = message.params.scriptId; 25 module1Id = message.params.scriptId;
26 }); 26 });
27 Protocol.Debugger.enable() 27 Protocol.Debugger.enable()
28 .then(() => InspectorTest.addModule(module1, 'module1')) 28 .then(() => InspectorTest.addModule(module1, 'module1'))
29 .then(() => InspectorTest.addModule(module2, 'module2')) 29 .then(() => InspectorTest.addModule(module2, 'module2'))
30 .then(() => InspectorTest.waitPendingTasks()) 30 .then(() => InspectorTest.waitPendingTasks())
31 .then(() => Protocol.Debugger.setScriptSource({ scriptId: module1Id, scriptSou rce: editedModule1 })) 31 .then(() => Protocol.Debugger.setScriptSource({ scriptId: module1Id, scriptSou rce: editedModule1 }))
32 .then(InspectorTest.logMessage) 32 .then(InspectorTest.logMessage)
33 .then(InspectorTest.completeTest); 33 .then(InspectorTest.completeTest);
OLDNEW
« no previous file with comments | « test/inspector/debugger/es6-module-script-parsed.js ('k') | test/inspector/debugger/framework-break.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698