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

Unified Diff: remoting/protocol/jingle_messages_unittest.cc

Issue 2805173005: Move SignalingAddress to remoting/signaling (Closed)
Patch Set: fix compilation on windows Created 3 years, 8 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/protocol/jingle_messages.cc ('k') | remoting/signaling/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/jingle_messages_unittest.cc
diff --git a/remoting/protocol/jingle_messages_unittest.cc b/remoting/protocol/jingle_messages_unittest.cc
index 680900c2500d49d1ce70bda3136a69c7d964d537..adb1623a143c6203c480546e72cb95c797fd0882 100644
--- a/remoting/protocol/jingle_messages_unittest.cc
+++ b/remoting/protocol/jingle_messages_unittest.cc
@@ -342,25 +342,26 @@ TEST(JingleMessageTest, SessionAcceptNoIce) {
TEST(JingleMessageTest, IceTransportInfo) {
const char* kTestIceTransportInfoMessage =
- "<cli:iq to='user@gmail.com/chromoting016DBB07' type='set' "
- "xmlns:cli='jabber:client'>"
- "<jingle xmlns='urn:xmpp:jingle:1' action='transport-info' "
- "sid='2227053353'>"
- "<content name='chromoting' creator='initiator'>"
- "<transport xmlns='google:remoting:ice'>"
- "<credentials channel='event' ufrag='tPUyEAmQrEw3y7hi' "
- "password='2iRdhLfawKZC5ydJ'/>"
- "<credentials channel='video' ufrag='EPK3CXo5sTLJSez0' "
- "password='eM0VUfUkZ+1Pyi0M'/>"
- "<candidate name='event' foundation='725747215' "
- "address='172.23.164.186' port='59089' type='local' "
- "protocol='udp' priority='2122194688' generation='0'/>"
- "<candidate name='video' foundation='3623806809' "
- "address='172.23.164.186' port='57040' type='local' "
- "protocol='udp' priority='2122194688' generation='0'/>"
- "</transport>"
- "</content>"
- "</jingle>"
+ "<cli:iq to='user@gmail.com/chromoting016DBB07' "
+ " from='foo@bar.com/resource' "
+ " type='set' xmlns:cli='jabber:client'>"
+ " <jingle xmlns='urn:xmpp:jingle:1' action='transport-info' "
+ " sid='2227053353'>"
+ " <content name='chromoting' creator='initiator'>"
+ " <transport xmlns='google:remoting:ice'>"
+ " <credentials channel='event' ufrag='tPUyEAmQrEw3y7hi' "
+ " password='2iRdhLfawKZC5ydJ'/>"
+ " <credentials channel='video' ufrag='EPK3CXo5sTLJSez0' "
+ " password='eM0VUfUkZ+1Pyi0M'/>"
+ " <candidate name='event' foundation='725747215' "
+ " address='172.23.164.186' port='59089' type='local' "
+ " protocol='udp' priority='2122194688' generation='0'/>"
+ " <candidate name='video' foundation='3623806809' "
+ " address='172.23.164.186' port='57040' type='local' "
+ " protocol='udp' priority='2122194688' generation='0'/>"
+ " </transport>"
+ " </content>"
+ " </jingle>"
"</cli:iq>";
JingleMessage message;
@@ -404,35 +405,6 @@ TEST(JingleMessageTest, SessionInfo) {
buzz::QName("urn:xmpp:jingle:1", "test-info"));
}
-TEST(JingleMessageTest, ParseAddress) {
- const char* kTestSessionInfoMessage =
- "<cli:iq from='remoting@bot.talk.google.com' "
- "to='user@gmail.com/chromiumsy5C6A652D' type='set' "
- "xmlns:cli='jabber:client'>"
- "<jingle action='session-info' "
- "sid='2227053353' xmlns='urn:xmpp:jingle:1' "
- "from-channel='lcs' "
- "from-endpoint-id='user@gmail.com/xBrnereror='>"
- "<test-info>TestMessage</test-info>"
- "</jingle>"
- "</cli:iq>";
-
- JingleMessage message;
- ParseFormatAndCompare(kTestSessionInfoMessage, &message);
- EXPECT_EQ(message.from.jid(), "remoting@bot.talk.google.com");
- EXPECT_EQ(message.from.channel(), SignalingAddress::Channel::LCS);
- EXPECT_EQ(message.from.endpoint_id(), "user@gmail.com/xBrnereror=");
- EXPECT_EQ(message.from.id(), "user@gmail.com/xBrnereror=");
-
- EXPECT_EQ(message.to.jid(), "user@gmail.com/chromiumsy5C6A652D");
- EXPECT_EQ(message.to.channel(), SignalingAddress::Channel::XMPP);
- EXPECT_EQ(message.to.endpoint_id(), "");
- EXPECT_EQ(message.to.id(), "user@gmail.com/chromiumsy5C6A652D");
-
- EXPECT_EQ(message.action, JingleMessage::SESSION_INFO);
-}
-
-
TEST(JingleMessageTest, IgnoreInvalidAddress) {
const char* kInvalidFromField =
"<cli:iq from='evil@gmail.com' "
« no previous file with comments | « remoting/protocol/jingle_messages.cc ('k') | remoting/signaling/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698