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

Unified Diff: media/filters/video_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/filters/opus_audio_decoder.cc ('k') | media/filters/video_renderer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/video_decoder_selector_unittest.cc
diff --git a/media/filters/video_decoder_selector_unittest.cc b/media/filters/video_decoder_selector_unittest.cc
index 62b1a421456bf22997c7f70158ea90020a52091c..7a9580e6f0c395a30c29e7dfcc24aa4719deebe8 100644
--- a/media/filters/video_decoder_selector_unittest.cc
+++ b/media/filters/video_decoder_selector_unittest.cc
@@ -45,9 +45,6 @@ class VideoDecoderSelectorTest : public ::testing::Test {
}
~VideoDecoderSelectorTest() {
- if (selected_decoder_)
- selected_decoder_->Stop();
-
message_loop_.RunUntilIdle();
}
@@ -149,11 +146,6 @@ class VideoDecoderSelectorTest : public ::testing::Test {
DISALLOW_COPY_AND_ASSIGN(VideoDecoderSelectorTest);
};
-// 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(VideoDecoderSelectorTest, ClearStream_NoDecryptor_NoClearDecoder) {
@@ -174,7 +166,6 @@ TEST_F(VideoDecoderSelectorTest, ClearStream_NoDecryptor_OneClearDecoder) {
EXPECT_CALL(*decoder_1_, Initialize(_, _, _, _))
.WillOnce(RunCallback<2>(PIPELINE_OK));
EXPECT_CALL(*this, OnDecoderSelected(decoder_1_, IsNull()));
- EXPECT_CALL(*decoder_1_, Stop());
SelectDecoder();
}
@@ -185,7 +176,6 @@ TEST_F(VideoDecoderSelectorTest,
InitializeDecoderSelector(kNoDecryptor, 1);
EXPECT_CALL(*decoder_1_, Initialize(_, _, _, _));
- EXPECT_CALL(*decoder_1_, Stop());
SelectDecoderAndAbort();
}
@@ -201,7 +191,6 @@ TEST_F(VideoDecoderSelectorTest, ClearStream_NoDecryptor_MultipleClearDecoder) {
EXPECT_CALL(*decoder_2_, Initialize(_, _, _, _))
.WillOnce(RunCallback<2>(PIPELINE_OK));
EXPECT_CALL(*this, OnDecoderSelected(decoder_2_, IsNull()));
- EXPECT_CALL(*decoder_2_, Stop());
SelectDecoder();
}
@@ -214,7 +203,6 @@ TEST_F(VideoDecoderSelectorTest,
EXPECT_CALL(*decoder_1_, Initialize(_, _, _, _))
.WillOnce(RunCallback<2>(DECODER_ERROR_NOT_SUPPORTED));
EXPECT_CALL(*decoder_2_, Initialize(_, _, _, _));
- EXPECT_CALL(*decoder_2_, Stop());
SelectDecoderAndAbort();
}
@@ -228,7 +216,6 @@ TEST_F(VideoDecoderSelectorTest, ClearStream_HasDecryptor) {
EXPECT_CALL(*decoder_1_, Initialize(_, _, _, _))
.WillOnce(RunCallback<2>(PIPELINE_OK));
EXPECT_CALL(*this, OnDecoderSelected(decoder_1_, IsNull()));
- EXPECT_CALL(*decoder_1_, Stop());
SelectDecoder();
}
@@ -238,7 +225,6 @@ TEST_F(VideoDecoderSelectorTest, Abort_ClearStream_HasDecryptor) {
InitializeDecoderSelector(kDecryptOnly, 1);
EXPECT_CALL(*decoder_1_, Initialize(_, _, _, _));
- EXPECT_CALL(*decoder_1_, Stop());
SelectDecoderAndAbort();
}
@@ -281,7 +267,6 @@ TEST_F(VideoDecoderSelectorTest, EncryptedStream_DecryptOnly_OneClearDecoder) {
EXPECT_CALL(*decoder_1_, Initialize(_, _, _, _))
.WillOnce(RunCallback<2>(PIPELINE_OK));
EXPECT_CALL(*this, OnDecoderSelected(decoder_1_, NotNull()));
- EXPECT_CALL(*decoder_1_, Stop());
SelectDecoder();
}
@@ -292,7 +277,6 @@ TEST_F(VideoDecoderSelectorTest,
InitializeDecoderSelector(kDecryptOnly, 1);
EXPECT_CALL(*decoder_1_, Initialize(_, _, _, _));
- EXPECT_CALL(*decoder_1_, Stop());
SelectDecoderAndAbort();
}
@@ -310,7 +294,6 @@ TEST_F(VideoDecoderSelectorTest,
EXPECT_CALL(*decoder_2_, Initialize(_, _, _, _))
.WillOnce(RunCallback<2>(PIPELINE_OK));
EXPECT_CALL(*this, OnDecoderSelected(decoder_2_, NotNull()));
- EXPECT_CALL(*decoder_2_, Stop());
SelectDecoder();
}
@@ -323,7 +306,6 @@ TEST_F(VideoDecoderSelectorTest,
EXPECT_CALL(*decoder_1_, Initialize(_, _, _, _))
.WillOnce(RunCallback<2>(DECODER_ERROR_NOT_SUPPORTED));
EXPECT_CALL(*decoder_2_, Initialize(_, _, _, _));
- EXPECT_CALL(*decoder_2_, Stop());
SelectDecoderAndAbort();
}
« no previous file with comments | « media/filters/opus_audio_decoder.cc ('k') | media/filters/video_renderer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698