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

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 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/p2p_notifier_unittest.cc
diff --git a/sync/notifier/p2p_notifier_unittest.cc b/sync/notifier/p2p_notifier_unittest.cc
index 28ec60078708c1f11dcb08768d3fd61087fff62c..d1ed20d42a488d9cf55e95a32d6e9f90c160887b 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_, OnNotificationsEnabled());
EXPECT_CALL(mock_observer_,
OnIncomingNotification(MakePayloadMap(enabled_types),
REMOTE_NOTIFICATION));
@@ -169,7 +169,7 @@ TEST_F(P2PNotifierTest, NotificationsBasic) {
p2p_notifier_.UpdateEnabledTypes(enabled_types);
ReflectSentNotifications();
- fake_push_client_->SimulateNotificationStateChange(true);
+ fake_push_client_->EnableNotifications();
// Sent with target NOTIFY_OTHERS so should not be propagated to
// |mock_observer_|.
@@ -195,7 +195,7 @@ TEST_F(P2PNotifierTest, SendNotificationData) {
const syncable::ModelTypePayloadMap& changed_payload_map =
MakePayloadMap(changed_types);
- EXPECT_CALL(mock_observer_, OnNotificationStateChange(true));
+ EXPECT_CALL(mock_observer_, OnNotificationsEnabled());
EXPECT_CALL(mock_observer_,
OnIncomingNotification(MakePayloadMap(enabled_types),
REMOTE_NOTIFICATION));
@@ -205,7 +205,7 @@ TEST_F(P2PNotifierTest, SendNotificationData) {
p2p_notifier_.UpdateEnabledTypes(enabled_types);
ReflectSentNotifications();
- fake_push_client_->SimulateNotificationStateChange(true);
+ fake_push_client_->EnableNotifications();
ReflectSentNotifications();

Powered by Google App Engine
This is Rietveld 408576698