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

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

Issue 1704773002: Load web tests using the plugin infrastructure. (Closed) Base URL: git@github.com:dart-lang/test@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
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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:io'; 6 import 'dart:io';
7 7
8 import 'package:async/async.dart'; 8 import 'package:async/async.dart';
9 9
10 import 'backend/group.dart'; 10 import 'backend/group.dart';
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 if (_suiteSubscription != null) _suiteSubscription.cancel(); 164 if (_suiteSubscription != null) _suiteSubscription.cancel();
165 _suiteSubscription = null; 165 _suiteSubscription = null;
166 166
167 // Make sure we close the engine *before* the loader. Otherwise, 167 // Make sure we close the engine *before* the loader. Otherwise,
168 // LoadSuites provided by the loader may get into bad states. 168 // LoadSuites provided by the loader may get into bad states.
169 // 169 //
170 // We close the loader's browsers while we're closing the engine because 170 // We close the loader's browsers while we're closing the engine because
171 // browser tests don't store any state we care about and we want them to 171 // browser tests don't store any state we care about and we want them to
172 // shut down without waiting for their tear-downs. 172 // shut down without waiting for their tear-downs.
173 await Future.wait([ 173 await Future.wait([
174 _loader.closeBrowsers(), 174 _loader.closeEphemeral(),
175 _engine.close() 175 _engine.close()
176 ]); 176 ]);
177 if (timer != null) timer.cancel(); 177 if (timer != null) timer.cancel();
178 await _loader.close(); 178 await _loader.close();
179 }); 179 });
180 180
181 /// Return a stream of [LoadSuite]s in [_config.paths]. 181 /// Return a stream of [LoadSuite]s in [_config.paths].
182 /// 182 ///
183 /// Only tests that match [_config.pattern] will be included in the 183 /// Only tests that match [_config.pattern] will be included in the
184 /// suites once they're loaded. 184 /// suites once they're loaded.
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 await _debugOperation.valueOrCancellation(); 306 await _debugOperation.valueOrCancellation();
307 }).listen(null); 307 }).listen(null);
308 308
309 var results = await Future.wait([ 309 var results = await Future.wait([
310 _suiteSubscription.asFuture().then((_) => _engine.suiteSink.close()), 310 _suiteSubscription.asFuture().then((_) => _engine.suiteSink.close()),
311 _engine.run() 311 _engine.run()
312 ]); 312 ]);
313 return results.last; 313 return results.last;
314 } 314 }
315 } 315 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698