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 3487479d50e016677bba86f41b3a7657fd6db358..3beb488f6902c313f01ccbb983a8064802242dde 100644 |
--- a/jingle/notifier/listener/xmpp_push_client_unittest.cc |
+++ b/jingle/notifier/listener/xmpp_push_client_unittest.cc |
@@ -27,6 +27,7 @@ class MockObserver : public PushClientObserver { |
MOCK_METHOD0(OnNotificationsEnabled, void()); |
MOCK_METHOD1(OnNotificationsDisabled, void(NotificationsDisabledReason)); |
MOCK_METHOD1(OnIncomingNotification, void(const Notification&)); |
+ MOCK_METHOD0(OnPingResponse, void()); |
}; |
class XmppPushClientTest : public testing::Test { |
@@ -110,6 +111,17 @@ TEST_F(XmppPushClientTest, SendNotification) { |
xmpp_push_client_->SendNotification(Notification()); |
} |
+// Make sure nothing blows up when the XMPP push client sends a ping. |
+// |
+// TODO(akalin): Figure out how to test that the ping was actually sent. |
+TEST_F(XmppPushClientTest, SendPing) { |
+ EXPECT_CALL(mock_observer_, OnNotificationsEnabled()); |
+ |
+ xmpp_push_client_->OnConnect(fake_base_task_.AsWeakPtr()); |
+ xmpp_push_client_->OnSubscribed(); |
+ xmpp_push_client_->SendPing(); |
+} |
+ |
// Make sure nothing blows up when the XMPP push client sends a |
// notification when disconnected, and the client connects. |
// |