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

Side by Side Diff: test/inspector/debugger/step-into.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 possible break locations.'); 5 InspectorTest.log('Checks possible break locations.');
6 6
7 InspectorTest.setupScriptMap(); 7 InspectorTest.setupScriptMap();
8 Protocol.Debugger.onPaused(message => { 8 Protocol.Debugger.onPaused(message => {
9 var frames = message.params.callFrames; 9 var frames = message.params.callFrames;
10 if (frames.length === 1) { 10 if (frames.length === 1) {
11 Protocol.Debugger.stepInto(); 11 Protocol.Debugger.stepInto();
12 return; 12 return;
13 } 13 }
14 var scriptId = frames[0].location.scriptId; 14 var scriptId = frames[0].location.scriptId;
15 InspectorTest.log('break at:'); 15 InspectorTest.log('break at:');
16 InspectorTest.logCallFrameSourceLocation(frames[0]) 16 InspectorTest.logCallFrameSourceLocation(frames[0])
17 .then(() => Protocol.Debugger.stepInto()); 17 .then(() => Protocol.Debugger.stepInto());
18 }); 18 });
19 19
20 InspectorTest.loadScript('test/inspector/debugger/resources/break-locations.js') ; 20 InspectorTest.loadScript('test/inspector/debugger/resources/break-locations.js') ;
21 21
22 Protocol.Debugger.enable(); 22 Protocol.Debugger.enable();
23 Protocol.Runtime.evaluate({ expression: 'Object.keys(this).filter(name => name.i ndexOf(\'test\') === 0)', returnByValue: true }) 23 Protocol.Runtime.evaluate({ expression: 'Object.keys(this).filter(name => name.i ndexOf(\'test\') === 0)', returnByValue: true })
24 .then(runTests); 24 .then(runTests);
25 25
26 function runTests(message) { 26 function runTests(message) {
27 var tests = message.result.result.value; 27 var tests = message.result.result.value;
28 InspectorTest.runTestSuite(tests.map(test => eval(`(function ${test}(next) { 28 InspectorTest.runTestSuite(tests.map(test => eval(`(function ${test}(next) {
29 Protocol.Runtime.evaluate({ expression: 'debugger; ${test}()', awaitPromise: ${test.indexOf('testPromise') === 0}}) 29 Protocol.Runtime.evaluate({ expression: 'debugger; ${test}()', awaitPromise: ${test.indexOf('testPromise') === 0}})
30 .then(next); 30 .then(next);
31 })`))); 31 })`)));
32 } 32 }
OLDNEW
« no previous file with comments | « test/inspector/debugger/set-script-source-exception.js ('k') | test/inspector/debugger/step-into-next-script.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698