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

Side by Side Diff: tests/compiler/dart2js/missing_file_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.missing_file; 7 library dart2js.test.missing_file;
8 8
9 import 'dart:async'; 9 import 'dart:async';
10 import 'package:async_helper/async_helper.dart'; 10 import 'package:async_helper/async_helper.dart';
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 if (info != null) { 47 if (info != null) {
48 Expect.equals(info, diagnostics.infos.first.message.kind); 48 Expect.equals(info, diagnostics.infos.first.message.kind);
49 } 49 }
50 Expect.equals(0, diagnostics.warnings.length); 50 Expect.equals(0, diagnostics.warnings.length);
51 Expect.equals(0, diagnostics.hints.length); 51 Expect.equals(0, diagnostics.hints.length);
52 } 52 }
53 53
54 void main() { 54 void main() {
55 asyncTest(() async { 55 asyncTest(() async {
56 await runTest(Uri.parse('memory:main.dart'), 56 await runTest(Uri.parse('memory:main.dart'),
57 error: MessageKind.READ_SCRIPT_ERROR); 57 error: MessageKind.READ_URI_ERROR);
58 58
59 await runTest(Uri.parse('memory:foo.dart'), 59 await runTest(Uri.parse('memory:foo.dart'),
60 error: MessageKind.READ_SELF_ERROR); 60 error: MessageKind.READ_SELF_ERROR);
61 61
62 await runTest(Uri.parse('dart:foo'), error: MessageKind.LIBRARY_NOT_FOUND); 62 await runTest(Uri.parse('dart:foo'), error: MessageKind.LIBRARY_NOT_FOUND);
63 63
64 await runTest(Uri.parse('dart:_mirror_helper'), 64 await runTest(Uri.parse('dart:_mirror_helper'),
65 error: MessageKind.INTERNAL_LIBRARY, 65 error: MessageKind.INTERNAL_LIBRARY,
66 info: MessageKind.DISALLOWED_LIBRARY_IMPORT); 66 info: MessageKind.DISALLOWED_LIBRARY_IMPORT);
67 67
68 await runTest(Uri.parse('memory:bar.dart'), 68 await runTest(Uri.parse('memory:bar.dart'),
69 error: MessageKind.LIBRARY_NOT_FOUND); 69 error: MessageKind.LIBRARY_NOT_FOUND);
70 70
71 // Importing dart:io is temporarily allowed as a stopgap measure for the 71 // Importing dart:io is temporarily allowed as a stopgap measure for the
72 // lack of config specific imports. Once that is added, this will be 72 // lack of config specific imports. Once that is added, this will be
73 // disallowed again. 73 // disallowed again.
74 74
75 //await runTest(Uri.parse('dart:io'), 75 //await runTest(Uri.parse('dart:io'),
76 // error: MessageKind.LIBRARY_NOT_SUPPORTED, 76 // error: MessageKind.LIBRARY_NOT_SUPPORTED,
77 // info: MessageKind.DISALLOWED_LIBRARY_IMPORT); 77 // info: MessageKind.DISALLOWED_LIBRARY_IMPORT);
78 78
79 //await runTest(Uri.parse('memory:baz.dart'), 79 //await runTest(Uri.parse('memory:baz.dart'),
80 // error: MessageKind.LIBRARY_NOT_SUPPORTED, 80 // error: MessageKind.LIBRARY_NOT_SUPPORTED,
81 // info: MessageKind.DISALLOWED_LIBRARY_IMPORT); 81 // info: MessageKind.DISALLOWED_LIBRARY_IMPORT);
82 }); 82 });
83 } 83 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/memory_source_file_helper.dart ('k') | tests/compiler/dart2js/package_root_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698