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

Unified Diff: media/filters/audio_decoder_unittest.cc

Issue 395703002: Fold {Audio|Video}Decoder::Stop() into the dtor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase only Created 6 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_decoder_selector_unittest.cc ('k') | media/filters/audio_renderer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/audio_decoder_unittest.cc
diff --git a/media/filters/audio_decoder_unittest.cc b/media/filters/audio_decoder_unittest.cc
index a3aeb2565adc457d0ddde614b312c938fccb1802..23e21ef7d896e9b8bf19d788170ff69e7857d840 100644
--- a/media/filters/audio_decoder_unittest.cc
+++ b/media/filters/audio_decoder_unittest.cc
@@ -110,9 +110,6 @@ class AudioDecoderTest : public testing::TestWithParam<DecoderTestData> {
}
virtual ~AudioDecoderTest() {
- // Always issue a Stop() even if it's already been sent to avoid assertion
- // failures causing crashes.
- Stop();
EXPECT_FALSE(pending_decode_);
EXPECT_FALSE(pending_reset_);
}
@@ -209,10 +206,6 @@ class AudioDecoderTest : public testing::TestWithParam<DecoderTestData> {
ASSERT_FALSE(pending_reset_);
}
- void Stop() {
- decoder_->Stop();
- }
-
void Seek(base::TimeDelta seek_time) {
Reset();
decoded_audio_.clear();
@@ -319,10 +312,9 @@ class FFmpegAudioDecoderBehavioralTest : public AudioDecoderTest {};
TEST_P(AudioDecoderTest, Initialize) {
ASSERT_NO_FATAL_FAILURE(Initialize());
- Stop();
}
-// Verifies decode audio as well as the Decode() -> Reset() -> Stop() sequence.
+// Verifies decode audio as well as the Decode() -> Reset() sequence.
TEST_P(AudioDecoderTest, ProduceAudioSamples) {
ASSERT_NO_FATAL_FAILURE(Initialize());
@@ -357,21 +349,17 @@ TEST_P(AudioDecoderTest, ProduceAudioSamples) {
// Seek back to the beginning. Calls Reset() on the decoder.
Seek(start_timestamp());
}
-
- Stop();
}
-TEST_P(AudioDecoderTest, DecodeStop) {
+TEST_P(AudioDecoderTest, Decode) {
ASSERT_NO_FATAL_FAILURE(Initialize());
Decode();
EXPECT_EQ(AudioDecoder::kOk, last_decode_status());
- Stop();
}
-TEST_P(AudioDecoderTest, ResetStop) {
+TEST_P(AudioDecoderTest, Reset) {
ASSERT_NO_FATAL_FAILURE(Initialize());
Reset();
- Stop();
}
TEST_P(AudioDecoderTest, NoTimestamp) {
@@ -380,7 +368,6 @@ TEST_P(AudioDecoderTest, NoTimestamp) {
buffer->set_timestamp(kNoTimestamp());
DecodeBuffer(buffer);
EXPECT_EQ(AudioDecoder::kDecodeError, last_decode_status());
- Stop();
}
TEST_P(OpusAudioDecoderBehavioralTest, InitializeWithNoCodecDelay) {
@@ -397,7 +384,6 @@ TEST_P(OpusAudioDecoderBehavioralTest, InitializeWithNoCodecDelay) {
base::TimeDelta::FromMilliseconds(80),
0);
InitializeDecoder(decoder_config);
- Stop();
}
TEST_P(OpusAudioDecoderBehavioralTest, InitializeWithBadCodecDelay) {
@@ -416,7 +402,6 @@ TEST_P(OpusAudioDecoderBehavioralTest, InitializeWithBadCodecDelay) {
// Use a different codec delay than in the extradata.
100);
InitializeDecoderWithStatus(decoder_config, DECODER_ERROR_NOT_SUPPORTED);
- Stop();
}
TEST_P(FFmpegAudioDecoderBehavioralTest, InitializeWithBadConfig) {
@@ -429,7 +414,6 @@ TEST_P(FFmpegAudioDecoderBehavioralTest, InitializeWithBadConfig) {
0,
false);
InitializeDecoderWithStatus(decoder_config, DECODER_ERROR_NOT_SUPPORTED);
- Stop();
}
const DecodedBufferExpectations kSfxOpusExpectations[] = {
« no previous file with comments | « media/filters/audio_decoder_selector_unittest.cc ('k') | media/filters/audio_renderer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698