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

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

Issue 723393003: update to polymer js 0.5.1 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: final tweaks Created 6 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 | 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 library polymer.test.linter_test; 5 library polymer.test.linter_test;
6 6
7 import 'dart:convert'; 7 import 'dart:convert';
8 8
9 import 'package:polymer/src/build/common.dart'; 9 import 'package:polymer/src/build/common.dart';
10 import 'package:polymer/src/build/linter.dart'; 10 import 'package:polymer/src/build/linter.dart';
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 '<polymer-element name="x-a"></polymer-element>' 160 '<polymer-element name="x-a"></polymer-element>'
161 '<script type="application/dart" src="foo.dart">' 161 '<script type="application/dart" src="foo.dart">'
162 '</script>' 162 '</script>'
163 '<script src="packages/browser/dart.js"></script>' 163 '<script src="packages/browser/dart.js"></script>'
164 '</html>', 164 '</html>',
165 }, [ 165 }, [
166 'warning: ${DART_SUPPORT_NO_LONGER_REQUIRED.snippet} ' 166 'warning: ${DART_SUPPORT_NO_LONGER_REQUIRED.snippet} '
167 '(web/test.html 0 21)' 167 '(web/test.html 0 21)'
168 ]); 168 ]);
169 169
170 _testLinter('webcomponents unnecessary', {
171 'a|web/test.html': '<!DOCTYPE html><html>'
172 '$WEB_COMPONENTS_JS_TAG'
173 '<script type="application/dart" src="foo.dart">'
174 '</script>'
175 '</html>',
176 }, [
177 'warning: ${WEB_COMPONENTS_NO_LONGER_REQUIRED.snippet} '
178 '(web/test.html 0 21)'
179 ]);
180
181
182 _testLinter('platform.js -> webcomponents.js', {
183 'a|web/test.html':
184 '<!DOCTYPE html><html>'
185 '$PLATFORM_JS_TAG'
186 '<script type="application/dart" src="foo.dart">'
187 '</script>'
188 '</html>',
189 }, [
190 'warning: ${PLATFORM_JS_RENAMED.snippet} '
191 '(web/test.html 0 21)'
192 ]);
193
170 }); 194 });
171 195
172 group('single script tag per document', () { 196 group('single script tag per document', () {
173 _testLinter('two top-level tags', { 197 _testLinter('two top-level tags', {
174 'a|web/test.html': '<!DOCTYPE html><html>' 198 'a|web/test.html': '<!DOCTYPE html><html>'
175 '<link rel="import" href="packages/polymer/polymer.html">' 199 '<link rel="import" href="packages/polymer/polymer.html">'
176 '<script type="application/dart" src="a.dart">' 200 '<script type="application/dart" src="a.dart">'
177 '</script>\n' 201 '</script>\n'
178 '<script type="application/dart" src="b.dart">' 202 '<script type="application/dart" src="b.dart">'
179 '</script>' 203 '</script>'
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 } 840 }
817 if (outputMessages.isEmpty) { 841 if (outputMessages.isEmpty) {
818 var linter = new Linter(new TransformOptions()); 842 var linter = new Linter(new TransformOptions());
819 testPhases(name, [[linter]], inputFiles, outputFiles, outputMessages, solo); 843 testPhases(name, [[linter]], inputFiles, outputFiles, outputMessages, solo);
820 } else { 844 } else {
821 testLogOutput( 845 testLogOutput(
822 (options) => new Linter(options), name, inputFiles, outputFiles, 846 (options) => new Linter(options), name, inputFiles, outputFiles,
823 outputMessages, solo); 847 outputMessages, solo);
824 } 848 }
825 } 849 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698