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

Side by Side Diff: pkg/polymer/test/build/all_phases_test.dart

Issue 27618002: package:observe fix various api issues (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « pkg/polymer/lib/src/instance.dart ('k') | pkg/polymer_expressions/example/person.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/transformer.dart'; 7 import 'package:polymer/transformer.dart';
8 import 'package:polymer/src/build/script_compactor.dart' show MAIN_HEADER; 8 import 'package:polymer/src/build/script_compactor.dart' show MAIN_HEADER;
9 import 'package:unittest/compact_vm_config.dart'; 9 import 'package:unittest/compact_vm_config.dart';
10 10
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 'a|web/test2.html.0.dart': _sampleObservableOutput("A", "foo"), 174 'a|web/test2.html.0.dart': _sampleObservableOutput("A", "foo"),
175 'a|web/b.dart': _sampleObservableOutput('B', 'bar'), 175 'a|web/b.dart': _sampleObservableOutput('B', 'bar'),
176 'a|web/index.html.0.dart': _sampleObservableOutput("C", "car"), 176 'a|web/index.html.0.dart': _sampleObservableOutput("C", "car"),
177 }); 177 });
178 } 178 }
179 179
180 String _sampleObservable(String className, String fieldName) => ''' 180 String _sampleObservable(String className, String fieldName) => '''
181 library ${className}_$fieldName; 181 library ${className}_$fieldName;
182 import 'package:observe/observe.dart'; 182 import 'package:observe/observe.dart';
183 183
184 class $className extends ObservableBase { 184 class $className extends Observable {
185 @observable int $fieldName; 185 @observable int $fieldName;
186 $className(this.$fieldName); 186 $className(this.$fieldName);
187 } 187 }
188 '''; 188 ''';
189 189
190 String _sampleObservableOutput(String className, String field) => 190 String _sampleObservableOutput(String className, String field) =>
191 "library ${className}_$field;\n" 191 "library ${className}_$field;\n"
192 "import 'package:observe/observe.dart';\n\n" 192 "import 'package:observe/observe.dart';\n\n"
193 "class $className extends ChangeNotifierBase {\n" 193 "class $className extends ChangeNotifier {\n"
194 " @reflectable @observable int get $field => __\$$field; " 194 " @reflectable @observable int get $field => __\$$field; "
195 "int __\$$field; " 195 "int __\$$field; "
196 "@reflectable set $field(int value) { " 196 "@reflectable set $field(int value) { "
197 "__\$$field = notifyPropertyChange(#$field, __\$$field, value); " 197 "__\$$field = notifyPropertyChange(#$field, __\$$field, value); "
198 "}\n" 198 "}\n"
199 " $className($field) : __\$$field = $field;\n" 199 " $className($field) : __\$$field = $field;\n"
200 "}\n"; 200 "}\n";
OLDNEW
« no previous file with comments | « pkg/polymer/lib/src/instance.dart ('k') | pkg/polymer_expressions/example/person.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698