Chromium Code Reviews

Unified Diff: lib/src/runner/browser/iframe_listener.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.
Jump to:
View side-by-side diff with in-line comments
Index: lib/src/runner/browser/iframe_listener.dart
diff --git a/lib/src/runner/browser/iframe_listener.dart b/lib/src/runner/browser/iframe_listener.dart
index 6cef9f62b2022d1a69f25605e3b95a8bb37ca1d7..cdc9edad9321aad065e5434f6b7aee5d99377deb 100644
--- a/lib/src/runner/browser/iframe_listener.dart
+++ b/lib/src/runner/browser/iframe_listener.dart
@@ -143,6 +143,11 @@ class IframeListener {
void _runTest(Test test, MultiChannel channel) {
var liveTest = test.load(_suite);
+ channel.stream.listen((message) {
+ assert(message['command'] == 'close');
+ liveTest.close();
+ });
+
liveTest.onStateChange.listen((state) {
channel.sink.add({
"type": "state-change",

Powered by Google App Engine