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

Unified Diff: media/base/pipeline_impl_unittest.cc

Issue 2758713002: Avoid to use the method pointer to Callback<>::Run on gmock tests (Closed)
Patch Set: Created 3 years, 9 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
Index: media/base/pipeline_impl_unittest.cc
diff --git a/media/base/pipeline_impl_unittest.cc b/media/base/pipeline_impl_unittest.cc
index f4ee099b3449462ddb52d8fcd679195ea082d038..7b719c010ab3fa949b7203e85fa1a722cd214f3c 100644
--- a/media/base/pipeline_impl_unittest.cc
+++ b/media/base/pipeline_impl_unittest.cc
@@ -28,11 +28,13 @@
#include "media/base/text_renderer.h"
#include "media/base/text_track_config.h"
#include "media/base/time_delta_interpolator.h"
+#include "testing/gmock_mutant.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/geometry/size.h"
using ::testing::_;
using ::testing::AnyNumber;
+using ::testing::CreateFunctor;
using ::testing::DeleteArg;
using ::testing::DoAll;
// TODO(scherkus): Remove InSequence after refactoring Pipeline.
@@ -734,8 +736,7 @@ TEST_F(PipelineImplTest, NoMessageDuringTearDownFromError) {
// Trigger additional requests on the pipeline during tear down from error.
base::Callback<void(PipelineStatus)> cb =
base::Bind(&TestNoCallsAfterError, pipeline_.get(), &message_loop_);
- ON_CALL(callbacks_, OnError(_))
- .WillByDefault(Invoke(&cb, &base::Callback<void(PipelineStatus)>::Run));
+ ON_CALL(callbacks_, OnError(_)).WillByDefault(Invoke(CreateFunctor(cb)));
base::TimeDelta seek_time = base::TimeDelta::FromSeconds(5);

Powered by Google App Engine
This is Rietveld 408576698