OLD | NEW |
| (Empty) |
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 | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 /// Tests how canonicalization works during development. | |
6 library canonicalization.dev3_test; | |
7 | |
8 import 'package:unittest/unittest.dart'; | |
9 import 'package:unittest/html_config.dart'; | |
10 import 'package:polymer/polymer.dart'; | |
11 | |
12 import 'package:canonicalization/a.dart'; | |
13 import 'packages/canonicalization/b.dart'; | |
14 import 'package:canonicalization/c.dart'; | |
15 import 'package:canonicalization/d.dart' as d1; | |
16 import 'packages/canonicalization/d.dart' as d2; | |
17 | |
18 main() { | |
19 initPolymer(); | |
20 useHtmlConfiguration(); | |
21 | |
22 setUp(() => Polymer.onReady); | |
23 | |
24 test('canonicalization', () { | |
25 expect(a, 1, reason: | |
26 'initPolymer picks the "package:" url as the canonical url for script ' | |
27 'tags whose library is also loaded with a "package:" url.'); | |
28 expect(b, 1, reason: | |
29 'initPolymer does nothing with script tags where the program doesn\'t ' | |
30 'use a "package:" urls matching the same library.'); | |
31 expect(c, 2, reason: 'c was always imported with "package:" urls.'); | |
32 expect(d1.d, 1, reason: 'this matches the import from a'); | |
33 expect(d2.d, 1, reason: 'this matches the import from b'); | |
34 }); | |
35 } | |
OLD | NEW |