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

Unified Diff: jingle/notifier/listener/non_blocking_push_client_unittest.cc

Issue 11232048: Adding XMPP ping functionality to CLoudPrint. XMPP ping and timeout is controlled thorugh Service S… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments addressed, unittests added Created 8 years, 2 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/non_blocking_push_client_unittest.cc
diff --git a/jingle/notifier/listener/non_blocking_push_client_unittest.cc b/jingle/notifier/listener/non_blocking_push_client_unittest.cc
index f9e028268ef4eb961164ed764af98b7a50eaba0f..d9841e88bd6abed95a798d86801038ac88fd8af6 100644
--- a/jingle/notifier/listener/non_blocking_push_client_unittest.cc
+++ b/jingle/notifier/listener/non_blocking_push_client_unittest.cc
@@ -112,6 +112,16 @@ TEST_F(NonBlockingPushClientTest, SendNotification) {
fake_push_client_->sent_notifications()[0].Equals(notification));
}
+// Make sure SendPing() gets delegated properly.
+TEST_F(NonBlockingPushClientTest, SendPing) {
+ const Notification notification = MakeTestNotification();
akalin 2012/10/25 00:51:10 no need for test notification
gene 2012/10/25 01:06:22 Done.
+
+ push_client_->SendPing();
+ EXPECT_EQ(0, fake_push_client_->sent_pings());
+ message_loop_.RunAllPending();
+ ASSERT_EQ(1, fake_push_client_->sent_pings());
+}
+
// Make sure notification state changes get propagated back to the
// parent.
TEST_F(NonBlockingPushClientTest, NotificationStateChange) {

Powered by Google App Engine
This is Rietveld 408576698