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

Unified Diff: jingle/notifier/listener/xmpp_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 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/xmpp_push_client_unittest.cc
diff --git a/jingle/notifier/listener/xmpp_push_client_unittest.cc b/jingle/notifier/listener/xmpp_push_client_unittest.cc
index 6a92bcfb4d148d0b51a93645bb20379428bc14f8..857e437b608310f2231f847c0fb683bbc95f4e3c 100644
--- a/jingle/notifier/listener/xmpp_push_client_unittest.cc
+++ b/jingle/notifier/listener/xmpp_push_client_unittest.cc
@@ -24,7 +24,7 @@ using ::testing::StrictMock;
class MockObserver : public PushClientObserver {
public:
- MOCK_METHOD1(OnNotificationStateChange, void(bool));
+ MOCK_METHOD1(OnPushClientStateChange, void(PushClientState));
MOCK_METHOD1(OnIncomingNotification, void(const Notification&));
};
@@ -67,7 +67,7 @@ TEST_F(XmppPushClientTest, OnIncomingNotification) {
// Make sure the XMPP push client notifies its observers of a
// successful connection properly.
TEST_F(XmppPushClientTest, ConnectAndSubscribe) {
- EXPECT_CALL(mock_observer_, OnNotificationStateChange(true));
+ EXPECT_CALL(mock_observer_, OnPushClientStateChange(NOTIFICATIONS_ON));
xmpp_push_client_->OnConnect(fake_base_task_.AsWeakPtr());
xmpp_push_client_->OnSubscribed();
}
@@ -75,14 +75,14 @@ TEST_F(XmppPushClientTest, ConnectAndSubscribe) {
// Make sure the XMPP push client notifies its observers of a
// terminated connection properly.
TEST_F(XmppPushClientTest, Disconnect) {
- EXPECT_CALL(mock_observer_, OnNotificationStateChange(false));
+ EXPECT_CALL(mock_observer_, OnPushClientStateChange(NOTIFICATIONS_OFF));
xmpp_push_client_->OnDisconnect();
}
// Make sure the XMPP push client notifies its observers of a
// subscription error properly.
TEST_F(XmppPushClientTest, SubscriptionError) {
- EXPECT_CALL(mock_observer_, OnNotificationStateChange(false));
+ EXPECT_CALL(mock_observer_, OnPushClientStateChange(NOTIFICATIONS_OFF));
xmpp_push_client_->OnSubscriptionError();
}
@@ -92,7 +92,7 @@ TEST_F(XmppPushClientTest, SubscriptionError) {
// TODO(akalin): Figure out how to test that the notification was
// actually sent.
TEST_F(XmppPushClientTest, SendNotification) {
- EXPECT_CALL(mock_observer_, OnNotificationStateChange(true));
+ EXPECT_CALL(mock_observer_, OnPushClientStateChange(NOTIFICATIONS_ON));
xmpp_push_client_->OnConnect(fake_base_task_.AsWeakPtr());
xmpp_push_client_->OnSubscribed();
@@ -109,7 +109,7 @@ TEST_F(XmppPushClientTest, SendNotificationPending) {
Mock::VerifyAndClearExpectations(&mock_observer_);
- EXPECT_CALL(mock_observer_, OnNotificationStateChange(true));
+ EXPECT_CALL(mock_observer_, OnPushClientStateChange(NOTIFICATIONS_ON));
xmpp_push_client_->OnConnect(fake_base_task_.AsWeakPtr());
xmpp_push_client_->OnSubscribed();

Powered by Google App Engine
This is Rietveld 408576698