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

Unified Diff: pkg/scheduled_test/test/substitute_future_test.dart

Issue 15128002: Address comments from https://codereview.chromium.org/14690009 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add missing `completion`. Created 7 years, 7 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 | « no previous file | pkg/scheduled_test/test/value_future_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/scheduled_test/test/substitute_future_test.dart
diff --git a/pkg/scheduled_test/test/substitute_future_test.dart b/pkg/scheduled_test/test/substitute_future_test.dart
index 5cffb4b6b62ee494a1071529b935ee6d08898573..b3cade8c434c23d8e78b2d2f4d887b59d1df9c60 100644
--- a/pkg/scheduled_test/test/substitute_future_test.dart
+++ b/pkg/scheduled_test/test/substitute_future_test.dart
@@ -148,9 +148,9 @@ void main() {
var completer = new Completer();
var future = new SubstituteFuture(completer.future);
completer.complete('success');
- future.then(expectAsync1((_) {
- expect(() => future.substitute(new Future.value()),
- throwsStateError);
- }));
+ // The completer finishes asynchronously. So we have to wait for it to
+ // be completed before we can substitute.
+ expect(future.then((_) => future.substitute(new Future.value())),
+ throwsStateError);
});
}
« no previous file with comments | « no previous file | pkg/scheduled_test/test/value_future_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698