| 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:polymer/src/build/common.dart'; |
| 8 import 'package:polymer/src/build/script_compactor.dart' show MAIN_HEADER; |
| 7 import 'package:polymer/transformer.dart'; | 9 import 'package:polymer/transformer.dart'; |
| 8 import 'package:polymer/src/build/script_compactor.dart' show MAIN_HEADER; | |
| 9 import 'package:unittest/compact_vm_config.dart'; | 10 import 'package:unittest/compact_vm_config.dart'; |
| 10 | 11 |
| 11 import 'common.dart'; | 12 import 'common.dart'; |
| 12 | 13 |
| 13 void main() { | 14 void main() { |
| 14 useCompactVMConfiguration(); | 15 useCompactVMConfiguration(); |
| 15 var phases = createDeployPhases(new TransformOptions()); | 16 var phases = new PolymerTransformerGroup(new TransformOptions()).phases; |
| 16 | 17 |
| 17 testPhases('no changes', phases, { | 18 testPhases('no changes', phases, { |
| 18 'a|web/test.html': '<!DOCTYPE html><html></html>', | 19 'a|web/test.html': '<!DOCTYPE html><html></html>', |
| 19 }, { | 20 }, { |
| 20 'a|web/test.html': '<!DOCTYPE html><html></html>', | 21 'a|web/test.html': '<!DOCTYPE html><html></html>', |
| 21 }); | 22 }); |
| 22 | 23 |
| 23 testPhases('observable changes', phases, { | 24 testPhases('observable changes', phases, { |
| 24 'a|web/test.dart': _sampleObservable('A', 'foo'), | 25 'a|web/test.dart': _sampleObservable('A', 'foo'), |
| 25 'a|web/test2.dart': _sampleObservableOutput('B', 'bar'), | 26 'a|web/test2.dart': _sampleObservableOutput('B', 'bar'), |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 "library ${className}_$field;\n" | 192 "library ${className}_$field;\n" |
| 192 "import 'package:observe/observe.dart';\n\n" | 193 "import 'package:observe/observe.dart';\n\n" |
| 193 "class $className extends ChangeNotifier {\n" | 194 "class $className extends ChangeNotifier {\n" |
| 194 " @reflectable @observable int get $field => __\$$field; " | 195 " @reflectable @observable int get $field => __\$$field; " |
| 195 "int __\$$field; " | 196 "int __\$$field; " |
| 196 "@reflectable set $field(int value) { " | 197 "@reflectable set $field(int value) { " |
| 197 "__\$$field = notifyPropertyChange(#$field, __\$$field, value); " | 198 "__\$$field = notifyPropertyChange(#$field, __\$$field, value); " |
| 198 "}\n" | 199 "}\n" |
| 199 " $className($field) : __\$$field = $field;\n" | 200 " $className($field) : __\$$field = $field;\n" |
| 200 "}\n"; | 201 "}\n"; |
| OLD | NEW |