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

Side by Side Diff: tests/compiler/dart2js/deferred_not_in_main_test.dart

Issue 169703003: Add prefix constraints for deferred imports. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 of the graph segmentation algorithm used by deferred loading 5 // Test of the graph segmentation algorithm used by deferred loading
6 // to determine which elements can be deferred and which libraries 6 // to determine which elements can be deferred and which libraries
7 // much be included in the initial download (loaded eagerly). 7 // much be included in the initial download (loaded eagerly).
8 8
9 import 'package:expect/expect.dart'; 9 import 'package:expect/expect.dart';
10 import "package:async_helper/async_helper.dart"; 10 import "package:async_helper/async_helper.dart";
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 import 'lib1.dart' as lib1; 61 import 'lib1.dart' as lib1;
62 62
63 void main() { 63 void main() {
64 lib1.foo1(); 64 lib1.foo1();
65 } 65 }
66 """, 66 """,
67 "lib1.dart":""" 67 "lib1.dart":"""
68 library lib1; 68 library lib1;
69 69
70 import 'dart:async'; 70 import 'dart:async';
71 @def import 'lib2.dart'; 71 @def import 'lib2.dart' as lib2;
72 72
73 const def = const DeferredLibrary('lib2'); 73 const def = const DeferredLibrary('lib2');
74 74
75 void foo1() { 75 void foo1() {
76 def.load().then((_) => foo2()); 76 def.load().then((_) => lib2.foo2());
77 } 77 }
78 """, 78 """,
79 "lib2.dart":""" 79 "lib2.dart":"""
80 library lib2; 80 library lib2;
81 81
82 void foo2() {} 82 void foo2() {}
83 """, 83 """,
84 }; 84 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698