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

Side by Side Diff: pkg/polymer/test/build/code_extractor.dart

Issue 569403003: update tests to use error message templates everywhere instead of hardcoded values (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // TODO(jmesserly): merge into import_inliner_test.dart. 5 // TODO(jmesserly): merge into import_inliner_test.dart.
6 // Keeping here for now so it's easier to see the diff. 6 // Keeping here for now so it's easier to see the diff.
7 part of polymer.test.build.import_inliner_test; 7 part of polymer.test.build.import_inliner_test;
8 8
9 void codeExtractorTests() { 9 void codeExtractorTests() {
10 testPhases('no changes', phases, { 10 testPhases('no changes', phases, {
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 }, []); 244 }, []);
245 245
246 testPhases('script src is invalid', phases, { 246 testPhases('script src is invalid', phases, {
247 'a|web/test.html': 247 'a|web/test.html':
248 '<!DOCTYPE html><html><body>\n' 248 '<!DOCTYPE html><html><body>\n'
249 '<script type="application/dart" src="a.dart"></script>' 249 '<script type="application/dart" src="a.dart"></script>'
250 '</body></html>', 250 '</body></html>',
251 }, { 251 }, {
252 'a|web/test.html._data': EMPTY_DATA, 252 'a|web/test.html._data': EMPTY_DATA,
253 }, [ 253 }, [
254 'warning: Script file at "a.dart" not found. (web/test.html 1 0)', 254 'warning: ${SCRIPT_FILE_NOT_FOUND.create({'url': 'a.dart'}).snippet} '
255 '(web/test.html 1 0)',
255 ]); 256 ]);
256 257
257 testPhases('many script src around, valid and invalid', phases, { 258 testPhases('many script src around, valid and invalid', phases, {
258 'a|web/test.html': 259 'a|web/test.html':
259 '<!DOCTYPE html><html><body>' 260 '<!DOCTYPE html><html><body>'
260 '<script type="application/dart" src="a.dart"></script>' 261 '<script type="application/dart" src="a.dart"></script>'
261 '\n<script type="application/dart" src="b.dart"></script>' 262 '\n<script type="application/dart" src="b.dart"></script>'
262 '\n<script type="application/dart" src="c.dart"></script>' 263 '\n<script type="application/dart" src="c.dart"></script>'
263 '\n<script type="application/dart" src="d.dart"></script>' 264 '\n<script type="application/dart" src="d.dart"></script>'
264 '</body></html>', 265 '</body></html>',
265 'a|web/a.dart': 'main() {}', 266 'a|web/a.dart': 'main() {}',
266 'a|web/c.dart': 'main() {}', 267 'a|web/c.dart': 'main() {}',
267 }, { 268 }, {
268 'a|web/test.html._data': expectedData(['web/a.dart', 'web/c.dart']), 269 'a|web/test.html._data': expectedData(['web/a.dart', 'web/c.dart']),
269 }, [ 270 }, [
270 'warning: Script file at "b.dart" not found. (web/test.html 1 0)', 271 'warning: ${SCRIPT_FILE_NOT_FOUND.create({'url': 'b.dart'}).snippet} '
271 'warning: Script file at "d.dart" not found. (web/test.html 3 0)', 272 '(web/test.html 1 0)',
273 'warning: ${SCRIPT_FILE_NOT_FOUND.create({'url': 'd.dart'}).snippet} '
274 '(web/test.html 3 0)',
272 ]); 275 ]);
273 } 276 }
OLDNEW
« no previous file with comments | « pkg/polymer/test/build/all_phases_test.dart ('k') | pkg/polymer/test/build/import_inliner_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698