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

Unified Diff: media/renderers/video_renderer_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
« no previous file with comments | « media/base/pipeline_impl_unittest.cc ('k') | testing/gmock_mutant.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/renderers/video_renderer_impl_unittest.cc
diff --git a/media/renderers/video_renderer_impl_unittest.cc b/media/renderers/video_renderer_impl_unittest.cc
index b6058c674ebcbb19bb60980d0caa268f5a4e3f6c..90f921884e508988e5eeee4fead98bc27596e80d 100644
--- a/media/renderers/video_renderer_impl_unittest.cc
+++ b/media/renderers/video_renderer_impl_unittest.cc
@@ -31,10 +31,12 @@
#include "media/base/wall_clock_time_source.h"
#include "media/renderers/mock_gpu_memory_buffer_video_frame_pool.h"
#include "media/renderers/video_renderer_impl.h"
+#include "testing/gmock_mutant.h"
#include "testing/gtest/include/gtest/gtest.h"
using ::testing::_;
using ::testing::AnyNumber;
+using ::testing::CreateFunctor;
using ::testing::Invoke;
using ::testing::Mock;
using ::testing::NiceMock;
@@ -201,8 +203,7 @@ class VideoRendererImplTest : public testing::Test {
WaitableMessageLoopEvent event;
PipelineStatusCB error_cb = event.GetPipelineStatusCB();
- EXPECT_CALL(mock_cb_, OnError(_))
- .WillOnce(Invoke(&error_cb, &PipelineStatusCB::Run));
+ EXPECT_CALL(mock_cb_, OnError(_)).WillOnce(Invoke(CreateFunctor(error_cb)));
event.RunAndWaitForStatus(expected);
}
« no previous file with comments | « media/base/pipeline_impl_unittest.cc ('k') | testing/gmock_mutant.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698