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

Side by Side Diff: lib/src/runner/loader.dart

Issue 1085883003: Make IsolateWrapper compatible with the 1.11 isolate API changes. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 5 years, 8 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 | lib/src/util/dart.dart » ('j') | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.runner.loader; 5 library test.runner.loader;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 import 'dart:isolate'; 9 import 'dart:isolate';
10 10
(...skipping 27 matching lines...) Expand all
38 /// The package root to use for loading tests, or `null` to use the automatic 38 /// The package root to use for loading tests, or `null` to use the automatic
39 /// root. 39 /// root.
40 final String _packageRoot; 40 final String _packageRoot;
41 41
42 /// The URL for the `pub serve` instance to use to load tests. 42 /// The URL for the `pub serve` instance to use to load tests.
43 /// 43 ///
44 /// This is `null` if tests should be loaded from the filesystem. 44 /// This is `null` if tests should be loaded from the filesystem.
45 final Uri _pubServeUrl; 45 final Uri _pubServeUrl;
46 46
47 /// All isolates that have been spun up by the loader. 47 /// All isolates that have been spun up by the loader.
48 final _isolates = new Set<Isolate>(); 48 final _isolates = new Set<IsolateWrapper>();
49 49
50 /// The server that serves browser test pages. 50 /// The server that serves browser test pages.
51 /// 51 ///
52 /// This is lazily initialized the first time it's accessed. 52 /// This is lazily initialized the first time it's accessed.
53 Future<BrowserServer> get _browserServer { 53 Future<BrowserServer> get _browserServer {
54 if (_browserServerCompleter == null) { 54 if (_browserServerCompleter == null) {
55 _browserServerCompleter = new Completer(); 55 _browserServerCompleter = new Completer();
56 BrowserServer.start( 56 BrowserServer.start(
57 root: _root, 57 root: _root,
58 packageRoot: _packageRoot, 58 packageRoot: _packageRoot,
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 Future close() { 222 Future close() {
223 for (var isolate in _isolates) { 223 for (var isolate in _isolates) {
224 isolate.kill(); 224 isolate.kill();
225 } 225 }
226 _isolates.clear(); 226 _isolates.clear();
227 227
228 if (_browserServerCompleter == null) return new Future.value(); 228 if (_browserServerCompleter == null) return new Future.value();
229 return _browserServer.then((browserServer) => browserServer.close()); 229 return _browserServer.then((browserServer) => browserServer.close());
230 } 230 }
231 } 231 }
OLDNEW
« no previous file with comments | « no previous file | lib/src/util/dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698