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

Unified Diff: webrtc/ortc/ortcfactory_unittest.cc

Issue 2714813004: Create the SrtpTransportInterface. (Closed)
Patch Set: Use rtc::Optional for SRTP send and receive keys. Created 3 years, 10 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 | « webrtc/ortc/ortcfactory_integrationtest.cc ('k') | webrtc/ortc/ortcrtpreceiver_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/ortc/ortcfactory_unittest.cc
diff --git a/webrtc/ortc/ortcfactory_unittest.cc b/webrtc/ortc/ortcfactory_unittest.cc
index 80e679b10e1a7e0185f822f24b51b59dcdcda10f..200939adaacfdebee982fa6ad5d95d2585ee84be 100644
--- a/webrtc/ortc/ortcfactory_unittest.cc
+++ b/webrtc/ortc/ortcfactory_unittest.cc
@@ -82,6 +82,24 @@ TEST_F(OrtcFactoryTest, CreateRtpTransportWithAndWithoutMux) {
EXPECT_TRUE(result.ok());
}
+// Simple test for the successful cases of CreateSrtpTransport.
+TEST_F(OrtcFactoryTest, CreateSrtpTransport) {
+ rtc::FakePacketTransport rtp("rtp");
+ rtc::FakePacketTransport rtcp("rtcp");
+ // With muxed RTCP.
+ RtcpParameters rtcp_parameters;
+ rtcp_parameters.mux = true;
+ auto result = ortc_factory_->CreateSrtpTransport(rtcp_parameters, &rtp,
+ nullptr, nullptr);
+ EXPECT_TRUE(result.ok());
+ result.MoveValue().reset();
+ // With non-muxed RTCP.
+ rtcp_parameters.mux = false;
+ result =
+ ortc_factory_->CreateSrtpTransport(rtcp_parameters, &rtp, &rtcp, nullptr);
+ EXPECT_TRUE(result.ok());
+}
+
// If no CNAME is provided, one should be generated and returned by
// GetRtpParameters.
TEST_F(OrtcFactoryTest, CreateRtpTransportGeneratesCname) {
« no previous file with comments | « webrtc/ortc/ortcfactory_integrationtest.cc ('k') | webrtc/ortc/ortcrtpreceiver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698