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

Unified Diff: tests/utils/recursive_import_test.dart

Issue 14690009: Make Completers asynchronous. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. 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
Index: tests/utils/recursive_import_test.dart
diff --git a/tests/utils/recursive_import_test.dart b/tests/utils/recursive_import_test.dart
index 15a09bee79c6975408876974bb19c00325eaf7e6..d4117077d852048e4a642bb613a1e8d567e05e76 100644
--- a/tests/utils/recursive_import_test.dart
+++ b/tests/utils/recursive_import_test.dart
@@ -61,7 +61,6 @@ main() {}
main() {
int count = 0;
Future<String> provider(Uri uri) {
- Completer<String> completer = new Completer<String>();
String source;
if (uri.path.length > 100) {
// Simulate an OS error.
@@ -84,8 +83,7 @@ main() {
} else {
throw "unexpected URI $uri";
}
- completer.complete(source);
- return completer.future;
+ return new Future.value(source);
}
int warningCount = 0;
« pkg/scheduled_test/test/value_future_test.dart ('K') | « tests/utils/dummy_compiler_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698