| Index: webrtc/media/engine/webrtcvoiceengine_unittest.cc
|
| diff --git a/webrtc/media/engine/webrtcvoiceengine_unittest.cc b/webrtc/media/engine/webrtcvoiceengine_unittest.cc
|
| index 3ca7ec8b051cf20a8bca795efb4b1d7ff98b8dd0..0cfbeab42beeb0473a3b5fae3daf066a76749ca2 100644
|
| --- a/webrtc/media/engine/webrtcvoiceengine_unittest.cc
|
| +++ b/webrtc/media/engine/webrtcvoiceengine_unittest.cc
|
| @@ -1039,15 +1039,21 @@ TEST_F(WebRtcVoiceEngineTestFake,
|
| // for each encoding individually.
|
|
|
| EXPECT_TRUE(SetupSendStream());
|
| - // Setting RtpParameters with no encoding is expected to fail.
|
| - webrtc::RtpParameters parameters;
|
| - EXPECT_FALSE(channel_->SetRtpSendParameters(kSsrc1, parameters));
|
| - // Setting RtpParameters with exactly one encoding should succeed.
|
| - parameters.encodings.push_back(webrtc::RtpEncodingParameters());
|
| - EXPECT_TRUE(channel_->SetRtpSendParameters(kSsrc1, parameters));
|
| + webrtc::RtpParameters parameters = channel_->GetRtpSendParameters(kSsrc1);
|
| // Two or more encodings should result in failure.
|
| parameters.encodings.push_back(webrtc::RtpEncodingParameters());
|
| EXPECT_FALSE(channel_->SetRtpSendParameters(kSsrc1, parameters));
|
| + // Zero encodings should also fail.
|
| + parameters.encodings.clear();
|
| + EXPECT_FALSE(channel_->SetRtpSendParameters(kSsrc1, parameters));
|
| +}
|
| +
|
| +// Changing the SSRC through RtpParameters is not allowed.
|
| +TEST_F(WebRtcVoiceEngineTestFake, CannotSetSsrcInRtpSendParameters) {
|
| + EXPECT_TRUE(SetupSendStream());
|
| + webrtc::RtpParameters parameters = channel_->GetRtpSendParameters(kSsrc1);
|
| + parameters.encodings[0].ssrc = rtc::Optional<uint32_t>(0xdeadbeef);
|
| + EXPECT_FALSE(channel_->SetRtpSendParameters(kSsrc1, parameters));
|
| }
|
|
|
| // Test that a stream will not be sending if its encoding is made
|
|
|