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

Unified Diff: webrtc/audio/audio_receive_stream_unittest.cc

Issue 1482703002: Use ChannelProxy for most calls on voe::Channel in Audio[Receive|Send]Stream. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added ThreadChecker to ChannelProxy Created 5 years, 1 month 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
« no previous file with comments | « webrtc/audio/audio_receive_stream.cc ('k') | webrtc/audio/audio_send_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 aac7c0f1c1a7c9f87d611024111af8f0435cca3c..40c2d64970c1d9e017696f8271fe0571cb3e4beb 100644
--- a/webrtc/audio/audio_receive_stream_unittest.cc
+++ b/webrtc/audio/audio_receive_stream_unittest.cc
@@ -69,14 +69,14 @@ struct ConfigHelper {
EXPECT_FALSE(channel_proxy_);
channel_proxy_ = new testing::StrictMock<MockVoEChannelProxy>();
EXPECT_CALL(*channel_proxy_, SetLocalSSRC(kLocalSsrc)).Times(1);
+ EXPECT_CALL(*channel_proxy_,
+ SetReceiveAbsoluteSenderTimeStatus(true, kAbsSendTimeId))
+ .Times(1);
+ EXPECT_CALL(*channel_proxy_,
+ SetReceiveAudioLevelIndicationStatus(true, kAudioLevelId))
+ .Times(1);
return channel_proxy_;
}));
- EXPECT_CALL(voice_engine_,
- SetReceiveAbsoluteSenderTimeStatus(kChannelId, true, kAbsSendTimeId))
- .WillOnce(Return(0));
- EXPECT_CALL(voice_engine_,
- SetReceiveAudioLevelIndicationStatus(kChannelId, true, kAudioLevelId))
- .WillOnce(Return(0));
stream_config_.voe_channel_id = kChannelId;
stream_config_.rtp.local_ssrc = kLocalSsrc;
stream_config_.rtp.remote_ssrc = kRemoteSsrc;
@@ -95,23 +95,22 @@ struct ConfigHelper {
void SetupMockForGetStats() {
using testing::DoAll;
- using testing::SetArgPointee;
using testing::SetArgReferee;
- EXPECT_CALL(voice_engine_, GetRTCPStatistics(kChannelId, _))
- .WillOnce(DoAll(SetArgReferee<1>(kCallStats), Return(0)));
+ EXPECT_TRUE(channel_proxy_);
+ EXPECT_CALL(*channel_proxy_, GetRTCPStatistics())
+ .WillOnce(Return(kCallStats));
+ EXPECT_CALL(*channel_proxy_, GetDelayEstimate())
+ .WillOnce(Return(kJitterBufferDelay + kPlayoutBufferDelay));
+ EXPECT_CALL(*channel_proxy_, GetSpeechOutputLevelFullRange())
+ .WillOnce(Return(kSpeechOutputLevel));
+ EXPECT_CALL(*channel_proxy_, GetNetworkStatistics())
+ .WillOnce(Return(kNetworkStats));
+ EXPECT_CALL(*channel_proxy_, GetDecodingCallStatistics())
+ .WillOnce(Return(kAudioDecodeStats));
+
EXPECT_CALL(voice_engine_, GetRecCodec(kChannelId, _))
.WillOnce(DoAll(SetArgReferee<1>(kCodecInst), Return(0)));
- EXPECT_CALL(voice_engine_, GetDelayEstimate(kChannelId, _, _))
- .WillOnce(DoAll(SetArgPointee<1>(kJitterBufferDelay),
- SetArgPointee<2>(kPlayoutBufferDelay), Return(0)));
- EXPECT_CALL(voice_engine_,
- GetSpeechOutputLevelFullRange(kChannelId, _)).WillOnce(
- DoAll(SetArgReferee<1>(kSpeechOutputLevel), Return(0)));
- EXPECT_CALL(voice_engine_, GetNetworkStatistics(kChannelId, _))
- .WillOnce(DoAll(SetArgReferee<1>(kNetworkStats), Return(0)));
- EXPECT_CALL(voice_engine_, GetDecodingCallStatistics(kChannelId, _))
- .WillOnce(DoAll(SetArgPointee<1>(kAudioDecodeStats), Return(0)));
}
private:
« no previous file with comments | « webrtc/audio/audio_receive_stream.cc ('k') | webrtc/audio/audio_send_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698