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

Unified Diff: media/filters/audio_timestamp_validator_unittest.cc

Issue 2815303006: Convert MediaLog from being ref counted to owned by WebMediaPlayer. (Closed)
Patch Set: Rebase. Created 3 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
« no previous file with comments | « media/filters/audio_timestamp_validator.cc ('k') | media/filters/chunk_demuxer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/audio_timestamp_validator_unittest.cc
diff --git a/media/filters/audio_timestamp_validator_unittest.cc b/media/filters/audio_timestamp_validator_unittest.cc
index de2f47449f88e64900b4f6fc3062afb88e97139a..7724b04b285057c9ca694c8d62c655ee325f9a81 100644
--- a/media/filters/audio_timestamp_validator_unittest.cc
+++ b/media/filters/audio_timestamp_validator_unittest.cc
@@ -41,8 +41,7 @@ class AudioTimestampValidatorTest
: public testing::Test,
public ::testing::WithParamInterface<ValidatorTestParams> {
public:
- AudioTimestampValidatorTest()
- : media_log_(new testing::StrictMock<MockMediaLog>()) {}
+ AudioTimestampValidatorTest() {}
protected:
void SetUp() override {
@@ -57,7 +56,7 @@ class AudioTimestampValidatorTest
base::TimeDelta front_discard_;
- scoped_refptr<testing::StrictMock<MockMediaLog>> media_log_;
+ testing::StrictMock<MockMediaLog> media_log_;
};
TEST_P(AudioTimestampValidatorTest, WarnForEraticTimes) {
@@ -75,7 +74,7 @@ TEST_P(AudioTimestampValidatorTest, WarnForEraticTimes) {
// stabilized.
EXPECT_MEDIA_LOG(HasSubstr("timestamp gap detected")).Times(0);
- AudioTimestampValidator validator(decoder_config, media_log_);
+ AudioTimestampValidator validator(decoder_config, &media_log_);
const base::TimeDelta kRandomOffsets[] = {
base::TimeDelta::FromMilliseconds(100),
@@ -123,7 +122,7 @@ TEST_P(AudioTimestampValidatorTest, NoWarningForValidTimes) {
// Expect no gap warnings for series of buffers with valid timestamps.
EXPECT_MEDIA_LOG(HasSubstr("timestamp gap detected")).Times(0);
- AudioTimestampValidator validator(decoder_config, media_log_);
+ AudioTimestampValidator validator(decoder_config, &media_log_);
for (int i = 0; i < 100; ++i) {
// Each buffer's timestamp is kBufferDuration from the previous buffer.
@@ -154,7 +153,7 @@ TEST_P(AudioTimestampValidatorTest, SingleWarnForSingleLargeGap) {
kSamplesPerSecond, EmptyExtraData(), Unencrypted(),
kSeekPreroll, codec_delay_);
- AudioTimestampValidator validator(decoder_config, media_log_);
+ AudioTimestampValidator validator(decoder_config, &media_log_);
// Validator should quickly stabilize pattern for timestamp expectations.
EXPECT_MEDIA_LOG(HasSubstr("Failed to reconcile encoded audio times "
@@ -199,7 +198,7 @@ TEST_P(AudioTimestampValidatorTest, RepeatedWarnForSlowAccumulatingDrift) {
kSamplesPerSecond, EmptyExtraData(), Unencrypted(),
kSeekPreroll, codec_delay_);
- AudioTimestampValidator validator(decoder_config, media_log_);
+ AudioTimestampValidator validator(decoder_config, &media_log_);
EXPECT_MEDIA_LOG(HasSubstr("Failed to reconcile encoded audio times "
"with decoded output."))
« no previous file with comments | « media/filters/audio_timestamp_validator.cc ('k') | media/filters/chunk_demuxer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698