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 bindings_test; | 5 library bindings_test; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:html'; | 8 import 'dart:html'; |
9 | 9 |
10 import 'package:observe/observe.dart'; | 10 import 'package:observe/observe.dart'; |
11 import 'package:observe/mirrors_used.dart'; // make test smaller. | 11 import 'package:observe/mirrors_used.dart'; // make test smaller. |
12 import 'package:observe/src/dirty_check.dart' show dirtyCheckZone; | 12 import 'package:observe/src/dirty_check.dart' show dirtyCheckZone; |
13 import 'package:polymer_expressions/polymer_expressions.dart'; | 13 import 'package:polymer_expressions/polymer_expressions.dart'; |
14 import 'package:template_binding/template_binding.dart' show templateBind; | 14 import 'package:template_binding/template_binding.dart' show templateBind; |
15 import 'package:unittest/html_config.dart'; | 15 import 'package:unittest/html_config.dart'; |
| 16 |
16 import 'package:unittest/unittest.dart'; | 17 import 'package:unittest/unittest.dart'; |
17 | 18 |
18 main() => dirtyCheckZone().run(() { | 19 main() => dirtyCheckZone().run(() { |
19 useHtmlConfiguration(); | 20 useHtmlConfiguration(); |
20 | 21 |
21 group('bindings', () { | 22 group('bindings', () { |
22 var stop = null; | 23 var stop = null; |
23 var testDiv; | 24 var testDiv; |
24 setUp(() { | 25 setUp(() { |
25 document.body.append(testDiv = new DivElement()); | 26 document.body.append(testDiv = new DivElement()); |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 @reflectable | 147 @reflectable |
147 class NotifyModel extends ChangeNotifier { | 148 class NotifyModel extends ChangeNotifier { |
148 var _x; | 149 var _x; |
149 NotifyModel([this._x]); | 150 NotifyModel([this._x]); |
150 | 151 |
151 get x => _x; | 152 get x => _x; |
152 set x(value) { | 153 set x(value) { |
153 _x = notifyPropertyChange(#x, _x, value); | 154 _x = notifyPropertyChange(#x, _x, value); |
154 } | 155 } |
155 } | 156 } |
OLD | NEW |