| OLD | NEW |
| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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); |
| 154 // Stop repeat completions. | 154 // Stop repeat completions. |
| 155 first = false; | 155 first = false; |
| 156 print('** Signaled to run test queries on $portNumber'); | 156 print('** Signaled to run test queries on $portNumber'); |
| 157 } | 157 } |
| 158 print(line); | 158 print(line); |
| 159 print('$portNumber $blank $first'); |
| 159 }); | 160 }); |
| 160 process.stderr.transform(UTF8.decoder) | 161 process.stderr.transform(UTF8.decoder) |
| 161 .transform(new LineSplitter()).listen((line) { | 162 .transform(new LineSplitter()).listen((line) { |
| 162 print(line); | 163 print(line); |
| 163 }); | 164 }); |
| 164 process.exitCode.then((code) { | 165 process.exitCode.then((code) { |
| 165 Expect.equals(0, code, 'Launched dart executable exited with error.'); | 166 Expect.equals(0, code, 'Launched dart executable exited with error.'); |
| 166 }); | 167 }); |
| 167 return completer.future; | 168 return completer.future; |
| 168 }); | 169 }); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 }); | 267 }); |
| 267 }); | 268 }); |
| 268 return Future.wait(requests).then((a) { | 269 return Future.wait(requests).then((a) { |
| 269 a.forEach((FieldRequestHelper field) { | 270 a.forEach((FieldRequestHelper field) { |
| 270 fields[field.field['name']] = field.field; | 271 fields[field.field['name']] = field.field; |
| 271 }); | 272 }); |
| 272 return this; | 273 return this; |
| 273 }); | 274 }); |
| 274 } | 275 } |
| 275 } | 276 } |
| OLD | NEW |