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

Unified Diff: tests/compiler/dart2js/kernel/visitor_test.dart

Issue 2760923004: Eliminate multi-callback structure for LibraryLoader. (Closed)
Patch Set: . Created 3 years, 9 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/kernel/visitor_test.dart
diff --git a/tests/compiler/dart2js/kernel/visitor_test.dart b/tests/compiler/dart2js/kernel/visitor_test.dart
index f4356fc8bcaeef7ce464ed78ee74b901f3e29816..8e91c199d5b59e2a19cb48e670807f381d382aee 100644
--- a/tests/compiler/dart2js/kernel/visitor_test.dart
+++ b/tests/compiler/dart2js/kernel/visitor_test.dart
@@ -41,8 +41,10 @@ main(List<String> arguments) async {
test(name, () async {
var compiler = await newCompiler();
await compiler.run(file.absolute.uri);
- LibraryElement library =
+ var loadedLibraries =
await compiler.libraryLoader.loadLibrary(file.absolute.uri);
+ compiler.processLoadedLibraries(loadedLibraries);
+ var library = loadedLibraries.rootLibrary;
JavaScriptBackend backend = compiler.backend;
StringBuffer buffer = new StringBuffer();
Program program = backend.kernelTask.buildProgram(library);
@@ -79,7 +81,10 @@ Future<Compiler> newCompiler() async {
// The visitor no longer enqueues elements that are not reachable from the
// program. The mixin-full resolution transform run by the test expects to
// find dart.core::Iterator.
- var core = await compiler.libraryLoader.loadLibrary(Uri.parse('dart:core'));
+ var loadedLibraries =
+ await compiler.libraryLoader.loadLibrary(Uri.parse('dart:core'));
+ compiler.processLoadedLibraries(loadedLibraries);
+ var core = loadedLibraries.rootLibrary;
compiler.startResolution();
var cls = core.implementation.localLookup('Iterator');
cls.ensureResolved(compiler.resolution);

Powered by Google App Engine
This is Rietveld 408576698