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

Unified Diff: remoting/host/heartbeat_sender_unittest.cc

Issue 7841006: Revert 99801 - Simplify IqRequest interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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
« no previous file with comments | « remoting/host/heartbeat_sender.cc ('k') | remoting/host/register_support_host_request.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/heartbeat_sender_unittest.cc
===================================================================
--- remoting/host/heartbeat_sender_unittest.cc (revision 99806)
+++ remoting/host/heartbeat_sender_unittest.cc (working copy)
@@ -27,7 +27,6 @@
using testing::Invoke;
using testing::NotNull;
using testing::Return;
-using testing::SaveArg;
namespace remoting {
@@ -51,7 +50,7 @@
};
// Call Start() followed by Stop(), and makes sure an Iq stanza is
-// being sent.
+// being send.
TEST_F(HeartbeatSenderTest, DoSendStanza) {
// |iq_request| is freed by HeartbeatSender.
MockIqRequest* iq_request = new MockIqRequest();
@@ -67,19 +66,12 @@
EXPECT_CALL(signal_strategy_, CreateIqRequest())
.WillOnce(Return(iq_request));
- XmlElement* sent_iq = NULL;
- EXPECT_CALL(*iq_request, SendIq(NotNull()))
- .WillOnce(SaveArg<0>(&sent_iq));
+ EXPECT_CALL(*iq_request, SendIq(buzz::STR_SET, kChromotingBotJid, NotNull()))
+ .WillOnce(DoAll(DeleteArg<2>(), Return()));
heartbeat_sender->OnSignallingConnected(&signal_strategy_, kTestJid);
message_loop_.RunAllPending();
- scoped_ptr<XmlElement> stanza(sent_iq);
- ASSERT_TRUE(stanza != NULL);
-
- EXPECT_EQ(stanza->Attr(buzz::QName("", "to")), kChromotingBotJid);
- EXPECT_EQ(stanza->Attr(buzz::QName("", "type")), "set");
-
heartbeat_sender->OnSignallingDisconnected();
message_loop_.RunAllPending();
}
« no previous file with comments | « remoting/host/heartbeat_sender.cc ('k') | remoting/host/register_support_host_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698