| Index: pkg/polymer/test/build/script_compactor_test.dart
|
| diff --git a/pkg/polymer/test/build/script_compactor_test.dart b/pkg/polymer/test/build/script_compactor_test.dart
|
| index cfb82e65dd29c8138d827afa63cb41ed0f8d3800..6c3119e8ebb06f16ea02b00e0559e5d6dd196140 100644
|
| --- a/pkg/polymer/test/build/script_compactor_test.dart
|
| +++ b/pkg/polymer/test/build/script_compactor_test.dart
|
| @@ -108,7 +108,7 @@ initializerTests(phases) {
|
| }
|
| '''.replaceAll('\n ', '\n'),
|
| });
|
| -
|
| +
|
| testPhases('use const expressions', phases, {
|
| 'a|web/test.html':
|
| '<!DOCTYPE html><html><head>',
|
| @@ -163,9 +163,59 @@ initializerTests(phases) {
|
| 'class XFoo extends PolymerElement {\n'
|
| '}\n'
|
| 'main(){}',
|
| - }, {}, [
|
| + }, {
|
| + 'a|web/test.html_bootstrap.dart':
|
| + '''$MAIN_HEADER
|
| + import 'a.dart' as i0;
|
| + ${DEFAULT_IMPORTS.join('\n')}
|
| + import 'a.dart' as smoke_0;
|
| + import 'package:polymer/polymer.dart' as smoke_1;
|
| +
|
| + void main() {
|
| + useGeneratedCode(new StaticConfiguration(
|
| + checkedMode: false,
|
| + parents: {
|
| + smoke_0.XFoo: smoke_1.PolymerElement,
|
| + },
|
| + declarations: {
|
| + smoke_0.XFoo: const {},
|
| + }));
|
| + startPolymer([]);
|
| + }
|
| + '''.replaceAll('\n ', '\n'),
|
| +
|
| + }, [
|
| 'warning: The parameter to @CustomTag seems to be invalid. '
|
| '(web/a.dart 2 11)',
|
| + 'warning: $NO_INITIALIZERS_ERROR',
|
| + ]);
|
| +
|
| + testPhases('no polymer import (no warning, but no crash either)', phases, {
|
| + 'a|web/test.html':
|
| + '<!DOCTYPE html><html><head>',
|
| + 'a|web/test.html.scriptUrls': '[["a","web/a.dart"]]',
|
| + 'a|web/a.dart':
|
| + 'library a;\n'
|
| + 'import "package:polymer/polymer.broken.import.dart";\n'
|
| + '@CustomTag("x-foo")\n'
|
| + 'class XFoo extends PolymerElement {\n'
|
| + '}\n'
|
| + 'main(){}',
|
| + }, {
|
| + 'a|web/test.html_bootstrap.dart':
|
| + '''$MAIN_HEADER
|
| + import 'a.dart' as i0;
|
| + ${DEFAULT_IMPORTS.join('\n')}
|
| +
|
| + void main() {
|
| + useGeneratedCode(new StaticConfiguration(
|
| + checkedMode: false));
|
| + startPolymer([]);
|
| + }
|
| + '''.replaceAll('\n ', '\n'),
|
| +
|
| + }, [
|
| + 'warning: $NO_INITIALIZERS_ERROR',
|
| ]);
|
|
|
| testPhases('several scripts', phases, {
|
| @@ -256,7 +306,7 @@ initializerTests(phases) {
|
| smoke_2.XF1: smoke_1.PolymerElement,
|
| smoke_3.XG2: smoke_1.PolymerElement,
|
| smoke_4.XH1: smoke_1.PolymerElement,
|
| - },
|
| + },
|
| declarations: {
|
| smoke_5.XC1: const {},
|
| smoke_5.XC2: const {},
|
|
|