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

Side by Side Diff: webrtc/audio/audio_receive_stream_unittest.cc

Issue 1442483003: Converted a bunch of error checking in Audio[Receive|Send]Stream to RTC_CHECKs instead. They should… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@wvoe_send_config
Patch Set: rebase 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 return &remote_bitrate_estimator_; 68 return &remote_bitrate_estimator_;
69 } 69 }
70 AudioReceiveStream::Config& config() { return stream_config_; } 70 AudioReceiveStream::Config& config() { return stream_config_; }
71 rtc::scoped_refptr<AudioState> audio_state() { return audio_state_; } 71 rtc::scoped_refptr<AudioState> audio_state() { return audio_state_; }
72 MockVoiceEngine& voice_engine() { return voice_engine_; } 72 MockVoiceEngine& voice_engine() { return voice_engine_; }
73 73
74 void SetupMockForGetStats() { 74 void SetupMockForGetStats() {
75 using testing::DoAll; 75 using testing::DoAll;
76 using testing::SetArgPointee; 76 using testing::SetArgPointee;
77 using testing::SetArgReferee; 77 using testing::SetArgReferee;
78 EXPECT_CALL(voice_engine_, GetRemoteSSRC(kChannelId, _))
79 .WillOnce(DoAll(SetArgReferee<1>(0), Return(0)));
80 EXPECT_CALL(voice_engine_, GetRTCPStatistics(kChannelId, _)) 78 EXPECT_CALL(voice_engine_, GetRTCPStatistics(kChannelId, _))
81 .WillOnce(DoAll(SetArgReferee<1>(kCallStats), Return(0))); 79 .WillOnce(DoAll(SetArgReferee<1>(kCallStats), Return(0)));
82 EXPECT_CALL(voice_engine_, GetRecCodec(kChannelId, _)) 80 EXPECT_CALL(voice_engine_, GetRecCodec(kChannelId, _))
83 .WillOnce(DoAll(SetArgReferee<1>(kCodecInst), Return(0))); 81 .WillOnce(DoAll(SetArgReferee<1>(kCodecInst), Return(0)));
84 EXPECT_CALL(voice_engine_, GetDelayEstimate(kChannelId, _, _)) 82 EXPECT_CALL(voice_engine_, GetDelayEstimate(kChannelId, _, _))
85 .WillOnce(DoAll(SetArgPointee<1>(kJitterBufferDelay), 83 .WillOnce(DoAll(SetArgPointee<1>(kJitterBufferDelay),
86 SetArgPointee<2>(kPlayoutBufferDelay), Return(0))); 84 SetArgPointee<2>(kPlayoutBufferDelay), Return(0)));
87 EXPECT_CALL(voice_engine_, 85 EXPECT_CALL(voice_engine_,
88 GetSpeechOutputLevelFullRange(kChannelId, _)).WillOnce( 86 GetSpeechOutputLevelFullRange(kChannelId, _)).WillOnce(
89 DoAll(SetArgReferee<1>(kSpeechOutputLevel), Return(0))); 87 DoAll(SetArgReferee<1>(kSpeechOutputLevel), Return(0)));
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 EXPECT_EQ(kAudioDecodeStats.calls_to_neteq, stats.decoding_calls_to_neteq); 213 EXPECT_EQ(kAudioDecodeStats.calls_to_neteq, stats.decoding_calls_to_neteq);
216 EXPECT_EQ(kAudioDecodeStats.decoded_normal, stats.decoding_normal); 214 EXPECT_EQ(kAudioDecodeStats.decoded_normal, stats.decoding_normal);
217 EXPECT_EQ(kAudioDecodeStats.decoded_plc, stats.decoding_plc); 215 EXPECT_EQ(kAudioDecodeStats.decoded_plc, stats.decoding_plc);
218 EXPECT_EQ(kAudioDecodeStats.decoded_cng, stats.decoding_cng); 216 EXPECT_EQ(kAudioDecodeStats.decoded_cng, stats.decoding_cng);
219 EXPECT_EQ(kAudioDecodeStats.decoded_plc_cng, stats.decoding_plc_cng); 217 EXPECT_EQ(kAudioDecodeStats.decoded_plc_cng, stats.decoding_plc_cng);
220 EXPECT_EQ(kCallStats.capture_start_ntp_time_ms_, 218 EXPECT_EQ(kCallStats.capture_start_ntp_time_ms_,
221 stats.capture_start_ntp_time_ms); 219 stats.capture_start_ntp_time_ms);
222 } 220 }
223 } // namespace test 221 } // namespace test
224 } // namespace webrtc 222 } // namespace webrtc
OLDNEW
« 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