Handle TimeUntilNextProcess in StartupShutdownWithExternalADM

BUG=webrtc:7258

Review-Url: https://codereview.webrtc.org/2719113002
Cr-Commit-Position: refs/heads/master@{#16894}
This commit is contained in:
tommi 2017-02-28 02:12:57 -08:00 committed by Commit bot
parent d9cbd5138d
commit 322a9e42f8

View File

@ -3507,6 +3507,9 @@ TEST(WebRtcVoiceEngineTest, StartupShutdownWithExternalADM) {
testing::NiceMock<webrtc::test::MockAudioDeviceModule> adm;
EXPECT_CALL(adm, AddRef()).Times(3).WillRepeatedly(Return(0));
EXPECT_CALL(adm, Release()).Times(3).WillRepeatedly(Return(0));
// Return 100ms just in case this function gets called. If we don't,
// we could enter a tight loop since the mock would return 0.
EXPECT_CALL(adm, TimeUntilNextProcess()).WillRepeatedly(Return(100));
{
cricket::WebRtcVoiceEngine engine(
&adm, webrtc::MockAudioDecoderFactory::CreateUnusedFactory(), nullptr);