OLD | NEW |
| (Empty) |
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 | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 library experimental_boot.test.import_test; | |
5 | |
6 import 'package:unittest/unittest.dart'; | |
7 import 'package:unittest/html_config.dart'; | |
8 import 'package:polymer/polymer.dart'; | |
9 | |
10 import 'package:experimental_boot/a.dart' show a; | |
11 import 'packages/experimental_boot/b.dart' show b; | |
12 import 'package:experimental_boot/c.dart' show c; | |
13 import 'package:experimental_boot/d.dart' as d1 show d; | |
14 import 'packages/experimental_boot/d.dart' as d2 show d; | |
15 | |
16 @initMethod | |
17 main() { | |
18 useHtmlConfiguration(); | |
19 | |
20 setUp(() => Polymer.onReady); | |
21 | |
22 test('canonicalization with experimental bootstrap', () { | |
23 expect(a, 1, | |
24 reason: 'deploy picks the "package:" url as the canonical url for ' | |
25 'script tags.'); | |
26 | |
27 // We shouldn't be using 'packages/' above, so that's ok. | |
28 expect(b, 0, | |
29 reason: 'we pick the "package:" url as the canonical url for script ' | |
30 'tags.'); | |
31 expect(c, 2, reason: 'c was always imported with "package:" urls.'); | |
32 expect(d1.d, 2, reason: 'both a and b are loaded using package: urls'); | |
33 expect(d2.d, 0, reason: 'both a and b are loaded using package: urls'); | |
34 }); | |
35 } | |
OLD | NEW |