| OLD | NEW |
| 1 library streams_test; | 1 library streams_test; |
| 2 import '../../pkg/unittest/lib/unittest.dart'; | 2 import '../../pkg/unittest/lib/unittest.dart'; |
| 3 import '../../pkg/unittest/lib/html_config.dart'; | 3 import '../../pkg/unittest/lib/html_config.dart'; |
| 4 import 'dart:async'; | 4 import 'dart:async'; |
| 5 import 'dart:html'; | 5 import 'dart:html'; |
| 6 | 6 |
| 7 class StreamHelper { | 7 class StreamHelper { |
| 8 var _a; | 8 var _a; |
| 9 StreamHelper() { | 9 StreamHelper() { |
| 10 _a = new TextInputElement(); | 10 _a = new TextInputElement(); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 expect(callCount, 1); | 105 expect(callCount, 1); |
| 106 | 106 |
| 107 subscription.pause(); | 107 subscription.pause(); |
| 108 helper.pulse(); | 108 helper.pulse(); |
| 109 expect(callCount, 1); | 109 expect(callCount, 1); |
| 110 | 110 |
| 111 subscription.resume(); | 111 subscription.resume(); |
| 112 helper.pulse(); | 112 helper.pulse(); |
| 113 expect(callCount, 2); | 113 expect(callCount, 2); |
| 114 | 114 |
| 115 var completer = new Completer<int>(); | 115 var completer = new Completer<int>.sync(); |
| 116 subscription.pause(completer.future); | 116 subscription.pause(completer.future); |
| 117 helper.pulse(); | 117 helper.pulse(); |
| 118 expect(callCount, 2); | 118 expect(callCount, 2); |
| 119 | 119 |
| 120 // Paused, should have no impact. | 120 // Paused, should have no impact. |
| 121 subscription.pause(); | 121 subscription.pause(); |
| 122 helper.pulse(); | 122 helper.pulse(); |
| 123 subscription.resume(); | 123 subscription.resume(); |
| 124 helper.pulse(); | 124 helper.pulse(); |
| 125 expect(callCount, 2); | 125 expect(callCount, 2); |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 }); | 267 }); |
| 268 | 268 |
| 269 test('singleWhere', () { | 269 test('singleWhere', () { |
| 270 stream.singleWhere((_) => true).then((_) {}); | 270 stream.singleWhere((_) => true).then((_) {}); |
| 271 }); | 271 }); |
| 272 | 272 |
| 273 test('elementAt', () { | 273 test('elementAt', () { |
| 274 stream.elementAt(0).then((_) {}); | 274 stream.elementAt(0).then((_) {}); |
| 275 }); | 275 }); |
| 276 } | 276 } |
| OLD | NEW |