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

Side by Side Diff: webrtc/audio/audio_send_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_send_stream.cc ('k') | no next file » | 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 using testing::SetArgReferee; 79 using testing::SetArgReferee;
80 80
81 std::vector<ReportBlock> report_blocks; 81 std::vector<ReportBlock> report_blocks;
82 webrtc::ReportBlock block = kReportBlock; 82 webrtc::ReportBlock block = kReportBlock;
83 report_blocks.push_back(block); // Has wrong SSRC. 83 report_blocks.push_back(block); // Has wrong SSRC.
84 block.source_SSRC = kSsrc; 84 block.source_SSRC = kSsrc;
85 report_blocks.push_back(block); // Correct block. 85 report_blocks.push_back(block); // Correct block.
86 block.fraction_lost = 0; 86 block.fraction_lost = 0;
87 report_blocks.push_back(block); // Duplicate SSRC, bad fraction_lost. 87 report_blocks.push_back(block); // Duplicate SSRC, bad fraction_lost.
88 88
89 EXPECT_CALL(voice_engine_, GetLocalSSRC(kChannelId, _))
90 .WillRepeatedly(DoAll(SetArgReferee<1>(0), Return(0)));
91 EXPECT_CALL(voice_engine_, GetRTCPStatistics(kChannelId, _)) 89 EXPECT_CALL(voice_engine_, GetRTCPStatistics(kChannelId, _))
92 .WillRepeatedly(DoAll(SetArgReferee<1>(kCallStats), Return(0))); 90 .WillRepeatedly(DoAll(SetArgReferee<1>(kCallStats), Return(0)));
93 EXPECT_CALL(voice_engine_, GetSendCodec(kChannelId, _)) 91 EXPECT_CALL(voice_engine_, GetSendCodec(kChannelId, _))
94 .WillRepeatedly(DoAll(SetArgReferee<1>(kCodecInst), Return(0))); 92 .WillRepeatedly(DoAll(SetArgReferee<1>(kCodecInst), Return(0)));
95 EXPECT_CALL(voice_engine_, GetRemoteRTCPReportBlocks(kChannelId, _)) 93 EXPECT_CALL(voice_engine_, GetRemoteRTCPReportBlocks(kChannelId, _))
96 .WillRepeatedly(DoAll(SetArgPointee<1>(report_blocks), Return(0))); 94 .WillRepeatedly(DoAll(SetArgPointee<1>(report_blocks), Return(0)));
97 EXPECT_CALL(voice_engine_, GetSpeechInputLevelFullRange(_)) 95 EXPECT_CALL(voice_engine_, GetSpeechInputLevelFullRange(_))
98 .WillRepeatedly(DoAll(SetArgReferee<0>(kSpeechInputLevel), Return(0))); 96 .WillRepeatedly(DoAll(SetArgReferee<0>(kSpeechInputLevel), Return(0)));
99 EXPECT_CALL(voice_engine_, GetEcMetricsStatus(_)) 97 EXPECT_CALL(voice_engine_, GetEcMetricsStatus(_))
100 .WillRepeatedly(DoAll(SetArgReferee<0>(true), Return(0))); 98 .WillRepeatedly(DoAll(SetArgReferee<0>(true), Return(0)));
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 static_cast<internal::AudioState*>(helper.audio_state().get()); 171 static_cast<internal::AudioState*>(helper.audio_state().get());
174 VoiceEngineObserver* voe_observer = 172 VoiceEngineObserver* voe_observer =
175 static_cast<VoiceEngineObserver*>(internal_audio_state); 173 static_cast<VoiceEngineObserver*>(internal_audio_state);
176 voe_observer->CallbackOnError(-1, VE_TYPING_NOISE_WARNING); 174 voe_observer->CallbackOnError(-1, VE_TYPING_NOISE_WARNING);
177 EXPECT_TRUE(send_stream.GetStats().typing_noise_detected); 175 EXPECT_TRUE(send_stream.GetStats().typing_noise_detected);
178 voe_observer->CallbackOnError(-1, VE_TYPING_NOISE_OFF_WARNING); 176 voe_observer->CallbackOnError(-1, VE_TYPING_NOISE_OFF_WARNING);
179 EXPECT_FALSE(send_stream.GetStats().typing_noise_detected); 177 EXPECT_FALSE(send_stream.GetStats().typing_noise_detected);
180 } 178 }
181 } // namespace test 179 } // namespace test
182 } // namespace webrtc 180 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/audio/audio_send_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698