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

Unified Diff: sync/notifier/p2p_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 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/p2p_notifier_unittest.cc
diff --git a/sync/notifier/p2p_notifier_unittest.cc b/sync/notifier/p2p_notifier_unittest.cc
index 28ec60078708c1f11dcb08768d3fd61087fff62c..3f5b8ed65cf9601405640e85e0ea1a8dc3cd48bb 100644
--- a/sync/notifier/p2p_notifier_unittest.cc
+++ b/sync/notifier/p2p_notifier_unittest.cc
@@ -145,7 +145,7 @@ TEST_F(P2PNotifierTest, NotificationsBasic) {
syncable::ModelTypeSet enabled_types(
syncable::BOOKMARKS, syncable::PREFERENCES);
- EXPECT_CALL(mock_observer_, OnNotificationStateChange(true));
+ EXPECT_CALL(mock_observer_, OnSyncNotifierStateChange(NOTIFICATIONS_ON));
EXPECT_CALL(mock_observer_,
OnIncomingNotification(MakePayloadMap(enabled_types),
REMOTE_NOTIFICATION));
@@ -169,7 +169,8 @@ TEST_F(P2PNotifierTest, NotificationsBasic) {
p2p_notifier_.UpdateEnabledTypes(enabled_types);
ReflectSentNotifications();
- fake_push_client_->SimulateNotificationStateChange(true);
+ fake_push_client_->SimulatePushClientStateChange(
+ notifier::NOTIFICATIONS_ON);
// Sent with target NOTIFY_OTHERS so should not be propagated to
// |mock_observer_|.
@@ -195,7 +196,7 @@ TEST_F(P2PNotifierTest, SendNotificationData) {
const syncable::ModelTypePayloadMap& changed_payload_map =
MakePayloadMap(changed_types);
- EXPECT_CALL(mock_observer_, OnNotificationStateChange(true));
+ EXPECT_CALL(mock_observer_, OnSyncNotifierStateChange(NOTIFICATIONS_ON));
EXPECT_CALL(mock_observer_,
OnIncomingNotification(MakePayloadMap(enabled_types),
REMOTE_NOTIFICATION));
@@ -205,7 +206,8 @@ TEST_F(P2PNotifierTest, SendNotificationData) {
p2p_notifier_.UpdateEnabledTypes(enabled_types);
ReflectSentNotifications();
- fake_push_client_->SimulateNotificationStateChange(true);
+ fake_push_client_->SimulatePushClientStateChange(
+ notifier::NOTIFICATIONS_ON);
ReflectSentNotifications();

Powered by Google App Engine
This is Rietveld 408576698