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

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

Issue 1104453007: add support for x-dart-test link tags in the new test package (Closed) Base URL: git@github.com:dart-lang/web-components.git@master
Patch Set: clarify some comments, and make sure the test/dart.js script remains in the right place Created 5 years, 8 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 | « test/build/test_compatibility_test.dart ('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
11 var transformer = new WebComponentsTransformerGroup( 11 var transformer = new WebComponentsTransformerGroup(
12 new TransformOptions(['web/index.html'], false)); 12 new TransformOptions(['web/index.html', 'test/index.html'], false));
13 var phases = [[transformer]]; 13 var phases = [[transformer]];
14 14
15 main() { 15 main() {
16 useCompactVMConfiguration(); 16 useCompactVMConfiguration();
17 17
18 testPhases('full app', phases, { 18 testPhases('full app', phases, {
19 'a|web/index.html': ''' 19 'a|web/index.html': '''
20 <!DOCTYPE html> 20 <!DOCTYPE html>
21 <html> 21 <html>
22 <head> 22 <head>
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 <div>c</div> 165 <div>c</div>
166 <div>b</div> 166 <div>b</div>
167 <script type="application/dart" src="index.bootstrap.initialize.da rt"> 167 <script type="application/dart" src="index.bootstrap.initialize.da rt">
168 </script> 168 </script>
169 <script>var y;</script> 169 <script>var y;</script>
170 </div> 170 </div>
171 </body> 171 </body>
172 </html> 172 </html>
173 ''', 173 ''',
174 }, [], StringFormatter.noNewlinesOrSurroundingWhitespace); 174 }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
175
176 testPhases('test compatibility', phases, {
177 'a|test/index.html': '''
178 <!DOCTYPE html>
179 <html>
180 <head>
181 <link rel="x-dart-test" href="index.dart">
182 <script src="packages/test/dart.js"></script>
183 </head>
184 <body></body>
185 </html>
186 ''',
187 'a|test/index.dart': '''
188 library a;
189
190 main() {}
191 ''',
192 'initialize|lib/initialize.dart': mockInitialize,
193 'web_components|lib/html_import_annotation.dart': mockHtmlImportAnnotation,
194 }, {
195 'a|test/index.html': '''
196 <!DOCTYPE html>
197 <html>
198 <head>
199 <link rel="x-dart-test" href="index.bootstrap.initialize.dart">
200 <script src="packages/test/dart.js"></script>
201 </head>
202 <body></body>
203 </html>
204 ''',
205 }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
175 } 206 }
OLDNEW
« no previous file with comments | « test/build/test_compatibility_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698