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

Unified Diff: media/filters/audio_decoder_selector_unittest.cc

Issue 1146913008: Revert of media: Simplify {Audio|Video}Decoder initialization callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 29570c97fbf2afb617a181af2335004fa88b3e57..2bb1f6d263e7261c6e499518e3618dd1f4d53e3c 100644
--- a/media/filters/audio_decoder_selector_unittest.cc
+++ b/media/filters/audio_decoder_selector_unittest.cc
@@ -196,7 +196,8 @@
UseClearStream();
InitializeDecoderSelector(kNoDecryptor, 1);
- EXPECT_CALL(*decoder_1_, Initialize(_, _, _)).WillOnce(RunCallback<1>(true));
+ EXPECT_CALL(*decoder_1_, Initialize(_, _, _))
+ .WillOnce(RunCallback<1>(PIPELINE_OK));
EXPECT_CALL(*this, OnDecoderSelected(decoder_1_, IsNull()));
SelectDecoder();
@@ -218,8 +219,10 @@
UseClearStream();
InitializeDecoderSelector(kNoDecryptor, 2);
- EXPECT_CALL(*decoder_1_, Initialize(_, _, _)).WillOnce(RunCallback<1>(false));
- EXPECT_CALL(*decoder_2_, Initialize(_, _, _)).WillOnce(RunCallback<1>(true));
+ EXPECT_CALL(*decoder_1_, Initialize(_, _, _))
+ .WillOnce(RunCallback<1>(DECODER_ERROR_NOT_SUPPORTED));
+ EXPECT_CALL(*decoder_2_, Initialize(_, _, _))
+ .WillOnce(RunCallback<1>(PIPELINE_OK));
EXPECT_CALL(*this, OnDecoderSelected(decoder_2_, IsNull()));
SelectDecoder();
@@ -230,7 +233,8 @@
UseClearStream();
InitializeDecoderSelector(kNoDecryptor, 2);
- EXPECT_CALL(*decoder_1_, Initialize(_, _, _)).WillOnce(RunCallback<1>(false));
+ EXPECT_CALL(*decoder_1_, Initialize(_, _, _))
+ .WillOnce(RunCallback<1>(DECODER_ERROR_NOT_SUPPORTED));
EXPECT_CALL(*decoder_2_, Initialize(_, _, _));
SelectDecoderAndDestroy();
@@ -242,7 +246,8 @@
UseClearStream();
InitializeDecoderSelector(kDecryptOnly, 1);
- EXPECT_CALL(*decoder_1_, Initialize(_, _, _)).WillOnce(RunCallback<1>(true));
+ EXPECT_CALL(*decoder_1_, Initialize(_, _, _))
+ .WillOnce(RunCallback<1>(PIPELINE_OK));
EXPECT_CALL(*this, OnDecoderSelected(decoder_1_, IsNull()));
SelectDecoder();
@@ -292,7 +297,8 @@
UseEncryptedStream();
InitializeDecoderSelector(kDecryptOnly, 1);
- EXPECT_CALL(*decoder_1_, Initialize(_, _, _)).WillOnce(RunCallback<1>(true));
+ EXPECT_CALL(*decoder_1_, Initialize(_, _, _))
+ .WillOnce(RunCallback<1>(PIPELINE_OK));
EXPECT_CALL(*this, OnDecoderSelected(decoder_1_, NotNull()));
SelectDecoder();
@@ -316,8 +322,10 @@
UseEncryptedStream();
InitializeDecoderSelector(kDecryptOnly, 2);
- EXPECT_CALL(*decoder_1_, Initialize(_, _, _)).WillOnce(RunCallback<1>(false));
- EXPECT_CALL(*decoder_2_, Initialize(_, _, _)).WillOnce(RunCallback<1>(true));
+ EXPECT_CALL(*decoder_1_, Initialize(_, _, _))
+ .WillOnce(RunCallback<1>(DECODER_ERROR_NOT_SUPPORTED));
+ EXPECT_CALL(*decoder_2_, Initialize(_, _, _))
+ .WillOnce(RunCallback<1>(PIPELINE_OK));
EXPECT_CALL(*this, OnDecoderSelected(decoder_2_, NotNull()));
SelectDecoder();
@@ -328,7 +336,8 @@
UseEncryptedStream();
InitializeDecoderSelector(kDecryptOnly, 2);
- EXPECT_CALL(*decoder_1_, Initialize(_, _, _)).WillOnce(RunCallback<1>(false));
+ EXPECT_CALL(*decoder_1_, Initialize(_, _, _))
+ .WillOnce(RunCallback<1>(DECODER_ERROR_NOT_SUPPORTED));
EXPECT_CALL(*decoder_2_, Initialize(_, _, _));
SelectDecoderAndDestroy();
« 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