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

Unified Diff: tests/compiler/dart2js/reexport_handled_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: Created 7 years, 6 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/compiler/dart2js/reexport_handled_test.dart
diff --git a/tests/compiler/dart2js/reexport_handled_test.dart b/tests/compiler/dart2js/reexport_handled_test.dart
index d309fcd94741957dbea46366faf812c8fd242a33..64897206caaca32b483e57adc37521b7be2915a9 100644
--- a/tests/compiler/dart2js/reexport_handled_test.dart
+++ b/tests/compiler/dart2js/reexport_handled_test.dart
@@ -28,19 +28,21 @@ void main() {
compiler.registerSource(reexportingLibraryUri, REEXPORTING_LIBRARY_SOURCE);
// Load exporting library before the reexporting library.
- var exportingLibrary = compiler.libraryLoader.loadLibrary(
- exportingLibraryUri, null, exportingLibraryUri);
- Expect.isTrue(exportingLibrary.exportsHandled);
- var foo = findInExports(exportingLibrary, 'foo');
- Expect.isNotNull(foo);
- Expect.isTrue(foo.isField());
-
- // Load reexporting library when exports are handled on the exporting library.
- var reexportingLibrary = compiler.libraryLoader.loadLibrary(
- reexportingLibraryUri, null, reexportingLibraryUri);
- foo = findInExports(reexportingLibrary, 'foo');
- Expect.isNotNull(foo);
- Expect.isTrue(foo.isField());
+ compiler.libraryLoader.loadLibrary(
+ exportingLibraryUri, null, exportingLibraryUri).then((exportingLibrary) {
+ Expect.isTrue(exportingLibrary.exportsHandled);
+ var foo = findInExports(exportingLibrary, 'foo');
+ Expect.isNotNull(foo);
+ Expect.isTrue(foo.isField());
+
+ // Load reexporting library when exports are handled on the exporting library.
+ return compiler.libraryLoader.loadLibrary(
+ reexportingLibraryUri, null, reexportingLibraryUri);
+ }).then((reexportingLibrary) {
+ var foo = findInExports(reexportingLibrary, 'foo');
+ Expect.isNotNull(foo);
+ Expect.isTrue(foo.isField());
+ });
}
Element findInExports(LibraryElement library, String name) {

Powered by Google App Engine
This is Rietveld 408576698