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

Side by Side Diff: test/inspector/debugger/get-possible-breakpoints-master.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 // Flags: --turbo 5 // Flags: --turbo
6 6
7 InspectorTest.log('Checks Debugger.getPossibleBreakpoints'); 7 let {session, contextGroup, Protocol} = InspectorTest.start('Checks Debugger.get PossibleBreakpoints');
8 8
9 var source = utils.read('test/inspector/debugger/resources/break-locations.js'); 9 var source = utils.read('test/inspector/debugger/resources/break-locations.js');
10 InspectorTest.addScript(source); 10 contextGroup.addScript(source);
11 11
12 Protocol.Debugger.onceScriptParsed() 12 Protocol.Debugger.onceScriptParsed()
13 .then(message => Protocol.Debugger.getPossibleBreakpoints({ start: { lineNumbe r: 0, columnNumber : 0, scriptId: message.params.scriptId }})) 13 .then(message => Protocol.Debugger.getPossibleBreakpoints({ start: { lineNumbe r: 0, columnNumber : 0, scriptId: message.params.scriptId }}))
14 .then(dumpAllLocations) 14 .then(dumpAllLocations)
15 .then(InspectorTest.completeTest); 15 .then(InspectorTest.completeTest);
16 Protocol.Debugger.enable(); 16 Protocol.Debugger.enable();
17 17
18 function dumpAllLocations(message) { 18 function dumpAllLocations(message) {
19 if (message.error) { 19 if (message.error) {
20 InspectorTest.logMessage(message); 20 InspectorTest.logMessage(message);
(...skipping 13 matching lines...) Expand all
34 InspectorTest.log(lines.join('\n')); 34 InspectorTest.log(lines.join('\n'));
35 return message; 35 return message;
36 } 36 }
37 37
38 function locationMark(type) { 38 function locationMark(type) {
39 if (type === 'return') return '|R|'; 39 if (type === 'return') return '|R|';
40 if (type === 'call') return '|C|'; 40 if (type === 'call') return '|C|';
41 if (type === 'debuggerStatement') return '|D|'; 41 if (type === 'debuggerStatement') return '|D|';
42 return '|_|'; 42 return '|_|';
43 } 43 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698