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

Side by Side Diff: pkg/analyzer/test/src/task/html_test.dart

Issue 1341723003: Add an extension point for contributing to HTML_ERRORS. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 months 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 test.src.task.html_test; 5 library test.src.task.html_test;
6 6
7 import 'package:analyzer/src/generated/source.dart'; 7 import 'package:analyzer/src/generated/source.dart';
8 import 'package:analyzer/src/task/html.dart'; 8 import 'package:analyzer/src/task/html.dart';
9 import 'package:analyzer/task/html.dart'; 9 import 'package:analyzer/task/html.dart';
10 import 'package:analyzer/task/model.dart'; 10 import 'package:analyzer/task/model.dart';
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 </body> 168 </body>
169 </html>'''); 169 </html>''');
170 computeResult(target, REFERENCED_LIBRARIES, matcher: isDartScriptsTask); 170 computeResult(target, REFERENCED_LIBRARIES, matcher: isDartScriptsTask);
171 expect(outputs[REFERENCED_LIBRARIES], hasLength(1)); 171 expect(outputs[REFERENCED_LIBRARIES], hasLength(1));
172 expect(outputs[DART_SCRIPTS], hasLength(0)); 172 expect(outputs[DART_SCRIPTS], hasLength(0));
173 } 173 }
174 } 174 }
175 175
176 @reflectiveTest 176 @reflectiveTest
177 class HtmlErrorsTaskTest extends AbstractContextTest { 177 class HtmlErrorsTaskTest extends AbstractContextTest {
178 test_buildInputs() {
179 Source source = newSource('/test.html');
180 Map<String, TaskInput> inputs = HtmlErrorsTask.buildInputs(source);
181 expect(inputs, isNotNull);
182 expect(
183 inputs.keys,
184 unorderedEquals([
185 HtmlErrorsTask.DART_ERRORS_INPUT,
186 HtmlErrorsTask.DOCUMENT_ERRORS_INPUT
187 ]));
188 }
189
190 test_constructor() { 178 test_constructor() {
191 Source source = newSource('/test.html'); 179 Source source = newSource('/test.html');
192 HtmlErrorsTask task = new HtmlErrorsTask(context, source); 180 HtmlErrorsTask task = new HtmlErrorsTask(context, source);
193 expect(task, isNotNull); 181 expect(task, isNotNull);
194 expect(task.context, context); 182 expect(task.context, context);
195 expect(task.target, source); 183 expect(task.target, source);
196 } 184 }
197 185
198 test_createTask() { 186 test_createTask() {
199 Source source = newSource('/test.html'); 187 Source source = newSource('/test.html');
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 <h1 Test> 306 <h1 Test>
319 </body> 307 </body>
320 </html> 308 </html>
321 '''); 309 ''');
322 computeResult(target, HTML_DOCUMENT); 310 computeResult(target, HTML_DOCUMENT);
323 expect(task, isParseHtmlTask); 311 expect(task, isParseHtmlTask);
324 expect(outputs[HTML_DOCUMENT], isNotNull); 312 expect(outputs[HTML_DOCUMENT], isNotNull);
325 expect(outputs[HTML_DOCUMENT_ERRORS], isNotEmpty); 313 expect(outputs[HTML_DOCUMENT_ERRORS], isNotEmpty);
326 } 314 }
327 } 315 }
OLDNEW
« pkg/analyzer/lib/src/task/html.dart ('K') | « pkg/analyzer/lib/src/task/html.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698