OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 library analyzer_test; | 5 library analyzer_test; |
6 | 6 |
7 import 'package:html5lib/dom.dart'; | 7 import 'package:html5lib/dom.dart'; |
8 import 'package:html5lib/parser.dart'; | 8 import 'package:html5lib/parser.dart'; |
9 import 'package:unittest/unittest.dart'; | 9 import 'package:unittest/unittest.dart'; |
10 import 'package:unittest/vm_config.dart'; | 10 import 'package:unittest/vm_config.dart'; |
11 import 'package:web_components/src/analyzer.dart'; | 11 import 'package:web_ui/src/analyzer.dart'; |
12 import 'package:web_components/src/info.dart'; | 12 import 'package:web_ui/src/info.dart'; |
13 import 'package:web_components/src/files.dart'; | 13 import 'package:web_ui/src/files.dart'; |
14 import 'package:web_components/src/file_system/path.dart'; | 14 import 'package:web_ui/src/file_system/path.dart'; |
15 import 'package:web_components/src/messages.dart'; | 15 import 'package:web_ui/src/messages.dart'; |
16 import 'package:web_components/src/utils.dart'; | 16 import 'package:web_ui/src/utils.dart'; |
17 import 'testing.dart'; | 17 import 'testing.dart'; |
18 | 18 |
19 main() { | 19 main() { |
20 useVmConfiguration(); | 20 useVmConfiguration(); |
21 useMockMessages(); | 21 useMockMessages(); |
22 | 22 |
23 test('parse single element', () { | 23 test('parse single element', () { |
24 var input = '<div></div>'; | 24 var input = '<div></div>'; |
25 var elem = parseSubtree(input); | 25 var elem = parseSubtree(input); |
26 expect(elem.outerHTML, input); | 26 expect(elem.outerHTML, input); |
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
762 var info = fileInfo['index.html']; | 762 var info = fileInfo['index.html']; |
763 expect(info.components.keys, equals(['x-bar', 'x-foo'])); | 763 expect(info.components.keys, equals(['x-bar', 'x-foo'])); |
764 | 764 |
765 var compInfo = fileInfo['foo.html'].declaredComponents[0]; | 765 var compInfo = fileInfo['foo.html'].declaredComponents[0]; |
766 expect(info.query('x-foo').component, equals(compInfo)); | 766 expect(info.query('x-foo').component, equals(compInfo)); |
767 compInfo = fileInfo['bar.html'].declaredComponents[0]; | 767 compInfo = fileInfo['bar.html'].declaredComponents[0]; |
768 expect(info.query('x-bar').component, equals(compInfo)); | 768 expect(info.query('x-bar').component, equals(compInfo)); |
769 }); | 769 }); |
770 }); | 770 }); |
771 } | 771 } |
OLD | NEW |