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

Unified Diff: lib/src/runner/loader.dart

Issue 1657613003: Eagerly close browser tests. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/runner/browser/server.dart ('k') | test/io.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/runner/loader.dart
diff --git a/lib/src/runner/loader.dart b/lib/src/runner/loader.dart
index a4ee3d1eabce9614e31ba706fab2e5b8fb957a0d..33092e1925f5bfc78cb9f54c38ad0e52cf55fdc9 100644
--- a/lib/src/runner/loader.dart
+++ b/lib/src/runner/loader.dart
@@ -260,6 +260,15 @@ void main(_, Map message) {
return new IsolateTest(test['name'], metadata, test['sendPort']);
}
+ /// Close all the browsers that the loader currently has open.
+ ///
+ /// Note that this doesn't close the loader itself. Browser tests can still be
+ /// loaded, they'll just spawn new browsers.
+ Future closeBrowsers() async {
+ if (!_browserServerMemo.hasRun) return;
+ await (await _browserServer).closeBrowsers();
+ }
+
/// Closes the loader and releases all resources allocated by it.
Future close() {
return _closeMemo.runOnce(() async {
« no previous file with comments | « lib/src/runner/browser/server.dart ('k') | test/io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698