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

Unified Diff: tests/html/streams_test.dart

Issue 13529007: Stop expecting errors when pausing, resuming or canceling a canceled stream. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/streams_test.dart
diff --git a/tests/html/streams_test.dart b/tests/html/streams_test.dart
index 843e1c7916f7c62cc138ac61e9305dc70d219877..266edc8146d35799b98366f3f019ee8edb94f314 100644
--- a/tests/html/streams_test.dart
+++ b/tests/html/streams_test.dart
@@ -87,13 +87,10 @@ main() {
subscription.onData((_) {});
}, throws);
- expect(() {
- subscription.pause();
- }, throws);
-
- expect(() {
- subscription.resume();
- }, throws);
+ // Calling these after a cancel does nothing.
+ subscription.cancel();
+ subscription.pause();
+ subscription.resume();
});
test('pause/resume', () {
@@ -131,10 +128,8 @@ main() {
helper.pulse();
expect(callCount, 3);
- // Not paused.
- expect(() {
- subscription.resume();
- }, throws);
+ // Not paused, but resuming once too often is ok.
+ subscription.resume();
});
test('onData', () {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698