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

Unified Diff: media/base/test_helpers.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/base/test_helpers.h ('k') | media/base/video_decoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/test_helpers.cc
diff --git a/media/base/test_helpers.cc b/media/base/test_helpers.cc
index bbfbd64a5a906aa4e162de32cc4e9d765a062826..f4ba9915007b62ce793e9429c5f656b5690c96c8 100644
--- a/media/base/test_helpers.cc
+++ b/media/base/test_helpers.cc
@@ -27,6 +27,7 @@ class MockCallback : public base::RefCountedThreadSafe<MockCallback> {
public:
MockCallback();
MOCK_METHOD0(Run, void());
+ MOCK_METHOD1(RunWithBool, void(bool));
MOCK_METHOD1(RunWithStatus, void(PipelineStatus));
protected:
@@ -46,6 +47,12 @@ base::Closure NewExpectedClosure() {
return base::Bind(&MockCallback::Run, callback);
}
+base::Callback<void(bool)> NewExpectedBoolCB(bool success) {
+ StrictMock<MockCallback>* callback = new StrictMock<MockCallback>();
+ EXPECT_CALL(*callback, RunWithBool(success));
+ return base::Bind(&MockCallback::RunWithBool, callback);
+}
+
PipelineStatusCB NewExpectedStatusCB(PipelineStatus status) {
StrictMock<MockCallback>* callback = new StrictMock<MockCallback>();
EXPECT_CALL(*callback, RunWithStatus(status));
« no previous file with comments | « media/base/test_helpers.h ('k') | media/base/video_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698