Chromium Code Reviews| Index: lib/src/backend/live_test_controller.dart |
| diff --git a/lib/src/backend/live_test_controller.dart b/lib/src/backend/live_test_controller.dart |
| index 7eef5f8acfdc71609f9d3266424ebdef280e233b..f562c8e68f86416ebee73cecaad1757fca60f5d9 100644 |
| --- a/lib/src/backend/live_test_controller.dart |
| +++ b/lib/src/backend/live_test_controller.dart |
| @@ -151,7 +151,15 @@ class LiveTestController { |
| } |
| /// Emits a line printed by the test over [LiveTest.onPrint]. |
| - void print(String line) => _onPrintController.add(line); |
| + void print(String line) { |
| + if (_onPrintController.hasListener) { |
|
kevmoo
2015/07/23 20:47:03
what's a case where the controller has no listener
nweiz
2015/07/23 21:23:00
After the test package has received a signal, it w
|
| + _onPrintController.add(line); |
| + } else { |
| + // Make sure all prints get surfaced one way or another to aid in |
| + // debugging. |
| + Zone.ROOT.print(line); |
| + } |
| + } |
| /// A wrapper for [_onRun] that ensures that it follows the guarantees for |
| /// [LiveTest.run]. |