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

Unified Diff: media/base/pipeline_unittest.cc

Issue 870693002: Require Renderer::Initialize() to return a status code via callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments. Created 5 years, 11 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/pipeline.cc ('k') | media/base/renderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/pipeline_unittest.cc
diff --git a/media/base/pipeline_unittest.cc b/media/base/pipeline_unittest.cc
index d6f1308c2521396b28fab5c901e36ec0d12b0a66..354b51e8efade50dadbd2ac21f90123d5bb4eb64 100644
--- a/media/base/pipeline_unittest.cc
+++ b/media/base/pipeline_unittest.cc
@@ -57,13 +57,6 @@ ACTION_P2(SetBufferingState, cb, buffering_state) {
ACTION_TEMPLATE(PostCallback,
HAS_1_TEMPLATE_PARAMS(int, k),
- AND_0_VALUE_PARAMS()) {
- return base::MessageLoop::current()->PostTask(FROM_HERE,
- ::std::tr1::get<k>(args));
-}
-
-ACTION_TEMPLATE(PostCallback,
- HAS_1_TEMPLATE_PARAMS(int, k),
AND_1_VALUE_PARAMS(p0)) {
return base::MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(::std::tr1::get<k>(args), p0));
@@ -180,7 +173,7 @@ class PipelineTest : public ::testing::Test {
EXPECT_CALL(*renderer_, Initialize(_, _, _, _, _, _, _))
.WillOnce(DoAll(SaveArg<3>(&buffering_state_cb_),
SaveArg<5>(&ended_cb_),
- PostCallback<1>()));
+ PostCallback<1>(PIPELINE_OK)));
EXPECT_CALL(*renderer_, HasAudio()).WillRepeatedly(Return(audio_stream()));
EXPECT_CALL(*renderer_, HasVideo()).WillRepeatedly(Return(video_stream()));
}
@@ -865,13 +858,12 @@ class PipelineTeardownTest : public PipelineTest {
if (stop_or_error == kStop) {
EXPECT_CALL(*renderer_, Initialize(_, _, _, _, _, _, _))
.WillOnce(DoAll(Stop(pipeline_.get(), stop_cb),
- PostCallback<1>()));
+ PostCallback<1>(PIPELINE_OK)));
ExpectPipelineStopAndDestroyPipeline();
} else {
status = PIPELINE_ERROR_INITIALIZATION_FAILED;
EXPECT_CALL(*renderer_, Initialize(_, _, _, _, _, _, _))
- .WillOnce(
- DoAll(RunCallback<6>(status), PostCallback<1>()));
+ .WillOnce(PostCallback<1>(status));
}
EXPECT_CALL(*demuxer_, Stop());
@@ -880,7 +872,7 @@ class PipelineTeardownTest : public PipelineTest {
EXPECT_CALL(*renderer_, Initialize(_, _, _, _, _, _, _))
.WillOnce(DoAll(SaveArg<3>(&buffering_state_cb_),
- PostCallback<1>()));
+ PostCallback<1>(PIPELINE_OK)));
EXPECT_CALL(callbacks_, OnMetadata(_));
« no previous file with comments | « media/base/pipeline.cc ('k') | media/base/renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698