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

Side by Side Diff: tests/compiler/dart2js/package_root_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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Test that the compiler can handle imports when package root has not been set. 5 // Test that the compiler can handle imports when package root has not been set.
6 6
7 library dart2js.test.package_root; 7 library dart2js.test.package_root;
8 8
9 import 'dart:async'; 9 import 'dart:async';
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 void main() { 52 void main() {
53 asyncTest(() async { 53 asyncTest(() async {
54 Uri script = currentDirectory.resolveUri(Platform.script); 54 Uri script = currentDirectory.resolveUri(Platform.script);
55 Uri packageRoot = script.resolve('./packages/'); 55 Uri packageRoot = script.resolve('./packages/');
56 56
57 PackagesDiscoveryProvider noPackagesDiscovery = (Uri uri) { 57 PackagesDiscoveryProvider noPackagesDiscovery = (Uri uri) {
58 return new Future.value(Packages.noPackages); 58 return new Future.value(Packages.noPackages);
59 }; 59 };
60 60
61 await runTest(Uri.parse('memory:main.dart'), MessageKind.READ_SCRIPT_ERROR, 61 await runTest(Uri.parse('memory:main.dart'), MessageKind.READ_URI_ERROR,
62 packageRoot: packageRoot); 62 packageRoot: packageRoot);
63 await runTest(Uri.parse('memory:main.dart'), MessageKind.LIBRARY_NOT_FOUND, 63 await runTest(Uri.parse('memory:main.dart'), MessageKind.LIBRARY_NOT_FOUND,
64 packageConfig: PACKAGE_CONFIG_URI); 64 packageConfig: PACKAGE_CONFIG_URI);
65 await runTest(Uri.parse('memory:main.dart'), MessageKind.LIBRARY_NOT_FOUND, 65 await runTest(Uri.parse('memory:main.dart'), MessageKind.LIBRARY_NOT_FOUND,
66 packagesDiscoveryProvider: noPackagesDiscovery); 66 packagesDiscoveryProvider: noPackagesDiscovery);
67 67
68 await runTest( 68 await runTest(
69 Uri.parse('package:foo/foo.dart'), MessageKind.READ_SELF_ERROR, 69 Uri.parse('package:foo/foo.dart'), MessageKind.READ_SELF_ERROR,
70 packageRoot: packageRoot); 70 packageRoot: packageRoot);
71 await runTest( 71 await runTest(
72 Uri.parse('package:foo/foo.dart'), MessageKind.LIBRARY_NOT_FOUND, 72 Uri.parse('package:foo/foo.dart'), MessageKind.LIBRARY_NOT_FOUND,
73 packageConfig: PACKAGE_CONFIG_URI); 73 packageConfig: PACKAGE_CONFIG_URI);
74 await runTest( 74 await runTest(
75 Uri.parse('package:foo/foo.dart'), MessageKind.LIBRARY_NOT_FOUND, 75 Uri.parse('package:foo/foo.dart'), MessageKind.LIBRARY_NOT_FOUND,
76 packagesDiscoveryProvider: noPackagesDiscovery); 76 packagesDiscoveryProvider: noPackagesDiscovery);
77 }); 77 });
78 } 78 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/missing_file_test.dart ('k') | tests/compiler/dart2js/serialization/equivalence_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698