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

Unified Diff: jingle/notifier/listener/non_blocking_push_client_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: jingle/notifier/listener/non_blocking_push_client_unittest.cc
diff --git a/jingle/notifier/listener/non_blocking_push_client_unittest.cc b/jingle/notifier/listener/non_blocking_push_client_unittest.cc
index c4152259a75f05af8fd8f6042faaa8ec813f8016..f9e028268ef4eb961164ed764af98b7a50eaba0f 100644
--- a/jingle/notifier/listener/non_blocking_push_client_unittest.cc
+++ b/jingle/notifier/listener/non_blocking_push_client_unittest.cc
@@ -115,13 +115,17 @@ TEST_F(NonBlockingPushClientTest, SendNotification) {
// Make sure notification state changes get propagated back to the
// parent.
TEST_F(NonBlockingPushClientTest, NotificationStateChange) {
- EXPECT_FALSE(fake_observer_.notifications_enabled());
- fake_push_client_->SimulateNotificationStateChange(true);
+ EXPECT_EQ(DEFAULT_NOTIFICATION_ERROR,
+ fake_observer_.last_notifications_disabled_reason());
+ fake_push_client_->EnableNotifications();
message_loop_.RunAllPending();
- EXPECT_TRUE(fake_observer_.notifications_enabled());
- fake_push_client_->SimulateNotificationStateChange(false);
+ EXPECT_EQ(NO_NOTIFICATION_ERROR,
+ fake_observer_.last_notifications_disabled_reason());
+ fake_push_client_->DisableNotifications(
+ NOTIFICATION_CREDENTIALS_REJECTED);
message_loop_.RunAllPending();
- EXPECT_FALSE(fake_observer_.notifications_enabled());
+ EXPECT_EQ(NOTIFICATION_CREDENTIALS_REJECTED,
+ fake_observer_.last_notifications_disabled_reason());
}
// Make sure incoming notifications get propagated back to the parent.

Powered by Google App Engine
This is Rietveld 408576698