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

Unified Diff: webrtc/modules/audio_coding/neteq/delay_manager_unittest.cc

Issue 1903043003: WIP: Adding a centralized NetEq Clock (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@neteq-remove-type-param
Patch Set: Created 4 years, 8 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/modules/audio_coding/neteq/delay_manager_unittest.cc
diff --git a/webrtc/modules/audio_coding/neteq/delay_manager_unittest.cc b/webrtc/modules/audio_coding/neteq/delay_manager_unittest.cc
index f231c3da30145e8023431a889e7e6b0ab1c2d1ab..80f5052a49e328b18510623c15978c2eacc992dc 100644
--- a/webrtc/modules/audio_coding/neteq/delay_manager_unittest.cc
+++ b/webrtc/modules/audio_coding/neteq/delay_manager_unittest.cc
@@ -39,21 +39,19 @@ class DelayManagerTest : public ::testing::Test {
void IncreaseTime(int inc_ms);
DelayManager* dm_;
+ TickTimer tick_timer_;
MockDelayPeakDetector detector_;
uint16_t seq_no_;
uint32_t ts_;
};
DelayManagerTest::DelayManagerTest()
- : dm_(NULL),
- seq_no_(0x1234),
- ts_(0x12345678) {
-}
+ : dm_(NULL), detector_(tick_timer_), seq_no_(0x1234), ts_(0x12345678) {}
void DelayManagerTest::SetUp() {
EXPECT_CALL(detector_, Reset())
.Times(1);
- dm_ = new DelayManager(kMaxNumberOfPackets, &detector_);
+ dm_ = new DelayManager(kMaxNumberOfPackets, &detector_, tick_timer_);
}
void DelayManagerTest::SetPacketAudioLength(int lengt_ms) {
@@ -69,9 +67,7 @@ void DelayManagerTest::InsertNextPacket() {
void DelayManagerTest::IncreaseTime(int inc_ms) {
for (int t = 0; t < inc_ms; t += kTimeStepMs) {
- EXPECT_CALL(detector_, IncrementCounter(kTimeStepMs))
- .Times(1);
- dm_->UpdateCounters(kTimeStepMs);
+ tick_timer_.Increment();
}
}
void DelayManagerTest::TearDown() {
@@ -115,13 +111,6 @@ TEST_F(DelayManagerTest, PeakFound) {
EXPECT_FALSE(dm_->PeakFound());
}
-TEST_F(DelayManagerTest, UpdateCounters) {
- // Expect DelayManager to pass on the counter update to the detector.
- EXPECT_CALL(detector_, IncrementCounter(kTimeStepMs))
- .Times(1);
- dm_->UpdateCounters(kTimeStepMs);
-}
-
TEST_F(DelayManagerTest, UpdateNormal) {
SetPacketAudioLength(kFrameSizeMs);
// First packet arrival.
« no previous file with comments | « webrtc/modules/audio_coding/neteq/delay_manager.cc ('k') | webrtc/modules/audio_coding/neteq/delay_peak_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698