OLD | NEW |
1 part of observable_tests; | |
2 | |
3 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
4 // 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 |
5 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
6 | 4 |
7 testAbstractObservable() { | 5 testAbstractObservable() { |
8 group('addChangeListener()', () { | 6 group('addChangeListener()', () { |
9 test('adding the same listener twice returns false the second time', () { | 7 test('adding the same listener twice returns false the second time', () { |
10 final target = new AbstractObservable(); | 8 final target = new AbstractObservable(); |
11 final listener = (e) { }; | 9 final listener = (e) { }; |
12 | 10 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 validateUpdate(res.events[0], target, 'pM', null, 10, 11); | 64 validateUpdate(res.events[0], target, 'pM', null, 10, 11); |
67 res = null; | 65 res = null; |
68 | 66 |
69 target.recordPropertyUpdate('pL', '11', '13'); | 67 target.recordPropertyUpdate('pL', '11', '13'); |
70 | 68 |
71 expect(res, isNotNull); | 69 expect(res, isNotNull); |
72 expect(res.events, hasLength(1)); | 70 expect(res.events, hasLength(1)); |
73 validateUpdate(res.events[0], target, 'pL', null, '11', '13'); | 71 validateUpdate(res.events[0], target, 'pL', null, '11', '13'); |
74 }); | 72 }); |
75 } | 73 } |
OLD | NEW |