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

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

Issue 2383023003: Test upload to see if the ADM is passed correctly to audio_state. (Closed)
Patch Set: forgot send-stream config Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « webrtc/audio/audio_receive_stream_unittest.cc ('k') | webrtc/audio/audio_state.h » ('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 &event_log_), 68 &event_log_),
69 bitrate_allocator_(&limit_observer_), 69 bitrate_allocator_(&limit_observer_),
70 worker_queue_("ConfigHelper_worker_queue") { 70 worker_queue_("ConfigHelper_worker_queue") {
71 using testing::Invoke; 71 using testing::Invoke;
72 using testing::StrEq; 72 using testing::StrEq;
73 73
74 EXPECT_CALL(voice_engine_, 74 EXPECT_CALL(voice_engine_,
75 RegisterVoiceEngineObserver(_)).WillOnce(Return(0)); 75 RegisterVoiceEngineObserver(_)).WillOnce(Return(0));
76 EXPECT_CALL(voice_engine_, 76 EXPECT_CALL(voice_engine_,
77 DeRegisterVoiceEngineObserver()).WillOnce(Return(0)); 77 DeRegisterVoiceEngineObserver()).WillOnce(Return(0));
78 EXPECT_CALL(voice_engine_, audio_transport()).WillOnce(Return(nullptr));
78 AudioState::Config config; 79 AudioState::Config config;
79 config.voice_engine = &voice_engine_; 80 config.voice_engine = &voice_engine_;
80 audio_state_ = AudioState::Create(config); 81 audio_state_ = AudioState::Create(config);
81 82
82 EXPECT_CALL(voice_engine_, ChannelProxyFactory(kChannelId)) 83 EXPECT_CALL(voice_engine_, ChannelProxyFactory(kChannelId))
83 .WillOnce(Invoke([this](int channel_id) { 84 .WillOnce(Invoke([this](int channel_id) {
84 EXPECT_FALSE(channel_proxy_); 85 EXPECT_FALSE(channel_proxy_);
85 channel_proxy_ = new testing::StrictMock<MockVoEChannelProxy>(); 86 channel_proxy_ = new testing::StrictMock<MockVoEChannelProxy>();
86 EXPECT_CALL(*channel_proxy_, SetRTCPStatus(true)).Times(1); 87 EXPECT_CALL(*channel_proxy_, SetRTCPStatus(true)).Times(1);
87 EXPECT_CALL(*channel_proxy_, SetLocalSSRC(kSsrc)).Times(1); 88 EXPECT_CALL(*channel_proxy_, SetLocalSSRC(kSsrc)).Times(1);
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 static_cast<internal::AudioState*>(helper.audio_state().get()); 284 static_cast<internal::AudioState*>(helper.audio_state().get());
284 VoiceEngineObserver* voe_observer = 285 VoiceEngineObserver* voe_observer =
285 static_cast<VoiceEngineObserver*>(internal_audio_state); 286 static_cast<VoiceEngineObserver*>(internal_audio_state);
286 voe_observer->CallbackOnError(-1, VE_TYPING_NOISE_WARNING); 287 voe_observer->CallbackOnError(-1, VE_TYPING_NOISE_WARNING);
287 EXPECT_TRUE(send_stream.GetStats().typing_noise_detected); 288 EXPECT_TRUE(send_stream.GetStats().typing_noise_detected);
288 voe_observer->CallbackOnError(-1, VE_TYPING_NOISE_OFF_WARNING); 289 voe_observer->CallbackOnError(-1, VE_TYPING_NOISE_OFF_WARNING);
289 EXPECT_FALSE(send_stream.GetStats().typing_noise_detected); 290 EXPECT_FALSE(send_stream.GetStats().typing_noise_detected);
290 } 291 }
291 } // namespace test 292 } // namespace test
292 } // namespace webrtc 293 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/audio/audio_receive_stream_unittest.cc ('k') | webrtc/audio/audio_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698