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

Unified Diff: media/renderers/audio_renderer_impl_unittest.cc

Issue 1143223007: media: Reland "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/filters/vpx_video_decoder.cc ('k') | media/renderers/video_renderer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/renderers/audio_renderer_impl_unittest.cc
diff --git a/media/renderers/audio_renderer_impl_unittest.cc b/media/renderers/audio_renderer_impl_unittest.cc
index 119fb76b464915a3cd8ed0d432f2c3d211c30a74..e65dd4b0fc1db7bc235426affeb659fd6678e52e 100644
--- a/media/renderers/audio_renderer_impl_unittest.cc
+++ b/media/renderers/audio_renderer_impl_unittest.cc
@@ -106,8 +106,7 @@ class AudioRendererImplTest : public ::testing::Test {
void ExpectUnsupportedAudioDecoder() {
EXPECT_CALL(*decoder_, Initialize(_, _, _))
- .WillOnce(DoAll(SaveArg<2>(&output_cb_),
- RunCallback<1>(DECODER_ERROR_NOT_SUPPORTED)));
+ .WillOnce(DoAll(SaveArg<2>(&output_cb_), RunCallback<1>(false)));
}
MOCK_METHOD1(OnStatistics, void(const PipelineStatistics&));
@@ -131,8 +130,7 @@ class AudioRendererImplTest : public ::testing::Test {
void Initialize() {
EXPECT_CALL(*decoder_, Initialize(_, _, _))
- .WillOnce(DoAll(SaveArg<2>(&output_cb_),
- RunCallback<1>(PIPELINE_OK)));
+ .WillOnce(DoAll(SaveArg<2>(&output_cb_), RunCallback<1>(true)));
InitializeWithStatus(PIPELINE_OK);
next_timestamp_.reset(new AudioTimestampHelper(kInputSamplesPerSecond));
@@ -150,8 +148,7 @@ class AudioRendererImplTest : public ::testing::Test {
}
void InitializeAndDestroy() {
- EXPECT_CALL(*decoder_, Initialize(_, _, _))
- .WillOnce(RunCallback<1>(PIPELINE_OK));
+ EXPECT_CALL(*decoder_, Initialize(_, _, _)).WillOnce(RunCallback<1>(true));
WaitableMessageLoopEvent event;
InitializeRenderer(event.GetPipelineStatusCB());
@@ -176,7 +173,7 @@ class AudioRendererImplTest : public ::testing::Test {
event.RunAndWaitForStatus(PIPELINE_ERROR_ABORT);
}
- void EnterPendingDecoderInitState(PipelineStatusCB cb) {
+ void EnterPendingDecoderInitState(const AudioDecoder::InitCB& cb) {
init_decoder_cb_ = cb;
}
@@ -398,7 +395,7 @@ class AudioRendererImplTest : public ::testing::Test {
// Run during DecodeDecoder() to unblock WaitForPendingRead().
base::Closure wait_for_pending_decode_cb_;
- PipelineStatusCB init_decoder_cb_;
+ AudioDecoder::InitCB init_decoder_cb_;
bool ended_;
DISALLOW_COPY_AND_ASSIGN(AudioRendererImplTest);
« no previous file with comments | « media/filters/vpx_video_decoder.cc ('k') | media/renderers/video_renderer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698