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..0f916dac299b080ad06a80658e3737a71023ba8f 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,15 @@ TEST_F(XmppPushClientTest, SendNotification) { |
xmpp_push_client_->SendNotification(Notification()); |
} |
+// Make sure nothing blows up when the XMPP push client sends a ping |
akalin
2012/10/25 00:51:10
append period.
Add:
// TODO(akalin): Figure out
gene
2012/10/25 01:06:22
Done.
|
+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. |
// |