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

Unified Diff: webrtc/audio/audio_receive_stream_unittest.cc

Issue 2062193002: Add AudioReceiveStream::SetGain() method and use that in WVoMC::SetOutputVolume(). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: bad test Created 4 years, 6 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
« no previous file with comments | « webrtc/audio/audio_receive_stream.cc ('k') | webrtc/audio_receive_stream.h » ('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 2e789f92c280713eccae2ba8ebf1b7d216c8cdf0..8e26dd908376374b79ac9ff2fab5df5129b9aeab 100644
--- a/webrtc/audio/audio_receive_stream_unittest.cc
+++ b/webrtc/audio/audio_receive_stream_unittest.cc
@@ -30,6 +30,7 @@ namespace test {
namespace {
using testing::_;
+using testing::FloatEq;
using testing::Return;
using testing::ReturnRef;
@@ -92,12 +93,12 @@ struct ConfigHelper {
EXPECT_CALL(*channel_proxy_,
SetReceiveAudioLevelIndicationStatus(true, kAudioLevelId))
.Times(1);
- EXPECT_CALL(*channel_proxy_, EnableReceiveTransportSequenceNumber(
- kTransportSequenceNumberId))
- .Times(1);
EXPECT_CALL(*channel_proxy_,
- RegisterReceiverCongestionControlObjects(&packet_router_))
- .Times(1);
+ EnableReceiveTransportSequenceNumber(kTransportSequenceNumberId))
+ .Times(1);
+ EXPECT_CALL(*channel_proxy_,
+ RegisterReceiverCongestionControlObjects(&packet_router_))
+ .Times(1);
EXPECT_CALL(congestion_controller_, packet_router())
.WillOnce(Return(&packet_router_));
EXPECT_CALL(*channel_proxy_, ResetCongestionControlObjects())
@@ -303,7 +304,6 @@ TEST(AudioReceiveStreamTest, ReceiveRtcpPacket) {
EXPECT_TRUE(recv_stream.DeliverRtcp(&rtcp_packet[0], rtcp_packet.size()));
}
-
TEST(AudioReceiveStreamTest, GetStats) {
ConfigHelper helper;
internal::AudioReceiveStream recv_stream(
@@ -345,5 +345,14 @@ TEST(AudioReceiveStreamTest, GetStats) {
EXPECT_EQ(kCallStats.capture_start_ntp_time_ms_,
stats.capture_start_ntp_time_ms);
}
+
+TEST(AudioReceiveStreamTest, SetGain) {
+ ConfigHelper helper;
+ internal::AudioReceiveStream recv_stream(
+ helper.congestion_controller(), helper.config(), helper.audio_state());
+ EXPECT_CALL(*helper.channel_proxy(),
+ SetChannelOutputVolumeScaling(FloatEq(0.765f)));
+ recv_stream.SetGain(0.765f);
+}
} // namespace test
} // namespace webrtc
« no previous file with comments | « webrtc/audio/audio_receive_stream.cc ('k') | webrtc/audio_receive_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698