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

Unified Diff: webrtc/audio/audio_send_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_send_stream.cc ('k') | webrtc/test/mock_voe_channel_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/audio/audio_send_stream_unittest.cc
diff --git a/webrtc/audio/audio_send_stream_unittest.cc b/webrtc/audio/audio_send_stream_unittest.cc
index bea8a82852bddccfff39b0369fb5da1871c9c5d2..eed97c7fa0f2015a5256a7ac2ef05327b32dd44b 100644
--- a/webrtc/audio/audio_send_stream_unittest.cc
+++ b/webrtc/audio/audio_send_stream_unittest.cc
@@ -58,14 +58,12 @@ struct ConfigHelper {
EXPECT_CALL(*channel_proxy_, SetRTCPStatus(true)).Times(1);
EXPECT_CALL(*channel_proxy_, SetLocalSSRC(kSsrc)).Times(1);
EXPECT_CALL(*channel_proxy_, SetRTCP_CNAME(StrEq(kCName))).Times(1);
+ EXPECT_CALL(*channel_proxy_,
+ SetSendAbsoluteSenderTimeStatus(true, kAbsSendTimeId)).Times(1);
+ EXPECT_CALL(*channel_proxy_,
+ SetSendAudioLevelIndicationStatus(true, kAudioLevelId)).Times(1);
return channel_proxy_;
}));
- EXPECT_CALL(voice_engine_,
- SetSendAbsoluteSenderTimeStatus(kChannelId, true, kAbsSendTimeId))
- .WillOnce(Return(0));
- EXPECT_CALL(voice_engine_,
- SetSendAudioLevelIndicationStatus(kChannelId, true, kAudioLevelId))
- .WillOnce(Return(0));
stream_config_.voe_channel_id = kChannelId;
stream_config_.rtp.ssrc = kSsrc;
stream_config_.rtp.c_name = kCName;
@@ -80,7 +78,6 @@ struct ConfigHelper {
void SetupMockForGetStats() {
using testing::DoAll;
- using testing::SetArgPointee;
using testing::SetArgReferee;
std::vector<ReportBlock> report_blocks;
@@ -91,12 +88,14 @@ struct ConfigHelper {
block.fraction_lost = 0;
report_blocks.push_back(block); // Duplicate SSRC, bad fraction_lost.
- EXPECT_CALL(voice_engine_, GetRTCPStatistics(kChannelId, _))
- .WillRepeatedly(DoAll(SetArgReferee<1>(kCallStats), Return(0)));
+ EXPECT_TRUE(channel_proxy_);
+ EXPECT_CALL(*channel_proxy_, GetRTCPStatistics())
+ .WillRepeatedly(Return(kCallStats));
+ EXPECT_CALL(*channel_proxy_, GetRemoteRTCPReportBlocks())
+ .WillRepeatedly(Return(report_blocks));
+
EXPECT_CALL(voice_engine_, GetSendCodec(kChannelId, _))
.WillRepeatedly(DoAll(SetArgReferee<1>(kCodecInst), Return(0)));
- EXPECT_CALL(voice_engine_, GetRemoteRTCPReportBlocks(kChannelId, _))
- .WillRepeatedly(DoAll(SetArgPointee<1>(report_blocks), Return(0)));
EXPECT_CALL(voice_engine_, GetSpeechInputLevelFullRange(_))
.WillRepeatedly(DoAll(SetArgReferee<0>(kSpeechInputLevel), Return(0)));
EXPECT_CALL(voice_engine_, GetEcMetricsStatus(_))
« no previous file with comments | « webrtc/audio/audio_send_stream.cc ('k') | webrtc/test/mock_voe_channel_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698