OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 | 4 |
5 library polymer.test.build.all_phases_test; | 5 library polymer.test.build.all_phases_test; |
6 | 6 |
7 import 'package:code_transformers/tests.dart' show testingDartSdkDirectory; | 7 import 'package:code_transformers/tests.dart' show testingDartSdkDirectory; |
8 import 'package:polymer/src/build/common.dart'; | 8 import 'package:polymer/src/build/common.dart'; |
9 import 'package:polymer/src/build/linter.dart' show USE_POLYMER_HTML, | 9 import 'package:polymer/src/build/linter.dart' show USE_POLYMER_HTML, |
10 USE_INIT_DART, ONLY_ONE_TAG; | 10 USE_INIT_DART, ONLY_ONE_TAG; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 import 'a.dart' as smoke_0; | 55 import 'a.dart' as smoke_0; |
56 import 'package:polymer/polymer.dart' as smoke_1; | 56 import 'package:polymer/polymer.dart' as smoke_1; |
57 | 57 |
58 void main() { | 58 void main() { |
59 useGeneratedCode(new StaticConfiguration( | 59 useGeneratedCode(new StaticConfiguration( |
60 checkedMode: false, | 60 checkedMode: false, |
61 parents: { | 61 parents: { |
62 smoke_0.XA: smoke_1.PolymerElement, | 62 smoke_0.XA: smoke_1.PolymerElement, |
63 }, | 63 }, |
64 declarations: { | 64 declarations: { |
65 smoke_0.XA: const {}, | 65 smoke_0.XA: {}, |
66 })); | 66 })); |
67 configureForDeployment([ | 67 configureForDeployment([ |
68 i0.m_foo, | 68 i0.m_foo, |
69 () => Polymer.register('x-A', i0.XA), | 69 () => Polymer.register('x-A', i0.XA), |
70 ]); | 70 ]); |
71 i0.main(); | 71 i0.main(); |
72 } | 72 } |
73 '''.replaceAll('\n ', '\n'), | 73 '''.replaceAll('\n ', '\n'), |
74 'a|web/a.dart': _sampleOutput('A', 'foo'), | 74 'a|web/a.dart': _sampleOutput('A', 'foo'), |
75 }, []); | 75 }, []); |
(...skipping 19 matching lines...) Expand all Loading... |
95 import 'test.html.0.dart' as smoke_0; | 95 import 'test.html.0.dart' as smoke_0; |
96 import 'package:polymer/polymer.dart' as smoke_1; | 96 import 'package:polymer/polymer.dart' as smoke_1; |
97 | 97 |
98 void main() { | 98 void main() { |
99 useGeneratedCode(new StaticConfiguration( | 99 useGeneratedCode(new StaticConfiguration( |
100 checkedMode: false, | 100 checkedMode: false, |
101 parents: { | 101 parents: { |
102 smoke_0.XB: smoke_1.PolymerElement, | 102 smoke_0.XB: smoke_1.PolymerElement, |
103 }, | 103 }, |
104 declarations: { | 104 declarations: { |
105 smoke_0.XB: const {}, | 105 smoke_0.XB: {}, |
106 })); | 106 })); |
107 configureForDeployment([ | 107 configureForDeployment([ |
108 i0.m_bar, | 108 i0.m_bar, |
109 () => Polymer.register('x-B', i0.XB), | 109 () => Polymer.register('x-B', i0.XB), |
110 ]); | 110 ]); |
111 i0.main(); | 111 i0.main(); |
112 } | 112 } |
113 '''.replaceAll('\n ', '\n'), | 113 '''.replaceAll('\n ', '\n'), |
114 'a|web/test.html.0.dart': | 114 'a|web/test.html.0.dart': |
115 _sampleOutput("B", "bar"), | 115 _sampleOutput("B", "bar"), |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 | 149 |
150 void main() { | 150 void main() { |
151 useGeneratedCode(new StaticConfiguration( | 151 useGeneratedCode(new StaticConfiguration( |
152 checkedMode: false, | 152 checkedMode: false, |
153 parents: { | 153 parents: { |
154 smoke_0.XA: smoke_1.PolymerElement, | 154 smoke_0.XA: smoke_1.PolymerElement, |
155 smoke_2.XB: smoke_1.PolymerElement, | 155 smoke_2.XB: smoke_1.PolymerElement, |
156 smoke_3.XC: smoke_1.PolymerElement, | 156 smoke_3.XC: smoke_1.PolymerElement, |
157 }, | 157 }, |
158 declarations: { | 158 declarations: { |
159 smoke_0.XA: const {}, | 159 smoke_0.XA: {}, |
160 smoke_2.XB: const {}, | 160 smoke_2.XB: {}, |
161 smoke_3.XC: const {}, | 161 smoke_3.XC: {}, |
162 })); | 162 })); |
163 configureForDeployment([ | 163 configureForDeployment([ |
164 i0.m_foo, | 164 i0.m_foo, |
165 () => Polymer.register('x-A', i0.XA), | 165 () => Polymer.register('x-A', i0.XA), |
166 i1.m_bar, | 166 i1.m_bar, |
167 () => Polymer.register('x-B', i1.XB), | 167 () => Polymer.register('x-B', i1.XB), |
168 i2.m_car, | 168 i2.m_car, |
169 () => Polymer.register('x-C', i2.XC), | 169 () => Polymer.register('x-C', i2.XC), |
170 ]); | 170 ]); |
171 i2.main(); | 171 i2.main(); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 import 'b.dart' as smoke_2; | 214 import 'b.dart' as smoke_2; |
215 | 215 |
216 void main() { | 216 void main() { |
217 useGeneratedCode(new StaticConfiguration( | 217 useGeneratedCode(new StaticConfiguration( |
218 checkedMode: false, | 218 checkedMode: false, |
219 parents: { | 219 parents: { |
220 smoke_2.XB: smoke_1.PolymerElement, | 220 smoke_2.XB: smoke_1.PolymerElement, |
221 smoke_0.XA: smoke_1.PolymerElement, | 221 smoke_0.XA: smoke_1.PolymerElement, |
222 }, | 222 }, |
223 declarations: { | 223 declarations: { |
224 smoke_2.XB: const {}, | 224 smoke_2.XB: {}, |
225 smoke_0.XA: const {}, | 225 smoke_0.XA: {}, |
226 })); | 226 })); |
227 configureForDeployment([ | 227 configureForDeployment([ |
228 i0.m_foo, | 228 i0.m_foo, |
229 () => Polymer.register('x-A', i0.XA), | 229 () => Polymer.register('x-A', i0.XA), |
230 i1.m_bar, | 230 i1.m_bar, |
231 () => Polymer.register('x-B', i1.XB), | 231 () => Polymer.register('x-B', i1.XB), |
232 ]); | 232 ]); |
233 i1.main(); | 233 i1.main(); |
234 } | 234 } |
235 '''.replaceAll('\n ', '\n'), | 235 '''.replaceAll('\n ', '\n'), |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 import 'package:a/b.dart' as smoke_2; | 273 import 'package:a/b.dart' as smoke_2; |
274 | 274 |
275 void main() { | 275 void main() { |
276 useGeneratedCode(new StaticConfiguration( | 276 useGeneratedCode(new StaticConfiguration( |
277 checkedMode: false, | 277 checkedMode: false, |
278 parents: { | 278 parents: { |
279 smoke_0.XA: smoke_1.PolymerElement, | 279 smoke_0.XA: smoke_1.PolymerElement, |
280 smoke_2.XB: smoke_1.PolymerElement, | 280 smoke_2.XB: smoke_1.PolymerElement, |
281 }, | 281 }, |
282 declarations: { | 282 declarations: { |
283 smoke_0.XA: const {}, | 283 smoke_0.XA: {}, |
284 smoke_2.XB: const {}, | 284 smoke_2.XB: {}, |
285 })); | 285 })); |
286 startPolymer([ | 286 startPolymer([ |
287 i0.m_foo, | 287 i0.m_foo, |
288 () => Polymer.register('x-A', i0.XA), | 288 () => Polymer.register('x-A', i0.XA), |
289 i1.m_bar, | 289 i1.m_bar, |
290 () => Polymer.register('x-B', i1.XB), | 290 () => Polymer.register('x-B', i1.XB), |
291 ]); | 291 ]); |
292 } | 292 } |
293 '''.replaceAll('\n ', '\n'), | 293 '''.replaceAll('\n ', '\n'), |
294 'a|web/index.html.0.dart': _sampleOutput("A", "foo"), | 294 'a|web/index.html.0.dart': _sampleOutput("A", "foo"), |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 } | 333 } |
334 | 334 |
335 @CustomTag('x-$className') | 335 @CustomTag('x-$className') |
336 class X${className} extends PolymerElement { | 336 class X${className} extends PolymerElement { |
337 X${className}.created() : super.created(); | 337 X${className}.created() : super.created(); |
338 } | 338 } |
339 @initMethod m_$fieldName() {} | 339 @initMethod m_$fieldName() {} |
340 main() {} | 340 main() {} |
341 '''; | 341 '''; |
342 } | 342 } |
OLD | NEW |