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

Side by Side Diff: runtime/observatory/tests/service/test_helper.dart

Issue 1725993002: Fix checked mode failures in service tests (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « no previous file | 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 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
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,
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698