OLD | NEW |
---|---|
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 Loading... | |
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 type="application/dart" src="index.dart"></script> | |
Siggi Cherem (dart-lang)
2015/03/09 21:04:53
let's add some <!-- nodes --> so we can see the re
jakemac
2015/03/09 21:55:11
Done.
| |
128 </head> | |
129 <body> | |
130 </body> | |
131 </html> | |
132 ''', | |
133 'b|web/index.dart': ''' | |
134 @HtmlImport('package:b/b.html') | |
135 library b; | |
136 | |
137 import 'package:web_components/html_import_annotation.dart'; | |
138 import 'package:c/c.dart'; | |
139 ''', | |
140 'b|lib/b.html': ''' | |
141 <div>b</div> | |
142 ''', | |
143 'c|lib/c.dart': ''' | |
144 @HtmlImport('c.html') | |
145 library c; | |
146 | |
147 import 'package:web_components/html_import_annotation.dart'; | |
148 ''', | |
149 'c|lib/c.html': ''' | |
150 <div>c</div> | |
151 ''', | |
152 'initialize|lib/initialize.dart': mockInitialize, | |
153 'web_components|lib/html_import_annotation.dart': mockHtmlImportAnnotation, | |
154 }, { | |
155 'b|web/index.html': ''' | |
156 <!DOCTYPE html> | |
157 <html> | |
158 <head></head> | |
159 <body> | |
160 <div hidden=""> | |
161 <div>c</div> | |
162 <div>b</div> | |
163 <script type="application/dart" src="index.bootstrap.initialize.da rt"> | |
164 </script> | |
165 </div> | |
166 </body> | |
167 </html> | |
168 ''', | |
169 }, [], StringFormatter.noNewlinesOrSurroundingWhitespace); | |
121 } | 170 } |
OLD | NEW |