Chromium Code Reviews| Index: media/capture/video/video_capture_device_unittest.cc |
| diff --git a/media/capture/video/video_capture_device_unittest.cc b/media/capture/video/video_capture_device_unittest.cc |
| index 11031fec944b74abf4c0bca026dcd47d6706e7fe..500e9662f2602aaa72a71ca44e6424fa43d6fede 100644 |
| --- a/media/capture/video/video_capture_device_unittest.cc |
| +++ b/media/capture/video/video_capture_device_unittest.cc |
| @@ -72,11 +72,18 @@ |
| #endif |
| using ::testing::_; |
| +using ::testing::Invoke; |
| using ::testing::SaveArg; |
| +using ::testing::WithArgs; |
| namespace media { |
| namespace { |
| +void DumpError(const tracked_objects::Location& location, |
| + const std::string& message) { |
| + DPLOG(ERROR) << location.ToString() << " " << message; |
| +} |
| + |
| class MockVideoCaptureClient : public VideoCaptureDevice::Client { |
| public: |
| MOCK_METHOD0(DoReserveOutputBuffer, void(void)); |
| @@ -90,8 +97,10 @@ class MockVideoCaptureClient : public VideoCaptureDevice::Client { |
| explicit MockVideoCaptureClient( |
| base::Callback<void(const VideoCaptureFormat&)> frame_cb) |
| - : main_thread_(base::ThreadTaskRunnerHandle::Get()), |
| - frame_cb_(frame_cb) {} |
| + : main_thread_(base::ThreadTaskRunnerHandle::Get()), frame_cb_(frame_cb) { |
| + ON_CALL(*this, OnError(_, _)) |
| + .WillByDefault(WithArgs<0, 1>(Invoke(DumpError))); |
|
chfremer
2016/09/22 17:44:18
Is the WithArgs<0, 1> really needed? It seems the
mcasas
2016/09/22 17:58:36
Ooops, isn't needed indeed, it's a leftover
from a
|
| + } |
| void OnIncomingCapturedData(const uint8_t* data, |
| int length, |