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

Unified Diff: pkg/polymer/test/build/linter_test.dart

Issue 27518006: Practically remove boot.js, adds the initialization from the Dart side of (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/polymer/test/build/import_inliner_test.dart ('k') | pkg/polymer/test/build/script_compactor_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/test/build/linter_test.dart
diff --git a/pkg/polymer/test/build/linter_test.dart b/pkg/polymer/test/build/linter_test.dart
index 17975a85a6f906736ac02fd951e38d3acd81a043..98f4c3fcc6e58cdb5ab1e9e01ff0f18596cc12ae 100644
--- a/pkg/polymer/test/build/linter_test.dart
+++ b/pkg/polymer/test/build/linter_test.dart
@@ -15,18 +15,51 @@ import 'common.dart';
void main() {
useCompactVMConfiguration();
_testLinter('nothing to report', {
- 'a|web/test.html': '<!DOCTYPE html><html></html>',
+ 'a|lib/test.html': '<!DOCTYPE html><html></html>',
}, {
- 'a|web/test.html.messages': '',
+ 'a|lib/test.html.messages': ''
});
+ group('must use init.dart, dart.js, not boot.js', () {
+ _testLinter('nothing to report', {
+ 'a|web/test.html': '<!DOCTYPE html><html>'
+ '<script type="application/dart" src="packages/polymer/init.dart">'
+ '</script>'
+ '<script src="packages/browser/dart.js"></script>'
+ '</html>',
+ }, {
+ 'a|web/test.html.messages': '',
+ });
+
+ _testLinter('missing init.dart and dart.js', {
+ 'a|web/test.html': '<!DOCTYPE html><html></html>',
+ }, {
+ 'a|web/test.html.messages': 'error: $USE_INIT_DART\n'
+ 'error: $USE_DART_JS',
+ });
+
+ _testLinter('using deprecated boot.js', {
+ 'a|web/test.html': '<!DOCTYPE html><html>\n'
+ '<script src="packages/polymer/boot.js"></script>'
+ '<script type="application/dart" src="packages/polymer/init.dart">'
+ '</script>'
+ '<script src="packages/browser/dart.js"></script>'
+ '</html>',
+ }, {
+ 'a|web/test.html.messages': 'warning: $BOOT_JS_DEPRECATED '
+ '(web/test.html 1 0)',
+ });
+ });
+
group('doctype warning', () {
_testLinter('in web', {
'a|web/test.html': '<html></html>',
}, {
'a|web/test.html.messages':
'warning: Unexpected start tag (html). Expected DOCTYPE. '
- '(web/test.html 0 0)',
+ '(web/test.html 0 0)\n'
+ 'error: $USE_INIT_DART\n'
+ 'error: $USE_DART_JS',
});
_testLinter('in lib', {
« no previous file with comments | « pkg/polymer/test/build/import_inliner_test.dart ('k') | pkg/polymer/test/build/script_compactor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698