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

Unified Diff: tests/utils/dummy_compiler_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/dummy_compiler_test.dart
diff --git a/tests/utils/dummy_compiler_test.dart b/tests/utils/dummy_compiler_test.dart
index 470d79a03c176436eff5e13305bf088307e12721..3ed3e179f9136dc3741dd8024a8048f4e3422e74 100644
--- a/tests/utils/dummy_compiler_test.dart
+++ b/tests/utils/dummy_compiler_test.dart
@@ -11,7 +11,6 @@ import 'dart:uri';
import '../../sdk/lib/_internal/compiler/compiler.dart';
Future<String> provider(Uri uri) {
- Completer<String> completer = new Completer<String>();
String source;
if (uri.scheme == "main") {
source = "main() {}";
@@ -80,8 +79,7 @@ Future<String> provider(Uri uri) {
} else {
throw "unexpected URI $uri";
}
- completer.complete(source);
- return completer.future;
+ return new Future.value(source);
}
void handler(Uri uri, int begin, int end, String message, Diagnostic kind) {

Powered by Google App Engine
This is Rietveld 408576698