 Chromium Code Reviews
 Chromium Code Reviews Issue 2405183002:
  Moving WebRtcVoiceMediaChannel::SendSetCodec to AudioSendStream.  (Closed)
    
  
    Issue 2405183002:
  Moving WebRtcVoiceMediaChannel::SendSetCodec to AudioSendStream.  (Closed) 
  | 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 a05c00ba49b4c3d9dfcedfbec3c53e8e6c734932..68b46d4ee6e6a0de8d289e3ee163c1f76d3220d7 100644 | 
| --- a/webrtc/audio/audio_send_stream_unittest.cc | 
| +++ b/webrtc/audio/audio_send_stream_unittest.cc | 
| @@ -111,6 +111,7 @@ struct ConfigHelper { | 
| .Times(1); // Destructor resets the event log | 
| return channel_proxy_; | 
| })); | 
| + SetupMockForSetSendCodecs(); | 
| stream_config_.voe_channel_id = kChannelId; | 
| stream_config_.rtp.ssrc = kSsrc; | 
| stream_config_.rtp.nack.rtp_history_ms = 200; | 
| @@ -133,6 +134,14 @@ struct ConfigHelper { | 
| rtc::TaskQueue* worker_queue() { return &worker_queue_; } | 
| RtcEventLog* event_log() { return &event_log_; } | 
| + void SetupMockForSetSendCodecs() { | 
| + EXPECT_CALL(voice_engine_, SetVADStatus(_, _, _, _)) | 
| + .WillRepeatedly(Return(0)); | 
| + EXPECT_CALL(voice_engine_, SetFECStatus(_, _)).WillRepeatedly(Return(0)); | 
| + EXPECT_CALL(voice_engine_, SetSendCodec(_, _)).WillRepeatedly(Return(0)); | 
| + EXPECT_CALL(voice_engine_, GetSendCodec(_, _)).WillOnce(Return(-1)); | 
| 
the sun
2016/10/17 14:58:22
Doesn't this mean we'll get an error log line?
 
minyue-webrtc
2016/10/18 09:39:00
This is only for the first time when GetSendCodec
 | 
| + } | 
| + | 
| void SetupMockForSendTelephoneEvent() { | 
| EXPECT_TRUE(channel_proxy_); | 
| EXPECT_CALL(*channel_proxy_, | 
| @@ -287,5 +296,8 @@ TEST(AudioSendStreamTest, GetStatsTypingNoiseDetected) { | 
| voe_observer->CallbackOnError(-1, VE_TYPING_NOISE_OFF_WARNING); | 
| EXPECT_FALSE(send_stream.GetStats().typing_noise_detected); | 
| } | 
| + | 
| +// TODO(minyue): Add tests on logics involved in SetSendCodecs. | 
| + | 
| } // namespace test | 
| } // namespace webrtc |