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

Unified Diff: media/filters/audio_clock_unittest.cc

Issue 1233963002: Fix accumulation error with front_timestamp, move test only code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused vars. Created 5 years, 5 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
« no previous file with comments | « media/filters/audio_clock.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/audio_clock_unittest.cc
diff --git a/media/filters/audio_clock_unittest.cc b/media/filters/audio_clock_unittest.cc
index 2144bb0d67037504d93ee59d04a0b85bcd936b55..0e60abd379c68c3b4a309dd40944141cbc252525 100644
--- a/media/filters/audio_clock_unittest.cc
+++ b/media/filters/audio_clock_unittest.cc
@@ -40,16 +40,21 @@ class AudioClockTest : public testing::Test {
}
int ContiguousAudioDataBufferedInDays() {
- return clock_.contiguous_audio_data_buffered().InDays();
+ base::TimeDelta total, same_rate_total;
+ clock_.ContiguousAudioDataBufferedForTesting(&total, &same_rate_total);
+ return total.InDays();
}
int ContiguousAudioDataBufferedInMilliseconds() {
- return clock_.contiguous_audio_data_buffered().InMilliseconds();
+ base::TimeDelta total, same_rate_total;
+ clock_.ContiguousAudioDataBufferedForTesting(&total, &same_rate_total);
+ return total.InMilliseconds();
}
int ContiguousAudioDataBufferedAtSameRateInMilliseconds() {
- return clock_.contiguous_audio_data_buffered_at_same_rate()
- .InMilliseconds();
+ base::TimeDelta total, same_rate_total;
+ clock_.ContiguousAudioDataBufferedForTesting(&total, &same_rate_total);
+ return same_rate_total.InMilliseconds();
}
const int sample_rate_;
@@ -73,15 +78,6 @@ TEST_F(AudioClockTest, BackTimestampStartsAtStartTimestamp) {
EXPECT_EQ(expected, clock.back_timestamp());
}
-TEST_F(AudioClockTest, ContiguousAudioDataBufferedStartsAtZero) {
- EXPECT_EQ(base::TimeDelta(), clock_.contiguous_audio_data_buffered());
-}
-
-TEST_F(AudioClockTest, ContiguousAudioDataBufferedAtSameRateStartsAtZero) {
- EXPECT_EQ(base::TimeDelta(),
- clock_.contiguous_audio_data_buffered_at_same_rate());
-}
-
TEST_F(AudioClockTest, Playback) {
// The first time we write data we should still expect our start timestamp
// due to delay.
« no previous file with comments | « media/filters/audio_clock.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698