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

Unified Diff: tests/lib/async/catch_errors3_test.dart

Issue 23875032: Expose Zones. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 7 years, 3 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 | « tests/lib/async/catch_errors2_test.dart ('k') | tests/lib/async/catch_errors4_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/async/catch_errors3_test.dart
diff --git a/tests/lib/async/catch_errors3_test.dart b/tests/lib/async/catch_errors3_test.dart
index ee55620982d3297671ced0790e494870cc415098..10b5f1b03d8494ab270727097d19cf197ee6d3e0 100644
--- a/tests/lib/async/catch_errors3_test.dart
+++ b/tests/lib/async/catch_errors3_test.dart
@@ -9,11 +9,11 @@ import 'catch_errors.dart';
main() {
asyncStart();
+ Completer done = new Completer();
bool futureWasExecuted = false;
bool future2WasExecuted = false;
- // Make sure `catchErrors` doesn't close its error stream before all
- // asynchronous operations are done.
+ // Make sure `catchErrors` never closes its stream.
catchErrors(() {
new Future(() => 499).then((x) {
futureWasExecuted = true;
@@ -21,6 +21,8 @@ main() {
runAsync(() {
new Future(() => 42).then((x) {
future2WasExecuted = true;
+ Expect.isTrue(futureWasExecuted);
+ done.complete(true);
});
});
return 'allDone';
@@ -28,8 +30,7 @@ main() {
Expect.fail("Unexpected callback");
},
onDone: () {
- Expect.isTrue(futureWasExecuted);
- Expect.isTrue(future2WasExecuted);
- asyncEnd();
+ Expect.fail("Unexpected callback");
});
+ done.future.whenComplete(asyncEnd);
}
« no previous file with comments | « tests/lib/async/catch_errors2_test.dart ('k') | tests/lib/async/catch_errors4_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698