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) { |