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

Side by Side Diff: webrtc/call/bitrate_estimator_tests.cc

Issue 2377023002: Now pass ADM as a constructor argument to audio_state. (Closed)
Patch Set: Removed audio_transport() mock calls in tests. 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 #include <functional> 10 #include <functional>
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 public: 104 public:
105 BitrateEstimatorTest() : mock_voice_engine_(decoder_factory_), 105 BitrateEstimatorTest() : mock_voice_engine_(decoder_factory_),
106 receive_config_(nullptr) {} 106 receive_config_(nullptr) {}
107 107
108 virtual ~BitrateEstimatorTest() { EXPECT_TRUE(streams_.empty()); } 108 virtual ~BitrateEstimatorTest() { EXPECT_TRUE(streams_.empty()); }
109 109
110 virtual void SetUp() { 110 virtual void SetUp() {
111 AudioState::Config audio_state_config; 111 AudioState::Config audio_state_config;
112 audio_state_config.voice_engine = &mock_voice_engine_; 112 audio_state_config.voice_engine = &mock_voice_engine_;
113 Call::Config config; 113 Call::Config config;
114 config.audio_state = AudioState::Create(audio_state_config); 114 config.audio_state = AudioState::Create(audio_state_config, nullptr);
115 receiver_call_.reset(Call::Create(config)); 115 receiver_call_.reset(Call::Create(config));
116 sender_call_.reset(Call::Create(config)); 116 sender_call_.reset(Call::Create(config));
117 117
118 send_transport_.reset(new test::DirectTransport(sender_call_.get())); 118 send_transport_.reset(new test::DirectTransport(sender_call_.get()));
119 send_transport_->SetReceiver(receiver_call_->Receiver()); 119 send_transport_->SetReceiver(receiver_call_->Receiver());
120 receive_transport_.reset(new test::DirectTransport(receiver_call_.get())); 120 receive_transport_.reset(new test::DirectTransport(receiver_call_.get()));
121 receive_transport_->SetReceiver(sender_call_->Receiver()); 121 receive_transport_->SetReceiver(sender_call_->Receiver());
122 122
123 video_send_config_ = VideoSendStream::Config(send_transport_.get()); 123 video_send_config_ = VideoSendStream::Config(send_transport_.get());
124 video_send_config_.rtp.ssrcs.push_back(kVideoSendSsrcs[0]); 124 video_send_config_.rtp.ssrcs.push_back(kVideoSendSsrcs[0]);
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 RtpExtension(RtpExtension::kTimestampOffsetUri, kTOFExtensionId); 324 RtpExtension(RtpExtension::kTimestampOffsetUri, kTOFExtensionId);
325 receiver_log_.PushExpectedLogLine(kAbsSendTimeLog); 325 receiver_log_.PushExpectedLogLine(kAbsSendTimeLog);
326 receiver_log_.PushExpectedLogLine( 326 receiver_log_.PushExpectedLogLine(
327 "WrappingBitrateEstimator: Switching to transmission time offset RBE."); 327 "WrappingBitrateEstimator: Switching to transmission time offset RBE.");
328 streams_.push_back(new Stream(this, false)); 328 streams_.push_back(new Stream(this, false));
329 streams_[0]->StopSending(); 329 streams_[0]->StopSending();
330 streams_[1]->StopSending(); 330 streams_[1]->StopSending();
331 EXPECT_TRUE(receiver_log_.Wait()); 331 EXPECT_TRUE(receiver_log_.Wait());
332 } 332 }
333 } // namespace webrtc 333 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698