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

Side by Side Diff: test/inspector/runtime/get-properties.js

Issue 2390733002: [inspector] Make InspectorTest.sendCommand* private (Closed)
Patch Set: addressed comments Created 4 years, 2 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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 // A general-purpose engine for sending a sequence of protocol commands. 5 // A general-purpose engine for sending a sequence of protocol commands.
6 // The clients provide requests and response handlers, while the engine catches 6 // The clients provide requests and response handlers, while the engine catches
7 // errors and makes sure that once there's nothing to do completeTest() is calle d. 7 // errors and makes sure that once there's nothing to do completeTest() is calle d.
8 // @param step is an object with command, params and callback fields 8 // @param step is an object with command, params and callback fields
9 function runRequestSeries(step) 9 function runRequestSeries(step)
10 { 10 {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 var next; 43 var next;
44 try { 44 try {
45 next = s.callback(response.result); 45 next = s.callback(response.result);
46 } catch (e) { 46 } catch (e) {
47 InspectorTest.log(e.stack); 47 InspectorTest.log(e.stack);
48 InspectorTest.completeTest(); 48 InspectorTest.completeTest();
49 return; 49 return;
50 } 50 }
51 processStep(next); 51 processStep(next);
52 } 52 }
53 InspectorTest.sendCommand(s.command, s.params, innerCallback); 53 var command = s.command.split(".");
54 Protocol[command[0]][command[1]](s.params).then(innerCallback);
54 } 55 }
55 } 56 }
56 57
57 var firstStep = { callback: callbackStart5 }; 58 var firstStep = { callback: callbackStart5 };
58 59
59 runRequestSeries(firstStep); 60 runRequestSeries(firstStep);
60 61
61 // 'Object5' section -- check properties of '5' wrapped as object (has an inter nal property). 62 // 'Object5' section -- check properties of '5' wrapped as object (has an inter nal property).
62 63
63 function callbackStart5() 64 function callbackStart5()
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 var v = p.value; 212 var v = p.value;
212 InspectorTest.log(" " + p.name + " " + v.type + " " + v.value); 213 InspectorTest.log(" " + p.name + " " + v.type + " " + v.value);
213 } 214 }
214 } 215 }
215 216
216 function NamedThingComparator(o1, o2) 217 function NamedThingComparator(o1, o2)
217 { 218 {
218 return o1.name === o2.name ? 0 : (o1.name < o2.name ? -1 : 1); 219 return o1.name === o2.name ? 0 : (o1.name < o2.name ? -1 : 1);
219 } 220 }
220 } 221 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698