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

Side by Side Diff: test/build/transformer_test.dart

Issue 993673002: append html imports before the dart script tag (Closed) Base URL: git@github.com:dart-lang/web-components.git@master
Patch Set: add some js script tags to the head around the dart script tag Created 5 years, 9 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
« no previous file with comments | « pubspec.yaml ('k') | no next file » | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library web_components.test.build.transformer_test; 4 library web_components.test.build.transformer_test;
5 5
6 import 'package:code_transformers/tests.dart'; 6 import 'package:code_transformers/tests.dart';
7 import 'package:web_components/transformer.dart'; 7 import 'package:web_components/transformer.dart';
8 import 'package:unittest/compact_vm_config.dart'; 8 import 'package:unittest/compact_vm_config.dart';
9 import 'common.dart'; 9 import 'common.dart';
10 10
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 library b.bar; 111 library b.bar;
112 112
113 import 'package:web_components/html_import_annotation.dart'; 113 import 'package:web_components/html_import_annotation.dart';
114 114
115 import 'package:initialize/initialize.dart'; 115 import 'package:initialize/initialize.dart';
116 116
117 @initMethod 117 @initMethod
118 bar() {} 118 bar() {}
119 ''', 119 ''',
120 }, [], StringFormatter.noNewlinesOrSurroundingWhitespace); 120 }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
121
122 testPhases('imports go above the dart script', phases, {
123 'b|web/index.html': '''
124 <!DOCTYPE html>
125 <html>
126 <head>
127 <script>var x;</script>
128 <script type="application/dart" src="index.dart"></script>
129 <script>var y;</script>
130 </head>
131 <body>
132 </body>
133 </html>
134 ''',
135 'b|web/index.dart': '''
136 @HtmlImport('package:b/b.html')
137 library b;
138
139 import 'package:web_components/html_import_annotation.dart';
140 import 'package:c/c.dart';
141 ''',
142 'b|lib/b.html': '''
143 <div>b</div>
144 ''',
145 'c|lib/c.dart': '''
146 @HtmlImport('c.html')
147 library c;
148
149 import 'package:web_components/html_import_annotation.dart';
150 ''',
151 'c|lib/c.html': '''
152 <div>c</div>
153 ''',
154 'initialize|lib/initialize.dart': mockInitialize,
155 'web_components|lib/html_import_annotation.dart': mockHtmlImportAnnotation,
156 }, {
157 'b|web/index.html': '''
158 <!DOCTYPE html>
159 <html>
160 <head>
161 <script>var x;</script>
162 </head>
163 <body>
164 <div hidden="">
165 <div>c</div>
166 <div>b</div>
167 <script type="application/dart" src="index.bootstrap.initialize.da rt">
168 </script>
169 <script>var y;</script>
170 </div>
171 </body>
172 </html>
173 ''',
174 }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
121 } 175 }
OLDNEW
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698