Added a separate DTLS/SCTP test.

Cr-Commit-Position: refs/heads/master@{#8484}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8484 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
lally@webrtc.org 2015-02-24 20:19:26 +00:00
parent a747093334
commit c7848b7fd1

View File

@ -294,6 +294,15 @@ static const char kSdpSctpDataChannelStringWithSctpPort[] =
"a=ice-pwd:pwd_data\r\n"
"a=mid:data_content_name\r\n";
static const char kSdpSctpDataChannelStringWithOldProtocol[] =
"m=application 9 DTLS/SCTP webrtc-datachannel\r\n"
"a=max-message-size=100000\r\n"
"a=sctp-port 5000\r\n"
"c=IN IP4 0.0.0.0\r\n"
"a=ice-ufrag:ufrag_data\r\n"
"a=ice-pwd:pwd_data\r\n"
"a=mid:data_content_name\r\n";
static const char kSdpSctpDataChannelWithCandidatesString[] =
"m=application 2345 DTLS/SCTP 5000\r\n"
"c=IN IP4 74.125.127.126\r\n"
@ -2147,6 +2156,19 @@ TEST_F(WebRtcSdpTest, DeserializeSdpWithSctpDataChannelsWithSctpPort) {
EXPECT_TRUE(CompareSessionDescription(jdesc, jdesc_output));
}
TEST_F(WebRtcSdpTest, DeserializeSdpWithSctpDataChannelsWithOldProtocol) {
AddSctpDataChannel();
JsepSessionDescription jdesc(kDummyString);
ASSERT_TRUE(jdesc.Initialize(desc_.Copy(), kSessionId, kSessionVersion));
std::string sdp_with_data = kSdpString;
sdp_with_data.append(kSdpSctpDataChannelStringWithOldProtocol);
JsepSessionDescription jdesc_output(kDummyString);
EXPECT_TRUE(SdpDeserialize(sdp_with_data, &jdesc_output));
EXPECT_TRUE(CompareSessionDescription(jdesc, jdesc_output));
}
// Test to check the behaviour if sctp-port is specified
// on the m= line and in a=sctp-port.
TEST_F(WebRtcSdpTest, DeserializeSdpWithMultiSctpPort) {