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

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: put special test attribute in a variable so polymer can use it 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
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 </head>
183 <body></body>
184 </html>
185 ''',
186 'a|test/index.dart': '''
187 library a;
188
189 main() {}
190 ''',
191 'initialize|lib/initialize.dart': mockInitialize,
192 'web_components|lib/html_import_annotation.dart': mockHtmlImportAnnotation,
193 }, {
194 'a|test/index.html': '''
195 <!DOCTYPE html>
196 <html>
197 <head>
198 <link rel="x-dart-test" href="index.bootstrap.initialize.dart">
199 </head>
200 <body></body>
201 </html>
202 ''',
203 }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
175 } 204 }
OLDNEW
« lib/build/test_compatibility.dart ('K') | « test/build/test_compatibility_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698