| Index: test/build/transformer_test.dart
|
| diff --git a/test/build/transformer_test.dart b/test/build/transformer_test.dart
|
| index bafdbcbe9a1d1a60cffc26708729904496d28214..369dc5888958d991eaf7314e0d17b5d49b8f13e8 100644
|
| --- a/test/build/transformer_test.dart
|
| +++ b/test/build/transformer_test.dart
|
| @@ -118,4 +118,58 @@ main() {
|
| bar() {}
|
| ''',
|
| }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
|
| +
|
| + testPhases('imports go above the dart script', phases, {
|
| + 'b|web/index.html': '''
|
| + <!DOCTYPE html>
|
| + <html>
|
| + <head>
|
| + <script>var x;</script>
|
| + <script type="application/dart" src="index.dart"></script>
|
| + <script>var y;</script>
|
| + </head>
|
| + <body>
|
| + </body>
|
| + </html>
|
| + ''',
|
| + 'b|web/index.dart': '''
|
| + @HtmlImport('package:b/b.html')
|
| + library b;
|
| +
|
| + import 'package:web_components/html_import_annotation.dart';
|
| + import 'package:c/c.dart';
|
| + ''',
|
| + 'b|lib/b.html': '''
|
| + <div>b</div>
|
| + ''',
|
| + 'c|lib/c.dart': '''
|
| + @HtmlImport('c.html')
|
| + library c;
|
| +
|
| + import 'package:web_components/html_import_annotation.dart';
|
| + ''',
|
| + 'c|lib/c.html': '''
|
| + <div>c</div>
|
| + ''',
|
| + 'initialize|lib/initialize.dart': mockInitialize,
|
| + 'web_components|lib/html_import_annotation.dart': mockHtmlImportAnnotation,
|
| + }, {
|
| + 'b|web/index.html': '''
|
| + <!DOCTYPE html>
|
| + <html>
|
| + <head>
|
| + <script>var x;</script>
|
| + </head>
|
| + <body>
|
| + <div hidden="">
|
| + <div>c</div>
|
| + <div>b</div>
|
| + <script type="application/dart" src="index.bootstrap.initialize.dart">
|
| + </script>
|
| + <script>var y;</script>
|
| + </div>
|
| + </body>
|
| + </html>
|
| + ''',
|
| + }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
|
| }
|
|
|