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

Unified Diff: tests/compiler/dart2js/patch_test.dart

Issue 2735763002: Create ResolutionEnqueuer after library loading. (Closed)
Patch Set: Updated cf. comments. 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
« no previous file with comments | « tests/compiler/dart2js/mock_compiler.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/patch_test.dart
diff --git a/tests/compiler/dart2js/patch_test.dart b/tests/compiler/dart2js/patch_test.dart
index c95cd5dc46b28289765e6f554f10e226fc0a5e9d..3ca88c3877cb31eab66474ff393b954b8a0263b7 100644
--- a/tests/compiler/dart2js/patch_test.dart
+++ b/tests/compiler/dart2js/patch_test.dart
@@ -23,7 +23,7 @@ Future<Compiler> applyPatch(String script, String patch,
bool analyzeOnly: false,
bool runCompiler: false,
String main: "",
- String patchVersion}) {
+ String patchVersion}) async {
Map<String, String> core = <String, String>{'script': script};
MockCompiler compiler = new MockCompiler.internal(
coreSource: core,
@@ -33,13 +33,12 @@ Future<Compiler> applyPatch(String script, String patch,
compiler.diagnosticHandler = createHandler(compiler, '');
var uri = Uri.parse("patch:core");
compiler.registerSource(uri, "$DEFAULT_PATCH_CORE_SOURCE\n$patch");
- var future;
if (runCompiler) {
- future = compiler.run(null, main);
+ await compiler.run(null, main);
} else {
- future = compiler.init(main);
+ await compiler.init(main);
}
- return future.then((_) => compiler);
+ return compiler;
}
void expectHasBody(compiler, ElementX element) {
« no previous file with comments | « tests/compiler/dart2js/mock_compiler.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698