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

Unified Diff: tests/lib/async/stream_state_helper.dart

Issue 14103010: Change hasSubscribers to hasListener. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments. Created 7 years, 8 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
Index: tests/lib/async/stream_state_helper.dart
diff --git a/tests/lib/async/stream_state_helper.dart b/tests/lib/async/stream_state_helper.dart
index 8f9b33fe389e617f17f215402fcf1dceeee7b365..b982d9d23be4e82fd13fec277e913907f31fbeac 100644
--- a/tests/lib/async/stream_state_helper.dart
+++ b/tests/lib/async/stream_state_helper.dart
@@ -105,7 +105,7 @@ class StreamProtocolTest {
_withNextExpectation((Event expect) {
if (!expect.matchSubscriptionChange(_controller)) {
_fail("Expected: $expect\n"
- "Found: [Subscribed:${_controller.hasSubscribers}, "
+ "Found: [Has listener:${_controller.hasListener}, "
"Paused:${_controller.isPaused}]");
}
});
@@ -159,12 +159,12 @@ class StreamProtocolTest {
}
_expectations.add(new PauseCallbackEvent(isPaused, action));
}
- void expectSubscription(bool hasSubscribers, bool isPaused, [void action()]) {
+ void expectSubscription(bool hasListener, bool isPaused, [void action()]) {
if (_onComplete == null) {
_fail("Adding expectation after completing");
}
_expectations.add(
- new SubscriptionCallbackEvent(hasSubscribers, isPaused, action));
+ new SubscriptionCallbackEvent(hasListener, isPaused, action));
}
void _fail(String message) {
@@ -252,14 +252,14 @@ class PauseCallbackEvent extends Event {
}
class SubscriptionCallbackEvent extends Event {
- final bool hasSubscribers;
+ final bool hasListener;
final bool isPaused;
- SubscriptionCallbackEvent(this.hasSubscribers, this.isPaused, void action())
+ SubscriptionCallbackEvent(this.hasListener, this.isPaused, void action())
: super(action);
bool _testSubscribe(StreamController c) {
- return hasSubscribers == c.hasSubscribers && isPaused == c.isPaused;
+ return hasListener == c.hasListener && isPaused == c.isPaused;
}
- String toString() => "[Subscribers:$hasSubscribers, Paused:$isPaused]";
+ String toString() => "[Has listener:$hasListener, Paused:$isPaused]";
}
@@ -283,7 +283,7 @@ class LogAnyEvent extends Event {
return true;
}
bool _testSubcribe(StreamController c) {
- _actual = "*[Subscribers:${c.hasSubscribers}, Paused:${c.isPaused}]";
+ _actual = "*[Has listener:${c.hasListener}, Paused:${c.isPaused}]";
return true;
}
« no previous file with comments | « sdk/lib/web_audio/dartium/web_audio_dartium.dart ('k') | tools/dom/templates/html/impl/impl_Geolocation.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698