| 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 | |
| 5 /// Tests how canonicalization works when developing in Dartium. | |
| 6 library canonicalization.test.dev_common; | |
| 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' show a; | |
| 13 import 'packages/canonicalization/b.dart' show b; | |
| 14 import 'package:canonicalization/c.dart' show c; | |
| 15 import 'package:canonicalization/d.dart' as d1 show d; | |
| 16 import 'packages/canonicalization/d.dart' as d2 show d; | |
| 17 | |
| 18 main() { | |
| 19 initPolymer(); | |
| 20 useHtmlConfiguration(); | |
| 21 | |
| 22 setUp(() => Polymer.onReady); | |
| 23 | |
| 24 test('canonicalization', () { | |
| 25 expect(a, 1, reason: 'Dartium loads "a" via a "package:" url.'); | |
| 26 | |
| 27 // We shouldn't be using 'packages/', but we do just to check that Dartium | |
| 28 // can't infer a "package:" url for it. | |
| 29 expect(b, 1, reason: 'Dartium picks the relative url for "b".'); | |
| 30 expect(c, 2, reason: '"c" was always imported with "package:" urls.'); | |
| 31 expect(d1.d, 1, reason: '"a" loads via "package:", but "b" does not.'); | |
| 32 expect(d2.d, 1, reason: '"b" loads via a relative url, but "a" does not.'); | |
| 33 }); | |
| 34 } | |
| OLD | NEW |