diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-03-08 10:28:10 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-03-20 13:40:30 +0000 |
commit | e733310db58160074f574c429d48f8308c0afe17 (patch) | |
tree | f8aef4b7e62a69928dbcf880620eece20f98c6df /chromium/media/base/audio_discard_helper_unittest.cc | |
parent | 2f583e4aec1ae3a86fa047829c96b310dc12ecdf (diff) | |
download | qtwebengine-chromium-e733310db58160074f574c429d48f8308c0afe17.tar.gz |
BASELINE: Update Chromium to 56.0.2924.122
Change-Id: I4e04de8f47e47e501c46ed934c76a431c6337ced
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/media/base/audio_discard_helper_unittest.cc')
-rw-r--r-- | chromium/media/base/audio_discard_helper_unittest.cc | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/chromium/media/base/audio_discard_helper_unittest.cc b/chromium/media/base/audio_discard_helper_unittest.cc index f836fa965bd..e5855316f5e 100644 --- a/chromium/media/base/audio_discard_helper_unittest.cc +++ b/chromium/media/base/audio_discard_helper_unittest.cc @@ -45,7 +45,7 @@ static float ExtractDecodedData(const scoped_refptr<AudioBuffer>& buffer, } TEST(AudioDiscardHelperTest, TimeDeltaToFrames) { - AudioDiscardHelper discard_helper(kSampleRate, 0); + AudioDiscardHelper discard_helper(kSampleRate, 0, false); EXPECT_EQ(0u, discard_helper.TimeDeltaToFrames(base::TimeDelta())); EXPECT_EQ( @@ -69,7 +69,7 @@ TEST(AudioDiscardHelperTest, TimeDeltaToFrames) { } TEST(AudioDiscardHelperTest, BasicProcessBuffers) { - AudioDiscardHelper discard_helper(kSampleRate, 0); + AudioDiscardHelper discard_helper(kSampleRate, 0, false); ASSERT_FALSE(discard_helper.initialized()); const base::TimeDelta kTimestamp = base::TimeDelta(); @@ -101,7 +101,7 @@ TEST(AudioDiscardHelperTest, BasicProcessBuffers) { } TEST(AudioDiscardHelperTest, NegativeTimestampClampsToZero) { - AudioDiscardHelper discard_helper(kSampleRate, 0); + AudioDiscardHelper discard_helper(kSampleRate, 0, false); ASSERT_FALSE(discard_helper.initialized()); const base::TimeDelta kTimestamp = -base::TimeDelta::FromSeconds(1); @@ -121,7 +121,7 @@ TEST(AudioDiscardHelperTest, NegativeTimestampClampsToZero) { } TEST(AudioDiscardHelperTest, ProcessBuffersWithInitialDiscard) { - AudioDiscardHelper discard_helper(kSampleRate, 0); + AudioDiscardHelper discard_helper(kSampleRate, 0, false); ASSERT_FALSE(discard_helper.initialized()); const base::TimeDelta kTimestamp = base::TimeDelta(); @@ -147,7 +147,7 @@ TEST(AudioDiscardHelperTest, ProcessBuffersWithInitialDiscard) { } TEST(AudioDiscardHelperTest, ProcessBuffersWithLargeInitialDiscard) { - AudioDiscardHelper discard_helper(kSampleRate, 0); + AudioDiscardHelper discard_helper(kSampleRate, 0, false); ASSERT_FALSE(discard_helper.initialized()); const base::TimeDelta kTimestamp = base::TimeDelta(); @@ -180,7 +180,7 @@ TEST(AudioDiscardHelperTest, ProcessBuffersWithLargeInitialDiscard) { } TEST(AudioDiscardHelperTest, AllowNonMonotonicTimestamps) { - AudioDiscardHelper discard_helper(kSampleRate, 0); + AudioDiscardHelper discard_helper(kSampleRate, 0, false); ASSERT_FALSE(discard_helper.initialized()); const base::TimeDelta kTimestamp = base::TimeDelta(); @@ -206,7 +206,7 @@ TEST(AudioDiscardHelperTest, AllowNonMonotonicTimestamps) { } TEST(AudioDiscardHelperTest, DiscardEndPadding) { - AudioDiscardHelper discard_helper(kSampleRate, 0); + AudioDiscardHelper discard_helper(kSampleRate, 0, false); ASSERT_FALSE(discard_helper.initialized()); const base::TimeDelta kTimestamp = base::TimeDelta(); @@ -229,7 +229,7 @@ TEST(AudioDiscardHelperTest, DiscardEndPadding) { } TEST(AudioDiscardHelperTest, BadDiscardEndPadding) { - AudioDiscardHelper discard_helper(kSampleRate, 0); + AudioDiscardHelper discard_helper(kSampleRate, 0, false); ASSERT_FALSE(discard_helper.initialized()); const base::TimeDelta kTimestamp = base::TimeDelta(); @@ -250,7 +250,7 @@ TEST(AudioDiscardHelperTest, BadDiscardEndPadding) { } TEST(AudioDiscardHelperTest, InitialDiscardAndDiscardEndPadding) { - AudioDiscardHelper discard_helper(kSampleRate, 0); + AudioDiscardHelper discard_helper(kSampleRate, 0, false); ASSERT_FALSE(discard_helper.initialized()); const base::TimeDelta kTimestamp = base::TimeDelta(); @@ -279,7 +279,7 @@ TEST(AudioDiscardHelperTest, InitialDiscardAndDiscardEndPadding) { } TEST(AudioDiscardHelperTest, InitialDiscardAndDiscardPadding) { - AudioDiscardHelper discard_helper(kSampleRate, 0); + AudioDiscardHelper discard_helper(kSampleRate, 0, false); ASSERT_FALSE(discard_helper.initialized()); const base::TimeDelta kTimestamp = base::TimeDelta(); @@ -308,7 +308,7 @@ TEST(AudioDiscardHelperTest, InitialDiscardAndDiscardPadding) { TEST(AudioDiscardHelperTest, InitialDiscardAndDiscardPaddingAndDecoderDelay) { // Use a decoder delay of 5ms. const int kDecoderDelay = kSampleRate / 100 / 2; - AudioDiscardHelper discard_helper(kSampleRate, kDecoderDelay); + AudioDiscardHelper discard_helper(kSampleRate, kDecoderDelay, false); ASSERT_FALSE(discard_helper.initialized()); discard_helper.Reset(kDecoderDelay); @@ -416,7 +416,7 @@ TEST(AudioDiscardHelperTest, InitialDiscardAndDiscardPaddingAndDecoderDelay) { } TEST(AudioDiscardHelperTest, DelayedDiscardInitialDiscardAndDiscardPadding) { - AudioDiscardHelper discard_helper(kSampleRate, 0); + AudioDiscardHelper discard_helper(kSampleRate, 0, true); ASSERT_FALSE(discard_helper.initialized()); const base::TimeDelta kTimestamp = base::TimeDelta(); @@ -451,7 +451,7 @@ TEST(AudioDiscardHelperTest, DelayedDiscardInitialDiscardAndDiscardPadding) { } TEST(AudioDiscardHelperTest, CompleteDiscard) { - AudioDiscardHelper discard_helper(kSampleRate, 0); + AudioDiscardHelper discard_helper(kSampleRate, 0, false); ASSERT_FALSE(discard_helper.initialized()); const base::TimeDelta kTimestamp = base::TimeDelta(); @@ -481,7 +481,7 @@ TEST(AudioDiscardHelperTest, CompleteDiscard) { } TEST(AudioDiscardHelperTest, CompleteDiscardWithDelayedDiscard) { - AudioDiscardHelper discard_helper(kSampleRate, 0); + AudioDiscardHelper discard_helper(kSampleRate, 0, true); ASSERT_FALSE(discard_helper.initialized()); const base::TimeDelta kTimestamp = base::TimeDelta(); @@ -517,7 +517,7 @@ TEST(AudioDiscardHelperTest, CompleteDiscardWithDelayedDiscard) { TEST(AudioDiscardHelperTest, CompleteDiscardWithInitialDiscardDecoderDelay) { // Use a decoder delay of 5ms. const int kDecoderDelay = kSampleRate / 100 / 2; - AudioDiscardHelper discard_helper(kSampleRate, kDecoderDelay); + AudioDiscardHelper discard_helper(kSampleRate, kDecoderDelay, false); ASSERT_FALSE(discard_helper.initialized()); discard_helper.Reset(kDecoderDelay); |