| 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 6f8918581a3f3d4382b988b96321328eb44df165..57760b5e065439d48cceec13a57eff5ff4236df1 100644
|
| --- a/media/filters/video_decoder_selector_unittest.cc
|
| +++ b/media/filters/video_decoder_selector_unittest.cc
|
| @@ -26,7 +26,7 @@ class VideoDecoderSelectorTest : public ::testing::Test {
|
| public:
|
| enum DecryptorCapability {
|
| kNoDecryptor,
|
| - // Used to test Abort() during DecryptingVideoDecoder::Initialize() and
|
| + // Used to test destruction during DecryptingVideoDecoder::Initialize() and
|
| // DecryptingDemuxerStream::Initialize(). We don't need this for normal
|
| // VideoDecoders since we use MockVideoDecoder.
|
| kHoldSetDecryptor,
|
| @@ -116,11 +116,11 @@ class VideoDecoderSelectorTest : public ::testing::Test {
|
| message_loop_.RunUntilIdle();
|
| }
|
|
|
| - void SelectDecoderAndAbort() {
|
| + void SelectDecoderAndDestroy() {
|
| SelectDecoder();
|
|
|
| EXPECT_CALL(*this, OnDecoderSelected(IsNull(), IsNull()));
|
| - decoder_selector_->Abort();
|
| + decoder_selector_.reset();
|
| message_loop_.RunUntilIdle();
|
| }
|
|
|
| @@ -174,13 +174,13 @@ TEST_F(VideoDecoderSelectorTest, ClearStream_NoDecryptor_OneClearDecoder) {
|
| }
|
|
|
| TEST_F(VideoDecoderSelectorTest,
|
| - Abort_ClearStream_NoDecryptor_OneClearDecoder) {
|
| + Destroy_ClearStream_NoDecryptor_OneClearDecoder) {
|
| UseClearStream();
|
| InitializeDecoderSelector(kNoDecryptor, 1);
|
|
|
| EXPECT_CALL(*decoder_1_, Initialize(_, _, _, _));
|
|
|
| - SelectDecoderAndAbort();
|
| + SelectDecoderAndDestroy();
|
| }
|
|
|
| // The stream is not encrypted and we have multiple clear decoders. The first
|
| @@ -199,7 +199,7 @@ TEST_F(VideoDecoderSelectorTest, ClearStream_NoDecryptor_MultipleClearDecoder) {
|
| }
|
|
|
| TEST_F(VideoDecoderSelectorTest,
|
| - Abort_ClearStream_NoDecryptor_MultipleClearDecoder) {
|
| + Destroy_ClearStream_NoDecryptor_MultipleClearDecoder) {
|
| UseClearStream();
|
| InitializeDecoderSelector(kNoDecryptor, 2);
|
|
|
| @@ -207,7 +207,7 @@ TEST_F(VideoDecoderSelectorTest,
|
| .WillOnce(RunCallback<2>(DECODER_ERROR_NOT_SUPPORTED));
|
| EXPECT_CALL(*decoder_2_, Initialize(_, _, _, _));
|
|
|
| - SelectDecoderAndAbort();
|
| + SelectDecoderAndDestroy();
|
| }
|
|
|
| // There is a decryptor but the stream is not encrypted. The decoder will be
|
| @@ -223,13 +223,13 @@ TEST_F(VideoDecoderSelectorTest, ClearStream_HasDecryptor) {
|
| SelectDecoder();
|
| }
|
|
|
| -TEST_F(VideoDecoderSelectorTest, Abort_ClearStream_HasDecryptor) {
|
| +TEST_F(VideoDecoderSelectorTest, Destroy_ClearStream_HasDecryptor) {
|
| UseClearStream();
|
| InitializeDecoderSelector(kDecryptOnly, 1);
|
|
|
| EXPECT_CALL(*decoder_1_, Initialize(_, _, _, _));
|
|
|
| - SelectDecoderAndAbort();
|
| + SelectDecoderAndDestroy();
|
| }
|
|
|
| // The stream is encrypted and there's no decryptor. No decoder can be selected.
|
| @@ -254,11 +254,11 @@ TEST_F(VideoDecoderSelectorTest, EncryptedStream_DecryptOnly_NoClearDecoder) {
|
| }
|
|
|
| TEST_F(VideoDecoderSelectorTest,
|
| - Abort_EncryptedStream_DecryptOnly_NoClearDecoder) {
|
| + Destroy_EncryptedStream_DecryptOnly_NoClearDecoder) {
|
| UseEncryptedStream();
|
| InitializeDecoderSelector(kHoldSetDecryptor, 0);
|
|
|
| - SelectDecoderAndAbort();
|
| + SelectDecoderAndDestroy();
|
| }
|
|
|
| // Decryptor can do decryption-only and there's a decoder available. The decoder
|
| @@ -275,13 +275,13 @@ TEST_F(VideoDecoderSelectorTest, EncryptedStream_DecryptOnly_OneClearDecoder) {
|
| }
|
|
|
| TEST_F(VideoDecoderSelectorTest,
|
| - Abort_EncryptedStream_DecryptOnly_OneClearDecoder) {
|
| + Destroy_EncryptedStream_DecryptOnly_OneClearDecoder) {
|
| UseEncryptedStream();
|
| InitializeDecoderSelector(kDecryptOnly, 1);
|
|
|
| EXPECT_CALL(*decoder_1_, Initialize(_, _, _, _));
|
|
|
| - SelectDecoderAndAbort();
|
| + SelectDecoderAndDestroy();
|
| }
|
|
|
| // Decryptor can only do decryption and there are multiple decoders available.
|
| @@ -302,7 +302,7 @@ TEST_F(VideoDecoderSelectorTest,
|
| }
|
|
|
| TEST_F(VideoDecoderSelectorTest,
|
| - Abort_EncryptedStream_DecryptOnly_MultipleClearDecoder) {
|
| + Destroy_EncryptedStream_DecryptOnly_MultipleClearDecoder) {
|
| UseEncryptedStream();
|
| InitializeDecoderSelector(kDecryptOnly, 2);
|
|
|
| @@ -310,7 +310,7 @@ TEST_F(VideoDecoderSelectorTest,
|
| .WillOnce(RunCallback<2>(DECODER_ERROR_NOT_SUPPORTED));
|
| EXPECT_CALL(*decoder_2_, Initialize(_, _, _, _));
|
|
|
| - SelectDecoderAndAbort();
|
| + SelectDecoderAndDestroy();
|
| }
|
|
|
| // Decryptor can do decryption and decoding. A DecryptingVideoDecoder will be
|
| @@ -325,11 +325,11 @@ TEST_F(VideoDecoderSelectorTest, EncryptedStream_DecryptAndDecode) {
|
| SelectDecoder();
|
| }
|
|
|
| -TEST_F(VideoDecoderSelectorTest, Abort_EncryptedStream_DecryptAndDecode) {
|
| +TEST_F(VideoDecoderSelectorTest, Destroy_EncryptedStream_DecryptAndDecode) {
|
| UseEncryptedStream();
|
| InitializeDecoderSelector(kHoldSetDecryptor, 1);
|
|
|
| - SelectDecoderAndAbort();
|
| + SelectDecoderAndDestroy();
|
| }
|
|
|
| } // namespace media
|
|
|