| 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/messages.dart'; | 9 import 'package:polymer/src/build/messages.dart'; |
| 10 import 'package:polymer/src/build/script_compactor.dart' show MAIN_HEADER; | 10 import 'package:polymer/src/build/script_compactor.dart' show MAIN_HEADER; |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 i2.main(); | 170 i2.main(); |
| 171 } | 171 } |
| 172 '''.replaceAll('\n ', '\n'), | 172 '''.replaceAll('\n ', '\n'), |
| 173 'a|web/a.dart': _sampleOutput('A', 'foo'), | 173 'a|web/a.dart': _sampleOutput('A', 'foo'), |
| 174 }, [ | 174 }, [ |
| 175 // These should not be emitted multiple times. See: | 175 // These should not be emitted multiple times. See: |
| 176 // https://code.google.com/p/dart/issues/detail?id=17197 | 176 // https://code.google.com/p/dart/issues/detail?id=17197 |
| 177 'warning: ${ONLY_ONE_TAG.snippet} (web/test.html 2 0)', | 177 'warning: ${ONLY_ONE_TAG.snippet} (web/test.html 2 0)', |
| 178 'warning: ${ONLY_ONE_TAG.snippet} (web/test.html 18 0)', | 178 'warning: ${ONLY_ONE_TAG.snippet} (web/test.html 18 0)', |
| 179 'warning: ${ONLY_ONE_TAG.snippet} (web/test.html 34 0)', | 179 'warning: ${ONLY_ONE_TAG.snippet} (web/test.html 34 0)', |
| 180 'warning: Script file at "d.dart" not found. (web/test.html 34 0)', | 180 'warning: ${SCRIPT_FILE_NOT_FOUND.create({'url': 'd.dart'}).snippet} ' |
| 181 '(web/test.html 34 0)', |
| 181 ]); | 182 ]); |
| 182 | 183 |
| 183 testPhases('with imports', phases, { | 184 testPhases('with imports', phases, { |
| 184 'a|web/index.html': | 185 'a|web/index.html': |
| 185 '<!DOCTYPE html><html><head>' | 186 '<!DOCTYPE html><html><head>' |
| 186 '<link rel="import" href="packages/polymer/polymer.html">' | 187 '<link rel="import" href="packages/polymer/polymer.html">' |
| 187 '<link rel="import" href="packages/a/test2.html">' | 188 '<link rel="import" href="packages/a/test2.html">' |
| 188 '</head><body>' | 189 '</head><body>' |
| 189 '<script type="application/dart" src="b.dart"></script>', | 190 '<script type="application/dart" src="b.dart"></script>', |
| 190 'a|web/b.dart': _sampleInput('B', 'bar'), | 191 'a|web/b.dart': _sampleInput('B', 'bar'), |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 } | 333 } |
| 333 | 334 |
| 334 @CustomTag('x-$className') | 335 @CustomTag('x-$className') |
| 335 class X${className} extends PolymerElement { | 336 class X${className} extends PolymerElement { |
| 336 X${className}.created() : super.created(); | 337 X${className}.created() : super.created(); |
| 337 } | 338 } |
| 338 @initMethod m_$fieldName() {} | 339 @initMethod m_$fieldName() {} |
| 339 main() {} | 340 main() {} |
| 340 '''; | 341 '''; |
| 341 } | 342 } |
| OLD | NEW |