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

Unified Diff: sync/notifier/non_blocking_invalidation_notifier_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/non_blocking_invalidation_notifier_unittest.cc
diff --git a/sync/notifier/non_blocking_invalidation_notifier_unittest.cc b/sync/notifier/non_blocking_invalidation_notifier_unittest.cc
index 42cc5d172193533e04de06d0d559b7889e2d327e..831b443bdcc9b746b7036a5357d8bafe8d711a4b 100644
--- a/sync/notifier/non_blocking_invalidation_notifier_unittest.cc
+++ b/sync/notifier/non_blocking_invalidation_notifier_unittest.cc
@@ -73,20 +73,26 @@ TEST_F(NonBlockingInvalidationNotifierTest, Basic) {
type_payloads[syncable::BOOKMARKS] = "";
type_payloads[syncable::AUTOFILL] = "";
- EXPECT_CALL(mock_observer_, OnNotificationStateChange(true));
+ EXPECT_CALL(mock_observer_, OnNotificationsEnabled());
EXPECT_CALL(mock_observer_,
OnIncomingNotification(type_payloads,
REMOTE_NOTIFICATION));
- EXPECT_CALL(mock_observer_, OnNotificationStateChange(false));
+ EXPECT_CALL(mock_observer_,
+ OnNotificationsDisabled(TRANSIENT_NOTIFICATION_ERROR));
+ EXPECT_CALL(mock_observer_,
+ OnNotificationsDisabled(NOTIFICATION_CREDENTIALS_REJECTED));
invalidation_notifier_->SetStateDeprecated("fake_state");
invalidation_notifier_->SetUniqueId("fake_id");
invalidation_notifier_->UpdateCredentials("foo@bar.com", "fake_token");
- invalidation_notifier_->OnNotificationStateChange(true);
+ invalidation_notifier_->OnNotificationsEnabled();
invalidation_notifier_->OnIncomingNotification(type_payloads,
REMOTE_NOTIFICATION);
- invalidation_notifier_->OnNotificationStateChange(false);
+ invalidation_notifier_->OnNotificationsDisabled(
+ TRANSIENT_NOTIFICATION_ERROR);
+ invalidation_notifier_->OnNotificationsDisabled(
+ NOTIFICATION_CREDENTIALS_REJECTED);
ui_loop_.RunAllPending();
}

Powered by Google App Engine
This is Rietveld 408576698