| 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', {
|
|
|