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

Unified Diff: tests/compiler/dart2js/kernel/class_hierarchy_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/class_hierarchy_test.dart
diff --git a/tests/compiler/dart2js/kernel/class_hierarchy_test.dart b/tests/compiler/dart2js/kernel/class_hierarchy_test.dart
index bb90c675101a001c440b33f342a6b0c7ecb04161..bb18502397497e7ac5861d3ed4c59b2504b0f87e 100644
--- a/tests/compiler/dart2js/kernel/class_hierarchy_test.dart
+++ b/tests/compiler/dart2js/kernel/class_hierarchy_test.dart
@@ -5,10 +5,11 @@
/// Test that the dart2js copy of [KernelVisitor] generates the expected class
/// hierarchy.
+import 'package:compiler/src/commandline_options.dart' show Flags;
import 'package:compiler/src/compiler.dart' show Compiler;
import 'package:compiler/src/elements/elements.dart';
import 'package:compiler/src/js_backend/backend.dart' show JavaScriptBackend;
-import 'package:compiler/src/commandline_options.dart' show Flags;
+import 'package:compiler/src/library_loader.dart' show LoadedLibraries;
import 'package:kernel/ast.dart' as ir;
import 'package:kernel/class_hierarchy.dart';
import 'package:test/test.dart';
@@ -37,9 +38,11 @@ main(List<String> arguments) {
test('mixin', () async {
Uri mainUri = Uri.parse('memory:main.dart');
await compiler.run(mainUri);
- LibraryElement library = await compiler.libraryLoader.loadLibrary(mainUri);
+ LoadedLibraries libraries =
+ await compiler.libraryLoader.loadLibrary(mainUri);
+ compiler.processLoadedLibraries(libraries);
JavaScriptBackend backend = compiler.backend;
- ir.Program program = backend.kernelTask.buildProgram(library);
+ ir.Program program = backend.kernelTask.buildProgram(libraries.rootLibrary);
ClassHierarchy hierarchy = new ClassHierarchy(program);
ir.Class getClass(String name) {

Powered by Google App Engine
This is Rietveld 408576698