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

Side by Side Diff: tests/standalone/vmservice/test_helper.dart

Issue 271893002: Add trace_service_pause_events flag and related tracing (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/service.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library vmservice_test_helper; 5 library vmservice_test_helper;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:io'; 9 import 'dart:io';
10 import 'package:expect/expect.dart'; 10 import 'package:expect/expect.dart';
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 return Process.start(dartExecutable, 133 return Process.start(dartExecutable,
134 ['--enable-vm-service:0', scriptPath]).then((p) { 134 ['--enable-vm-service:0', scriptPath]).then((p) {
135 135
136 Completer completer = new Completer(); 136 Completer completer = new Completer();
137 process = p; 137 process = p;
138 var portNumber; 138 var portNumber;
139 var blank; 139 var blank;
140 var first = true; 140 var first = true;
141 process.stdout.transform(UTF8.decoder) 141 process.stdout.transform(UTF8.decoder)
142 .transform(new LineSplitter()).listen((line) { 142 .transform(new LineSplitter()).listen((line) {
143 if (line.startsWith('VMService listening on ')) { 143 if (line.startsWith('Observatory listening on http://')) {
144 RegExp portExp = new RegExp(r"\d+.\d+.\d+.\d+:(\d+)"); 144 RegExp portExp = new RegExp(r"\d+.\d+.\d+.\d+:(\d+)");
145 var port = portExp.firstMatch(line).group(1); 145 var port = portExp.firstMatch(line).group(1);
146 portNumber = int.parse(port); 146 portNumber = int.parse(port);
147 } 147 }
148 if (line == '') { 148 if (line == '') {
149 // Received blank line. 149 // Received blank line.
150 blank = true; 150 blank = true;
151 } 151 }
152 if (portNumber != null && blank == true && first == true) { 152 if (portNumber != null && blank == true && first == true) {
153 completer.complete(portNumber); 153 completer.complete(portNumber);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 }); 266 });
267 }); 267 });
268 return Future.wait(requests).then((a) { 268 return Future.wait(requests).then((a) {
269 a.forEach((FieldRequestHelper field) { 269 a.forEach((FieldRequestHelper field) {
270 fields[field.field['user_name']] = field.field; 270 fields[field.field['user_name']] = field.field;
271 }); 271 });
272 return this; 272 return this;
273 }); 273 });
274 } 274 }
275 } 275 }
OLDNEW
« no previous file with comments | « runtime/vm/service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698