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

Unified Diff: lib/src/runner/browser/iframe_test.dart

Issue 1056733002: Run test tearDowns and clean up temporary directories when a signal is caught. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 5 years, 9 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/iframe_listener.dart ('k') | lib/src/runner/browser/server.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/runner/browser/iframe_test.dart
diff --git a/lib/src/runner/browser/iframe_test.dart b/lib/src/runner/browser/iframe_test.dart
index 6b663ab1999163750a977b951fee532e8f9666b0..6b799419c5ba8458639c86dae4c79d83180fee85 100644
--- a/lib/src/runner/browser/iframe_test.dart
+++ b/lib/src/runner/browser/iframe_test.dart
@@ -25,10 +25,11 @@ class IframeTest implements Test {
LiveTest load(Suite suite) {
var controller;
+ var testChannel;
controller = new LiveTestController(suite, this, () {
controller.setState(const State(Status.running, Result.success));
- var testChannel = _channel.virtualChannel();
+ testChannel = _channel.virtualChannel();
_channel.sink.add({
'command': 'run',
'channel': testChannel.id
@@ -50,6 +51,12 @@ class IframeTest implements Test {
controller.completer.complete();
}
});
+ }, () {
+ // Ignore all future messages from the test and complete it immediately.
+ // We don't need to tell it to run its tear-down because there's nothing a
+ // browser test needs to clean up on the file system anyway.
+ testChannel.sink.close();
+ if (!controller.completer.isCompleted) controller.completer.complete();
});
return controller.liveTest;
}
« no previous file with comments | « lib/src/runner/browser/iframe_listener.dart ('k') | lib/src/runner/browser/server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698