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

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 deps, win 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..f63cb862e7c2fb01d2f2a1be79bc5e47ce8e9ee6 100644
--- a/sync/notifier/push_client_channel_unittest.cc
+++ b/sync/notifier/push_client_channel_unittest.cc
@@ -151,13 +151,19 @@ 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_->EnableNotifications();
EXPECT_TRUE(connected_);
- fake_push_client_->SimulateNotificationStateChange(false);
+ fake_push_client_->DisableNotifications(
+ notifier::TRANSIENT_NOTIFICATION_ERROR);
+ EXPECT_FALSE(connected_);
+ fake_push_client_->EnableNotifications();
+ EXPECT_TRUE(connected_);
+ fake_push_client_->DisableNotifications(
+ notifier::NOTIFICATION_CREDENTIALS_REJECTED);
EXPECT_FALSE(connected_);
}

Powered by Google App Engine
This is Rietveld 408576698