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

Unified Diff: webrtc/audio/audio_send_stream_unittest.cc

Issue 1663413003: Clean up of CongestionController. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
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 a01ef025d3be84a85f30aa5cec0d225b7608bc89..bffbad541dfdbf14573428243a53246ea87e8ec6 100644
--- a/webrtc/audio/audio_send_stream_unittest.cc
+++ b/webrtc/audio/audio_send_stream_unittest.cc
@@ -19,6 +19,7 @@
#include "webrtc/call/congestion_controller.h"
#include "webrtc/modules/bitrate_controller/include/mock/mock_bitrate_controller.h"
#include "webrtc/modules/pacing/paced_sender.h"
+#include "webrtc/modules/remote_bitrate_estimator/include/mock/mock_remote_bitrate_estimator.h"
#include "webrtc/test/mock_voe_channel_proxy.h"
#include "webrtc/test/mock_voice_engine.h"
#include "webrtc/video/call_stats.h"
@@ -51,12 +52,15 @@ const uint32_t kTelephoneEventDuration = 6789;
struct ConfigHelper {
ConfigHelper()
- : stream_config_(nullptr),
- call_stats_(Clock::GetRealTimeClock()),
+ : simulated_clock_(123456),
+ stream_config_(nullptr),
+ call_stats_(&simulated_clock_),
process_thread_(ProcessThread::Create("AudioTestThread")),
- congestion_controller_(process_thread_.get(),
+ congestion_controller_(&simulated_clock_,
+ process_thread_.get(),
&call_stats_,
- &bitrate_observer_) {
+ &bitrate_observer_,
+ &remote_bitrate_observer_) {
using testing::Invoke;
using testing::StrEq;
@@ -153,12 +157,14 @@ struct ConfigHelper {
}
private:
+ SimulatedClock simulated_clock_;
testing::StrictMock<MockVoiceEngine> voice_engine_;
rtc::scoped_refptr<AudioState> audio_state_;
AudioSendStream::Config stream_config_;
testing::StrictMock<MockVoEChannelProxy>* channel_proxy_ = nullptr;
CallStats call_stats_;
testing::NiceMock<MockBitrateObserver> bitrate_observer_;
+ testing::NiceMock<MockRemoteBitrateObserver> remote_bitrate_observer_;
rtc::scoped_ptr<ProcessThread> process_thread_;
CongestionController congestion_controller_;
};

Powered by Google App Engine
This is Rietveld 408576698