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

Unified Diff: webrtc/media/engine/webrtcvoiceengine_unittest.cc

Issue 2985633002: Avoid that previous settings in APM are overwritten by WebRtcVoiceEngine (Closed)
Patch Set: Corrected unittest behavior relying on sticky settings Created 3 years, 5 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
Index: webrtc/media/engine/webrtcvoiceengine_unittest.cc
diff --git a/webrtc/media/engine/webrtcvoiceengine_unittest.cc b/webrtc/media/engine/webrtcvoiceengine_unittest.cc
index 334e63fab101d391a2a10d2b4394880cb5f93a6c..ad3fe2e196a7b114a9473b01829e6ad23b8fa7e1 100644
--- a/webrtc/media/engine/webrtcvoiceengine_unittest.cc
+++ b/webrtc/media/engine/webrtcvoiceengine_unittest.cc
@@ -125,7 +125,6 @@ TEST(WebRtcVoiceEngineTestStubLibrary, StartupShutdown) {
rtc::scoped_refptr<StrictMock<webrtc::test::MockAudioProcessing>> apm =
new rtc::RefCountedObject<
StrictMock<webrtc::test::MockAudioProcessing>>();
- EXPECT_CALL(*apm, ApplyConfig(testing::_));
EXPECT_CALL(*apm, SetExtraOptions(testing::_));
EXPECT_CALL(*apm, Initialize()).WillOnce(Return(0));
EXPECT_CALL(*apm, DetachAecDump());
@@ -170,7 +169,6 @@ class WebRtcVoiceEngineTestFake : public testing::Test {
// AudioDeviceModule.
AdmSetupExpectations(&adm_);
// AudioProcessing.
- EXPECT_CALL(*apm_, ApplyConfig(testing::_));
EXPECT_CALL(*apm_, SetExtraOptions(testing::_));
EXPECT_CALL(*apm_, Initialize()).WillOnce(Return(0));
EXPECT_CALL(*apm_, DetachAecDump());
@@ -204,7 +202,6 @@ class WebRtcVoiceEngineTestFake : public testing::Test {
}
bool SetupChannel() {
- EXPECT_CALL(*apm_, ApplyConfig(testing::_));
EXPECT_CALL(*apm_, SetExtraOptions(testing::_));
channel_ = engine_->CreateChannel(&call_, cricket::MediaConfig(),
cricket::AudioOptions());
@@ -278,14 +275,12 @@ class WebRtcVoiceEngineTestFake : public testing::Test {
EXPECT_CALL(adm_, RecordingIsInitialized()).WillOnce(Return(false));
EXPECT_CALL(adm_, Recording()).WillOnce(Return(false));
EXPECT_CALL(adm_, InitRecording()).WillOnce(Return(0));
- EXPECT_CALL(*apm_, ApplyConfig(testing::_));
EXPECT_CALL(*apm_, SetExtraOptions(testing::_));
}
channel_->SetSend(enable);
}
void SetSendParameters(const cricket::AudioSendParameters& params) {
- EXPECT_CALL(*apm_, ApplyConfig(testing::_));
EXPECT_CALL(*apm_, SetExtraOptions(testing::_));
ASSERT_TRUE(channel_);
EXPECT_TRUE(channel_->SetSendParameters(params));
@@ -296,7 +291,6 @@ class WebRtcVoiceEngineTestFake : public testing::Test {
EXPECT_CALL(*apm_, set_output_will_be_muted(!enable));
ASSERT_TRUE(channel_);
if (enable && options) {
- EXPECT_CALL(*apm_, ApplyConfig(testing::_));
EXPECT_CALL(*apm_, SetExtraOptions(testing::_));
}
EXPECT_TRUE(channel_->SetAudioSend(ssrc, enable, options, source));
@@ -2802,7 +2796,6 @@ TEST_F(WebRtcVoiceEngineTestFake, SetOptionOverridesViaChannels) {
RecordingIsInitialized()).Times(2).WillRepeatedly(Return(false));
EXPECT_CALL(adm_, Recording()).Times(2).WillRepeatedly(Return(false));
EXPECT_CALL(adm_, InitRecording()).Times(2).WillRepeatedly(Return(0));
- EXPECT_CALL(*apm_, ApplyConfig(testing::_)).Times(10);
EXPECT_CALL(*apm_, SetExtraOptions(testing::_)).Times(10);
std::unique_ptr<cricket::WebRtcVoiceMediaChannel> channel1(
@@ -2913,7 +2906,6 @@ TEST_F(WebRtcVoiceEngineTestFake, TestSetDscpOptions) {
cricket::MediaConfig config;
std::unique_ptr<cricket::VoiceMediaChannel> channel;
- EXPECT_CALL(*apm_, ApplyConfig(testing::_)).Times(3);
EXPECT_CALL(*apm_, SetExtraOptions(testing::_)).Times(3);
channel.reset(

Powered by Google App Engine
This is Rietveld 408576698