Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1501)

Side by Side Diff: test/testing.dart

Issue 11450020: (Fix #215) better error printing in editor & extension, adds mapping for editor (Closed) Base URL: git@github.com:dart-lang/dart-web-components.git@master
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« lib/src/messages.dart ('K') | « lib/src/options.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_components/src/analyzer.dart';
11 import 'package:web_components/src/info.dart'; 11 import 'package:web_components/src/info.dart';
12 import 'package:web_components/src/messages.dart'; 12 import 'package:web_components/src/messages.dart';
13 import 'package:web_components/src/options.dart'; 13 import 'package:web_components/src/options.dart';
14 import 'package:web_components/src/files.dart'; 14 import 'package:web_components/src/files.dart';
15 import 'package:web_components/src/file_system/path.dart'; 15 import 'package:web_components/src/file_system/path.dart';
16 16
17 useMockMessages() { 17 useMockMessages() {
18 messages = new Messages(printHandler: (message) {}); 18 messages = new Messages(shouldPrint: false);
19 } 19 }
20 20
21 Document parseDocument(String html) => parse(html); 21 Document parseDocument(String html) => parse(html);
22 22
23 Element parseSubtree(String html) => parseFragment(html).nodes[0]; 23 Element parseSubtree(String html) => parseFragment(html).nodes[0];
24 24
25 ElementInfo analyzeElement(Element elem) { 25 ElementInfo analyzeElement(Element elem) {
26 return analyzeNodeForTesting(elem).bodyInfo; 26 return analyzeNodeForTesting(elem).bodyInfo;
27 } 27 }
28 28
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 return res; 66 return res;
67 } 67 }
68 68
69 Map<String, FileInfo> _toStringMap(Map<Path, FileInfo> map) { 69 Map<String, FileInfo> _toStringMap(Map<Path, FileInfo> map) {
70 var res = new Map<String, FileInfo>(); 70 var res = new Map<String, FileInfo>();
71 for (var k in map.keys) { 71 for (var k in map.keys) {
72 res[k.toString()] = map[k]; 72 res[k.toString()] = map[k];
73 } 73 }
74 return res; 74 return res;
75 } 75 }
OLDNEW
« lib/src/messages.dart ('K') | « lib/src/options.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698