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

Unified Diff: sync/notifier/push_client_channel_unittest.cc

Issue 10545170: [Sync] Propagate XMPP auth errors to SyncNotifierObservers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error Created 8 years, 6 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: sync/notifier/push_client_channel_unittest.cc
diff --git a/sync/notifier/push_client_channel_unittest.cc b/sync/notifier/push_client_channel_unittest.cc
index e179109b3d31495834e4e626117475374dcc4878..c5ccad64c3a3b9e9b6a7355e3a272c64207d08d8 100644
--- a/sync/notifier/push_client_channel_unittest.cc
+++ b/sync/notifier/push_client_channel_unittest.cc
@@ -151,13 +151,21 @@ TEST_F(PushClientChannelTest, SendMessage) {
expected_notification));
}
-// Simulate notification state changes on the push client. It should
+// Simulate push client state changes on the push client. It should
// propagate to the channel.
-TEST_F(PushClientChannelTest, OnNotificationStateChange) {
+TEST_F(PushClientChannelTest, OnPushClientStateChange) {
EXPECT_FALSE(connected_);
- fake_push_client_->SimulateNotificationStateChange(true);
+ fake_push_client_->SimulatePushClientStateChange(
+ notifier::NOTIFICATIONS_ON);
EXPECT_TRUE(connected_);
- fake_push_client_->SimulateNotificationStateChange(false);
+ fake_push_client_->SimulatePushClientStateChange(
+ notifier::NOTIFICATIONS_OFF);
+ EXPECT_FALSE(connected_);
+ fake_push_client_->SimulatePushClientStateChange(
+ notifier::NOTIFICATIONS_ON);
+ EXPECT_TRUE(connected_);
+ fake_push_client_->SimulatePushClientStateChange(
+ notifier::CREDENTIALS_REJECTED);
EXPECT_FALSE(connected_);
}

Powered by Google App Engine
This is Rietveld 408576698