| 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 /** Common definitions used for setting up the test environment. */ | 5 /** Common definitions used for setting up the test environment. */ |
| 6 library testing; | 6 library testing; |
| 7 | 7 |
| 8 import 'package:html5lib/dom.dart'; | 8 import 'package:html5lib/dom.dart'; |
| 9 import 'package:html5lib/parser.dart'; | 9 import 'package:html5lib/parser.dart'; |
| 10 import 'package:web_components/src/analyzer.dart'; | 10 import 'package:web_ui/src/analyzer.dart'; |
| 11 import 'package:web_components/src/info.dart'; | 11 import 'package:web_ui/src/info.dart'; |
| 12 import 'package:web_components/src/messages.dart'; | 12 import 'package:web_ui/src/messages.dart'; |
| 13 import 'package:web_components/src/options.dart'; | 13 import 'package:web_ui/src/options.dart'; |
| 14 import 'package:web_components/src/files.dart'; | 14 import 'package:web_ui/src/files.dart'; |
| 15 import 'package:web_components/src/file_system/path.dart'; | 15 import 'package:web_ui/src/file_system/path.dart'; |
| 16 import 'package:web_components/src/utils.dart'; | 16 import 'package:web_ui/src/utils.dart'; |
| 17 | 17 |
| 18 useMockMessages() { | 18 useMockMessages() { |
| 19 messages = new Messages(shouldPrint: false); | 19 messages = new Messages(shouldPrint: false); |
| 20 } | 20 } |
| 21 | 21 |
| 22 Document parseDocument(String html) => parse(html); | 22 Document parseDocument(String html) => parse(html); |
| 23 | 23 |
| 24 Element parseSubtree(String html) => parseFragment(html).nodes[0]; | 24 Element parseSubtree(String html) => parseFragment(html).nodes[0]; |
| 25 | 25 |
| 26 ElementInfo analyzeElement(Element elem) { | 26 ElementInfo analyzeElement(Element elem) { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 return res; | 68 return res; |
| 69 } | 69 } |
| 70 | 70 |
| 71 Map<String, FileInfo> _toStringMap(Map<Path, FileInfo> map) { | 71 Map<String, FileInfo> _toStringMap(Map<Path, FileInfo> map) { |
| 72 var res = new Map<String, FileInfo>(); | 72 var res = new Map<String, FileInfo>(); |
| 73 for (var k in map.keys) { | 73 for (var k in map.keys) { |
| 74 res[k.toString()] = map[k]; | 74 res[k.toString()] = map[k]; |
| 75 } | 75 } |
| 76 return res; | 76 return res; |
| 77 } | 77 } |
| OLD | NEW |