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

Unified Diff: media/filters/audio_decoder_selector_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/base/video_decoder.h ('k') | media/filters/audio_decoder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/audio_decoder_selector_unittest.cc
diff --git a/media/filters/audio_decoder_selector_unittest.cc b/media/filters/audio_decoder_selector_unittest.cc
index 56005822b10b7d7b12a1541a35226e7c5a12eba4..2b4cce54675ca0d54662dfb969c567291be33e85 100644
--- a/media/filters/audio_decoder_selector_unittest.cc
+++ b/media/filters/audio_decoder_selector_unittest.cc
@@ -45,9 +45,6 @@ class AudioDecoderSelectorTest : public ::testing::Test {
}
~AudioDecoderSelectorTest() {
- if (selected_decoder_)
- selected_decoder_->Stop();
-
message_loop_.RunUntilIdle();
}
@@ -151,11 +148,6 @@ class AudioDecoderSelectorTest : public ::testing::Test {
DISALLOW_COPY_AND_ASSIGN(AudioDecoderSelectorTest);
};
-// Note:
-// In all the tests, Stop() is expected to be called on a decoder if a decoder:
-// - is pending initialization and DecoderSelector::Abort() is called, or
-// - has been successfully initialized.
-
// The stream is not encrypted but we have no clear decoder. No decoder can be
// selected.
TEST_F(AudioDecoderSelectorTest, ClearStream_NoDecryptor_NoClearDecoder) {
@@ -176,7 +168,6 @@ TEST_F(AudioDecoderSelectorTest, ClearStream_NoDecryptor_OneClearDecoder) {
EXPECT_CALL(*decoder_1_, Initialize(_, _, _))
.WillOnce(RunCallback<1>(PIPELINE_OK));
EXPECT_CALL(*this, OnDecoderSelected(decoder_1_, IsNull()));
- EXPECT_CALL(*decoder_1_, Stop());
SelectDecoder();
}
@@ -187,7 +178,6 @@ TEST_F(AudioDecoderSelectorTest,
InitializeDecoderSelector(kNoDecryptor, 1);
EXPECT_CALL(*decoder_1_, Initialize(_, _, _));
- EXPECT_CALL(*decoder_1_, Stop());
SelectDecoderAndAbort();
}
@@ -203,7 +193,6 @@ TEST_F(AudioDecoderSelectorTest, ClearStream_NoDecryptor_MultipleClearDecoder) {
EXPECT_CALL(*decoder_2_, Initialize(_, _, _))
.WillOnce(RunCallback<1>(PIPELINE_OK));
EXPECT_CALL(*this, OnDecoderSelected(decoder_2_, IsNull()));
- EXPECT_CALL(*decoder_2_, Stop());
SelectDecoder();
}
@@ -216,7 +205,6 @@ TEST_F(AudioDecoderSelectorTest,
EXPECT_CALL(*decoder_1_, Initialize(_, _, _))
.WillOnce(RunCallback<1>(DECODER_ERROR_NOT_SUPPORTED));
EXPECT_CALL(*decoder_2_, Initialize(_, _, _));
- EXPECT_CALL(*decoder_2_, Stop());
SelectDecoderAndAbort();
}
@@ -230,7 +218,6 @@ TEST_F(AudioDecoderSelectorTest, ClearStream_HasDecryptor) {
EXPECT_CALL(*decoder_1_, Initialize(_, _, _))
.WillOnce(RunCallback<1>(PIPELINE_OK));
EXPECT_CALL(*this, OnDecoderSelected(decoder_1_, IsNull()));
- EXPECT_CALL(*decoder_1_, Stop());
SelectDecoder();
}
@@ -240,7 +227,6 @@ TEST_F(AudioDecoderSelectorTest, Abort_ClearStream_HasDecryptor) {
InitializeDecoderSelector(kDecryptOnly, 1);
EXPECT_CALL(*decoder_1_, Initialize(_, _, _));
- EXPECT_CALL(*decoder_1_, Stop());
SelectDecoderAndAbort();
}
@@ -283,7 +269,6 @@ TEST_F(AudioDecoderSelectorTest, EncryptedStream_DecryptOnly_OneClearDecoder) {
EXPECT_CALL(*decoder_1_, Initialize(_, _, _))
.WillOnce(RunCallback<1>(PIPELINE_OK));
EXPECT_CALL(*this, OnDecoderSelected(decoder_1_, NotNull()));
- EXPECT_CALL(*decoder_1_, Stop());
SelectDecoder();
}
@@ -294,7 +279,6 @@ TEST_F(AudioDecoderSelectorTest,
InitializeDecoderSelector(kDecryptOnly, 1);
EXPECT_CALL(*decoder_1_, Initialize(_, _, _));
- EXPECT_CALL(*decoder_1_, Stop());
SelectDecoderAndAbort();
}
@@ -312,7 +296,6 @@ TEST_F(AudioDecoderSelectorTest,
EXPECT_CALL(*decoder_2_, Initialize(_, _, _))
.WillOnce(RunCallback<1>(PIPELINE_OK));
EXPECT_CALL(*this, OnDecoderSelected(decoder_2_, NotNull()));
- EXPECT_CALL(*decoder_2_, Stop());
SelectDecoder();
}
@@ -325,7 +308,6 @@ TEST_F(AudioDecoderSelectorTest,
EXPECT_CALL(*decoder_1_, Initialize(_, _, _))
.WillOnce(RunCallback<1>(DECODER_ERROR_NOT_SUPPORTED));
EXPECT_CALL(*decoder_2_, Initialize(_, _, _));
- EXPECT_CALL(*decoder_2_, Stop());
SelectDecoderAndAbort();
}
« no previous file with comments | « media/base/video_decoder.h ('k') | media/filters/audio_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698