Chromium Code Reviews| 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..d17310074287116a3fa7d164bcafc9e2d277f9e7 100644 |
| --- a/lib/src/runner/browser/iframe_test.dart |
| +++ b/lib/src/runner/browser/iframe_test.dart |
| @@ -4,6 +4,8 @@ |
| library test.runner.browser.iframe_test; |
| +import 'dart:async'; |
| + |
| import '../../backend/live_test.dart'; |
| import '../../backend/live_test_controller.dart'; |
| import '../../backend/metadata.dart'; |
| @@ -25,10 +27,12 @@ class IframeTest implements Test { |
| LiveTest load(Suite suite) { |
| var controller; |
| + var testChannel; |
| + var closeCompleter = new Completer(); |
|
kevmoo
2015/04/03 00:49:45
This seems to not be used?
nweiz
2015/04/03 20:56:21
Done.
|
| 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 +54,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; |
| } |