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

Unified Diff: tests/compiler/dart2js/serialization/test_data.dart

Issue 2150533002: Serialize data for LibraryElement.getImportsFor (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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/serialization/test_data.dart
diff --git a/tests/compiler/dart2js/serialization/test_data.dart b/tests/compiler/dart2js/serialization/test_data.dart
index ba29340091293597b2be8fe51aac49f36854df94..dd12bfd81b4eb6a9eec793c8a59c604644320034 100644
--- a/tests/compiler/dart2js/serialization/test_data.dart
+++ b/tests/compiler/dart2js/serialization/test_data.dart
@@ -594,6 +594,43 @@ class C {
test() => new C().foo = 0;
''',
}, checkedMode: true),
+
+ const Test('Deferred access', const {
+ 'main.dart': '''
+import 'a.dart';
+
+main() {
+ test();
+}
+''',
+ }, preserializedSourceFiles: const {
+ 'a.dart': '''
+import 'b.dart' deferred as b;
+
+test() => b.loadLibrary().then((_) => b.test2());
+''',
+ 'b.dart': '''
+test2() {}
+''',
+ }),
+
+ const Test('Deferred access of dart:core', const {
+ 'main.dart': '''
+import 'a.dart';
+
+main() {
+ test();
+}
+''',
+ }, preserializedSourceFiles: const {
+ 'a.dart': '''
+import "dart:core" deferred as core;
+
+test() {
+ core.loadLibrary().then((_) => null);
+}
+''',
+ }),
];
class Test {

Powered by Google App Engine
This is Rietveld 408576698