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

Unified Diff: tests/utils/recursive_import_test.dart

Issue 17759007: First pass at asynchronous input loading in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments 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/utils/dummy_compiler_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/utils/recursive_import_test.dart
diff --git a/tests/utils/recursive_import_test.dart b/tests/utils/recursive_import_test.dart
index b0a042dfcadd05918107b1220ad06880013434c6..0bb8769d9cd1a76cbbd652efc96831946b161044 100644
--- a/tests/utils/recursive_import_test.dart
+++ b/tests/utils/recursive_import_test.dart
@@ -5,6 +5,7 @@
// Test of "recursive" imports using the dart2js compiler API.
import "package:expect/expect.dart";
+import "package:async_helper/async_helper.dart";
import 'dart:async';
import '../../sdk/lib/_internal/compiler/compiler.dart';
@@ -90,7 +91,7 @@ main() {
source = "library lib${uri.path.replaceAll('/', '.')};";
}
} else {
- throw "unexpected URI $uri";
+ return new Future.error("unexpected URI $uri");
}
return new Future.value(source);
}
@@ -111,6 +112,7 @@ main() {
}
}
+ asyncStart();
Future<String> result =
compile(new Uri(scheme: 'main'),
new Uri(scheme: 'lib', path: '/'),
@@ -125,5 +127,5 @@ main() {
Expect.equals(1, errorCount);
}, onError: (e) {
throw 'Compilation failed';
- });
+ }).whenComplete(() => asyncEnd());
}
« no previous file with comments | « tests/utils/dummy_compiler_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698