| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import "dart:async"; | 5 import "dart:async"; |
| 6 import "package:expect/expect.dart"; | 6 import "package:expect/expect.dart"; |
| 7 import "package:async_helper/async_helper.dart"; | 7 import "package:async_helper/async_helper.dart"; |
| 8 | 8 |
| 9 var events = []; | 9 var events = []; |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 events.add("invoke cancel"); | 40 events.add("invoke cancel"); |
| 41 subscription.cancel().then((_) => cancelFinished = true); | 41 subscription.cancel().then((_) => cancelFinished = true); |
| 42 }); | 42 }); |
| 43 | 43 |
| 44 new Timer(const Duration(milliseconds: 100), () { | 44 new Timer(const Duration(milliseconds: 100), () { |
| 45 Expect.isFalse(cancelFinished); | 45 Expect.isFalse(cancelFinished); |
| 46 Expect.listEquals(["main", "listen", "invoke cancel"], events); | 46 Expect.listEquals(["main", "listen", "invoke cancel"], events); |
| 47 asyncEnd(); | 47 asyncEnd(); |
| 48 }); | 48 }); |
| 49 } | 49 } |
| OLD | NEW |