Index: webrtc/api/webrtcsession_unittest.cc |
diff --git a/webrtc/api/webrtcsession_unittest.cc b/webrtc/api/webrtcsession_unittest.cc |
index 1907b8410ccac03b0504bbe5e2187823dfc7bfa6..e8d5786f7b8a9998aef7903cd41dad90f23780c4 100644 |
--- a/webrtc/api/webrtcsession_unittest.cc |
+++ b/webrtc/api/webrtcsession_unittest.cc |
@@ -382,7 +382,8 @@ class WebRtcSessionTest |
// options. When DTLS is enabled a certificate will be used if provided, |
// otherwise one will be generated using the |cert_generator|. |
void Init( |
- std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator) { |
+ std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator, |
+ PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy) { |
ASSERT_TRUE(session_.get() == NULL); |
session_.reset(new WebRtcSessionForTest( |
media_controller_.get(), rtc::Thread::Current(), rtc::Thread::Current(), |
@@ -392,6 +393,7 @@ class WebRtcSessionTest |
session_->GetOnDestroyedSignal()->connect( |
this, &WebRtcSessionTest::OnSessionDestroyed); |
+ configuration_.rtcp_mux_policy = rtcp_mux_policy; |
EXPECT_EQ(PeerConnectionInterface::kIceConnectionNew, |
observer_.ice_connection_state_); |
EXPECT_EQ(PeerConnectionInterface::kIceGatheringNew, |
@@ -410,7 +412,13 @@ class WebRtcSessionTest |
void OnSessionDestroyed() { session_destroyed_ = true; } |
- void Init() { Init(nullptr); } |
+ void Init() { |
+ Init(nullptr, PeerConnectionInterface::kRtcpMuxPolicyNegotiate); |
+ } |
Zhi Huang
2016/06/22 00:23:06
In the unit test, the default value for Init() is
|
+ |
+ void Init(PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy) { |
+ Init(nullptr, rtcp_mux_policy); |
+ } |
void InitWithBundlePolicy( |
PeerConnectionInterface::BundlePolicy bundle_policy) { |
@@ -421,8 +429,7 @@ class WebRtcSessionTest |
void InitWithRtcpMuxPolicy( |
PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy) { |
PeerConnectionInterface::RTCConfiguration configuration; |
- configuration_.rtcp_mux_policy = rtcp_mux_policy; |
- Init(); |
+ Init(rtcp_mux_policy); |
} |
// Successfully init with DTLS; with a certificate generated and supplied or |
@@ -438,7 +445,8 @@ class WebRtcSessionTest |
} else { |
RTC_CHECK(false); |
} |
- Init(std::move(cert_generator)); |
+ Init(std::move(cert_generator), |
+ PeerConnectionInterface::kRtcpMuxPolicyNegotiate); |
} |
// Init with DTLS with a store that will fail to generate a certificate. |
@@ -446,7 +454,8 @@ class WebRtcSessionTest |
std::unique_ptr<FakeRTCCertificateGenerator> cert_generator( |
new FakeRTCCertificateGenerator()); |
cert_generator->set_should_fail(true); |
- Init(std::move(cert_generator)); |
+ Init(std::move(cert_generator), |
+ PeerConnectionInterface::kRtcpMuxPolicyNegotiate); |
} |
void InitWithDtmfCodec() { |
@@ -3281,7 +3290,7 @@ TEST_F(WebRtcSessionTest, TestAddChannelToConnectedBundle) { |
configuration_.rtcp_mux_policy = |
PeerConnectionInterface::kRtcpMuxPolicyRequire; |
Taylor Brandstetter
2016/06/22 17:01:09
If we're passing the policy into Init, we probably
Zhi Huang
2016/06/22 21:41:28
I agree.
|
options_.disable_encryption = true; |
- Init(); |
+ Init(PeerConnectionInterface::kRtcpMuxPolicyRequire); |
// Negotiate an audio channel with MAX_BUNDLE enabled. |
SendAudioOnlyStream2(); |