Made DTLS/SCTP equivalent to UDP/DTLS/SCTP when comparing session descs in tests.

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

View File

@ -740,8 +740,19 @@ class WebRtcSdpTest : public testing::Test {
EXPECT_EQ(c1.key_params, c2.key_params);
EXPECT_EQ(c1.session_params, c2.session_params);
}
// protocol
EXPECT_EQ(cd1->protocol(), cd2->protocol());
// Use an equivalence class here, for old and new versions of the
// protocol description.
if (cd1->protocol() == cricket::kMediaProtocolDtlsSctp
|| cd1->protocol() == cricket::kMediaProtocolUdpDtlsSctp) {
const bool cd2_is_also_udp_dtls_sctp =
cd2->protocol() == cricket::kMediaProtocolDtlsSctp
|| cd2->protocol() == cricket::kMediaProtocolUdpDtlsSctp;
EXPECT_TRUE(cd2_is_also_udp_dtls_sctp);
} else {
EXPECT_EQ(cd1->protocol(), cd2->protocol());
}
// codecs
EXPECT_EQ(cd1->codecs(), cd2->codecs());