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

Unified Diff: lib/src/backend/live_test_controller.dart

Issue 1248073003: Add a --pause-after-load flag for debugging. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 5 years, 5 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 | « CHANGELOG.md ('k') | lib/src/executable.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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].
« no previous file with comments | « CHANGELOG.md ('k') | lib/src/executable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698