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

Side by Side Diff: tests/lib/async/stream_state_nonzero_timer_test.dart

Issue 12391059: Another test that cancels a timer. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/lib/async/stream_state_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // Test the event/callback protocol of the stream implementations. 5 // Test the event/callback protocol of the stream implementations.
6 // Uses a non-zero timer so it fails on d8. 6 // Uses a non-zero timer so it fails on d8.
7 7
8 library stream_state_nonzero_timer_test; 8 library stream_state_nonzero_timer_test;
9 9
10 import "dart:async"; 10 import "dart:async";
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // After that, the controller stays paused until the pending queue 73 // After that, the controller stays paused until the pending queue
74 // is empty. 74 // is empty.
75 }) 75 })
76 ..expectPause(true) 76 ..expectPause(true)
77 ..expectData(43) 77 ..expectData(43)
78 ..expectPause(false, () { t.close(); }) 78 ..expectPause(false, () { t.close(); })
79 ..expectDone() 79 ..expectDone()
80 ..expectSubscription(false, false); 80 ..expectSubscription(false, false);
81 t..subscribe()..add(42); 81 t..subscribe()..add(42);
82 }); 82 });
83
84 test("$p-pause-during-callback", () {
85 var t = new StreamProtocolTest(broadcast);
86 t..expectSubscription(true, false)
87 ..expectData(42, () {
88 t.pause();
89 })
90 ..expectPause(true, () {
91 t.resume();
92 })
93 ..expectPause(false, () {
94 t.pause();
95 t.resume();
96 t.close();
97 })
98 ..expectDone()
99 ..expectSubscription(false, false);
100 t..subscribe()
101 ..add(42);
102 });
83 } 103 }
OLDNEW
« no previous file with comments | « no previous file | tests/lib/async/stream_state_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698