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

Unified Diff: lib/src/invoker.dart

Issue 933083002: Add a test runner executable. (Closed) Base URL: git@github.com:dart-lang/unittest@master
Patch Set: Code review changes Created 5 years, 10 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/exit_codes.dart ('k') | lib/src/load_exception.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/invoker.dart
diff --git a/lib/src/invoker.dart b/lib/src/invoker.dart
index 4d14b48d6bf3ccf05ac8962eab502fd42af28af4..edc6d62227ad548c2e9389537d60233ec01e58d4 100644
--- a/lib/src/invoker.dart
+++ b/lib/src/invoker.dart
@@ -172,7 +172,10 @@ class Invoker {
timer.cancel();
_controller.setState(
new State(Status.complete, liveTest.state.result));
- _controller.completer.complete();
+
+ // Use [Timer.run] here to avoid starving the DOM or other
+ // non-microtask events.
+ Timer.run(_controller.completer.complete);
});
}, zoneValues: {#unittest.invoker: this}, onError: handleError);
});
« no previous file with comments | « lib/src/exit_codes.dart ('k') | lib/src/load_exception.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698