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

Unified Diff: remoting/host/register_support_host_request_unittest.cc

Issue 7809003: Simplify IqRequest interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix windows 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/register_support_host_request.cc ('k') | remoting/jingle_glue/iq_request.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/register_support_host_request_unittest.cc
diff --git a/remoting/host/register_support_host_request_unittest.cc b/remoting/host/register_support_host_request_unittest.cc
index 50c305a63ab8d7a8f6415f8546b3e9d77fe0c492..57c83b2512b6cf9fc6e7067d871917073bcbea75 100644
--- a/remoting/host/register_support_host_request_unittest.cc
+++ b/remoting/host/register_support_host_request_unittest.cc
@@ -76,8 +76,8 @@ TEST_F(RegisterSupportHostRequestTest, Send) {
.WillOnce(Return(iq_request));
XmlElement* sent_iq = NULL;
- EXPECT_CALL(*iq_request, SendIq(buzz::STR_SET, kChromotingBotJid, NotNull()))
- .WillOnce(SaveArg<2>(&sent_iq));
+ EXPECT_CALL(*iq_request, SendIq(NotNull()))
+ .WillOnce(SaveArg<0>(&sent_iq));
request->OnSignallingConnected(&signal_strategy_, kTestJid);
message_loop_.RunAllPending();
@@ -86,11 +86,15 @@ TEST_F(RegisterSupportHostRequestTest, Send) {
scoped_ptr<XmlElement> stanza(sent_iq);
ASSERT_TRUE(stanza != NULL);
+ EXPECT_EQ(stanza->Attr(buzz::QName("", "to")),
+ std::string(kChromotingBotJid));
+ EXPECT_EQ(stanza->Attr(buzz::QName("", "type")), "set");
+
EXPECT_EQ(QName(kChromotingXmlNamespace, "register-support-host"),
- stanza->Name());
+ stanza->FirstElement()->Name());
QName signature_tag(kChromotingXmlNamespace, "signature");
- XmlElement* signature = stanza->FirstNamed(signature_tag);
+ XmlElement* signature = stanza->FirstElement()->FirstNamed(signature_tag);
ASSERT_TRUE(signature != NULL);
EXPECT_TRUE(stanza->NextNamed(signature_tag) == NULL);
« no previous file with comments | « remoting/host/register_support_host_request.cc ('k') | remoting/jingle_glue/iq_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698