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

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

Issue 644163002: Splitting interop support so `dart_support.js` is no longer required. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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
« no previous file with comments | « pkg/polymer/pubspec.yaml ('k') | pkg/web_components/CHANGELOG.md » ('j') | 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) 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 }, [ 145 }, [
146 'warning: ${NO_DART_SCRIPT_AND_EXPERIMENTAL.snippet} ' 146 'warning: ${NO_DART_SCRIPT_AND_EXPERIMENTAL.snippet} '
147 '(web/test.html 1 0)', 147 '(web/test.html 1 0)',
148 ]); 148 ]);
149 149
150 _testLinter('missing Dart code and polymer.html', { 150 _testLinter('missing Dart code and polymer.html', {
151 'a|web/test.html': '<!DOCTYPE html><html></html>', 151 'a|web/test.html': '<!DOCTYPE html><html></html>',
152 }, [ 152 }, [
153 'warning: ${MISSING_INIT_POLYMER.snippet}', 153 'warning: ${MISSING_INIT_POLYMER.snippet}',
154 ]); 154 ]);
155
156 _testLinter('dart_support unnecessary', {
157 'a|web/test.html': '<!DOCTYPE html><html>'
158 '<script src="packages/web_components/dart_support.js"></script>'
159 '<link rel="import" href="../../packages/polymer/polymer.html">'
160 '<polymer-element name="x-a"></polymer-element>'
161 '<script type="application/dart" src="foo.dart">'
162 '</script>'
163 '<script src="packages/browser/dart.js"></script>'
164 '</html>',
165 }, [
166 'warning: ${DART_SUPPORT_NO_LONGER_REQUIRED.snippet} '
167 '(web/test.html 0 21)'
168 ]);
169
155 }); 170 });
156 171
157 group('single script tag per document', () { 172 group('single script tag per document', () {
158 _testLinter('two top-level tags', { 173 _testLinter('two top-level tags', {
159 'a|web/test.html': '<!DOCTYPE html><html>' 174 'a|web/test.html': '<!DOCTYPE html><html>'
160 '<link rel="import" href="packages/polymer/polymer.html">' 175 '<link rel="import" href="packages/polymer/polymer.html">'
161 '<script type="application/dart" src="a.dart">' 176 '<script type="application/dart" src="a.dart">'
162 '</script>\n' 177 '</script>\n'
163 '<script type="application/dart" src="b.dart">' 178 '<script type="application/dart" src="b.dart">'
164 '</script>' 179 '</script>'
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 } 816 }
802 if (outputMessages.isEmpty) { 817 if (outputMessages.isEmpty) {
803 var linter = new Linter(new TransformOptions()); 818 var linter = new Linter(new TransformOptions());
804 testPhases(name, [[linter]], inputFiles, outputFiles, outputMessages, solo); 819 testPhases(name, [[linter]], inputFiles, outputFiles, outputMessages, solo);
805 } else { 820 } else {
806 testLogOutput( 821 testLogOutput(
807 (options) => new Linter(options), name, inputFiles, outputFiles, 822 (options) => new Linter(options), name, inputFiles, outputFiles,
808 outputMessages, solo); 823 outputMessages, solo);
809 } 824 }
810 } 825 }
OLDNEW
« no previous file with comments | « pkg/polymer/pubspec.yaml ('k') | pkg/web_components/CHANGELOG.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698