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

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

Issue 2897903003: Support loading binary data in dart2js (Closed)
Patch Set: Updated cf. comments Created 3 years, 7 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/import_test.dart ('k') | tests/compiler/dart2js/library_resolution_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/library_env_test.dart
diff --git a/tests/compiler/dart2js/library_env_test.dart b/tests/compiler/dart2js/library_env_test.dart
index d07450ac1fdc48f00900f9acae889466ef509489..0960b39dde172c7bb460dbbe2fd94f501765d670 100644
--- a/tests/compiler/dart2js/library_env_test.dart
+++ b/tests/compiler/dart2js/library_env_test.dart
@@ -5,7 +5,9 @@
/// Check that 'dart:' libraries have their corresponding dart.library.X
/// environment variable set.
-import "memory_source_file_helper.dart";
+import 'dart:async';
+
+import 'memory_source_file_helper.dart';
import "package:async_helper/async_helper.dart";
@@ -15,10 +17,12 @@ import 'package:compiler/src/null_compiler_output.dart' show NullCompilerOutput;
import 'package:compiler/src/options.dart' show CompilerOptions;
+import 'package:compiler/src/io/source_file.dart' show Binary;
+
import 'package:compiler/compiler_new.dart'
- show CompilerInput, CompilerDiagnostics;
+ show CompilerInput, CompilerDiagnostics, Input, InputKind;
-const clientPlatform = r'''
+const String clientPlatform = r'''
[dart-spec]
spec: 3rd edition.
@@ -32,7 +36,7 @@ collection: collection/collection.dart
html: html/dart2js/html_dart2js.dart
''';
-const serverPlatform = r'''
+const String serverPlatform = r'''
[dart-spec]
spec: 3rd edition.
@@ -49,11 +53,12 @@ io: io/io.dart
class DummyCompilerInput implements CompilerInput {
const DummyCompilerInput();
- readFromUri(uri) async {
+ Future<Input> readFromUri(Uri uri,
+ {InputKind inputKind: InputKind.utf8}) async {
if (uri.toString().endsWith("dart_client.platform")) {
- return clientPlatform;
+ return new Binary(uri, clientPlatform.codeUnits);
} else if (uri.toString().endsWith("dart_server.platform")) {
- return serverPlatform;
+ return new Binary(uri, serverPlatform.codeUnits);
} else {
throw "should not be needed $uri";
}
« no previous file with comments | « tests/compiler/dart2js/import_test.dart ('k') | tests/compiler/dart2js/library_resolution_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698