Index: webrtc/audio/audio_receive_stream_unittest.cc |
diff --git a/webrtc/audio/audio_receive_stream_unittest.cc b/webrtc/audio/audio_receive_stream_unittest.cc |
index bde68ed3ae7edb79e3422f2f758350aebe44c638..28217e370b364e3c91042b995560925b73add663 100644 |
--- a/webrtc/audio/audio_receive_stream_unittest.cc |
+++ b/webrtc/audio/audio_receive_stream_unittest.cc |
@@ -15,6 +15,7 @@ |
#include "webrtc/audio/conversion.h" |
#include "webrtc/logging/rtc_event_log/mock/mock_rtc_event_log.h" |
#include "webrtc/modules/audio_coding/codecs/mock/mock_audio_decoder_factory.h" |
+#include "webrtc/modules/audio_device/include/mock_audio_device.h" |
#include "webrtc/modules/bitrate_controller/include/mock/mock_bitrate_controller.h" |
#include "webrtc/modules/congestion_controller/include/mock/mock_congestion_controller.h" |
#include "webrtc/modules/pacing/packet_router.h" |
@@ -74,10 +75,15 @@ struct ConfigHelper { |
&event_log_) { |
using testing::Invoke; |
- EXPECT_CALL(voice_engine_, |
- RegisterVoiceEngineObserver(_)).WillOnce(Return(0)); |
- EXPECT_CALL(voice_engine_, |
- DeRegisterVoiceEngineObserver()).WillOnce(Return(0)); |
+ EXPECT_CALL(voice_engine_, RegisterVoiceEngineObserver(_)) |
+ .WillOnce(Return(0)); |
+ EXPECT_CALL(voice_engine_, DeRegisterVoiceEngineObserver()) |
+ .WillOnce(Return(0)); |
+ EXPECT_CALL(voice_engine_, audio_transport()); |
ossu
2016/11/03 14:02:04
Don't these require actions, i.e. WillOnce(Return(
aleloi
2016/11/08 11:46:41
I think the default action (which is Return(nullpt
|
+ EXPECT_CALL(voice_engine_, audio_processing()); |
+ EXPECT_CALL(voice_engine_, audio_device_module()); |
+ ON_CALL(voice_engine_, audio_device_module()) |
+ .WillByDefault(Return(&mock_audio_device_)); |
AudioState::Config config; |
config.voice_engine = &voice_engine_; |
audio_state_ = AudioState::Create(config); |
@@ -177,6 +183,7 @@ struct ConfigHelper { |
MockRemoteBitrateEstimator remote_bitrate_estimator_; |
MockRtcEventLog event_log_; |
testing::StrictMock<MockVoiceEngine> voice_engine_; |
+ testing::NiceMock<webrtc::test::MockAudioDeviceModule> mock_audio_device_; |
ossu
2016/11/03 14:02:04
What's so nice about it!? :)
Why not just use an u
aleloi
2016/11/08 11:46:41
Probably an ordinary mock make sense here, because
|
rtc::scoped_refptr<AudioState> audio_state_; |
AudioReceiveStream::Config stream_config_; |
testing::StrictMock<MockVoEChannelProxy>* channel_proxy_ = nullptr; |