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

Unified Diff: tests/compiler/dart2js/type_test_helper.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
Index: tests/compiler/dart2js/type_test_helper.dart
diff --git a/tests/compiler/dart2js/type_test_helper.dart b/tests/compiler/dart2js/type_test_helper.dart
index db1a43f8a95153a5fbaaba5a173903dd09a89160..5a21201d9da189bbd018ac91fa807a430390f329 100644
--- a/tests/compiler/dart2js/type_test_helper.dart
+++ b/tests/compiler/dart2js/type_test_helper.dart
@@ -4,6 +4,7 @@
library type_test_helper;
+import 'dart:async';
import "package:expect/expect.dart";
import '../../../sdk/lib/_internal/compiler/implementation/dart_types.dart';
import "parser_helper.dart" show SourceString;
@@ -22,7 +23,7 @@ GenericType instantiate(TypeDeclarationElement element,
class TypeEnvironment {
final MockCompiler compiler;
- factory TypeEnvironment(String source) {
+ static Future<TypeEnvironment> create(String source) {
var uri = new Uri(scheme: 'source');
MockCompiler compiler = compilerFor('''
main() {}
@@ -30,8 +31,9 @@ class TypeEnvironment {
uri,
analyzeAll: true,
analyzeOnly: true);
- compiler.runCompiler(uri);
- return new TypeEnvironment._(compiler);
+ return compiler.runCompiler(uri).then((_) {
+ return new TypeEnvironment._(compiler);
+ });
}
TypeEnvironment._(MockCompiler this.compiler);
« no previous file with comments | « tests/compiler/dart2js/type_substitution_test.dart ('k') | tests/compiler/dart2js/type_variable_bound_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698