Chromium Code Reviews| 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 test_helper; | 5 library 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:observatory/service_io.dart'; | 10 import 'package:observatory/service_io.dart'; |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 21 | 21 |
| 22 const String _TESTEE_ENV_KEY = 'SERVICE_TEST_TESTEE'; | 22 const String _TESTEE_ENV_KEY = 'SERVICE_TEST_TESTEE'; |
| 23 const Map<String, String> _TESTEE_SPAWN_ENV = const { | 23 const Map<String, String> _TESTEE_SPAWN_ENV = const { |
| 24 _TESTEE_ENV_KEY: 'true' | 24 _TESTEE_ENV_KEY: 'true' |
| 25 }; | 25 }; |
| 26 bool _isTestee() { | 26 bool _isTestee() { |
| 27 return Platform.environment.containsKey(_TESTEE_ENV_KEY); | 27 return Platform.environment.containsKey(_TESTEE_ENV_KEY); |
| 28 } | 28 } |
| 29 | 29 |
| 30 class _SerivceTesteeRunner { | 30 class _SerivceTesteeRunner { |
| 31 Future run({Future testeeBefore(): null, | 31 Future run({testeeBefore(): null, |
|
Jacob
2016/02/24 00:18:20
why is this change in this CL?
Alan Knight
2016/02/24 00:24:58
Oops. Not synced properly. Fixed.
| |
| 32 Future testeeConcurrent(): null, | 32 testeeConcurrent(): null, |
| 33 bool pause_on_start: false, | 33 bool pause_on_start: false, |
| 34 bool pause_on_exit: false}) async { | 34 bool pause_on_exit: false}) async { |
| 35 if (!pause_on_start) { | 35 if (!pause_on_start) { |
| 36 if (testeeBefore != null) { | 36 if (testeeBefore != null) { |
| 37 var result = testeeBefore(); | 37 var result = testeeBefore(); |
| 38 if (result is Future) { | 38 if (result is Future) { |
| 39 await result; | 39 await result; |
| 40 } | 40 } |
| 41 } | 41 } |
| 42 print(''); // Print blank line to signal that testeeBefore has run. | 42 print(''); // Print blank line to signal that testeeBefore has run. |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 336 mainArgs: mainArgs, | 336 mainArgs: mainArgs, |
| 337 vmTests: tests, | 337 vmTests: tests, |
| 338 pause_on_start: pause_on_start, | 338 pause_on_start: pause_on_start, |
| 339 pause_on_exit: pause_on_exit, | 339 pause_on_exit: pause_on_exit, |
| 340 trace_service: trace_service, | 340 trace_service: trace_service, |
| 341 trace_compiler: trace_compiler, | 341 trace_compiler: trace_compiler, |
| 342 verbose_vm: verbose_vm, | 342 verbose_vm: verbose_vm, |
| 343 pause_on_unhandled_exceptions: pause_on_unhandled_exceptions); | 343 pause_on_unhandled_exceptions: pause_on_unhandled_exceptions); |
| 344 } | 344 } |
| 345 } | 345 } |
| OLD | NEW |