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..4d97f924dafbd09d6ed23d8f0a1f3b573d1f2ce2 100644 |
| --- a/media/capture/video/video_capture_device_unittest.cc |
| +++ b/media/capture/video/video_capture_device_unittest.cc |
| @@ -72,11 +72,17 @@ |
| #endif |
| using ::testing::_; |
| +using ::testing::Invoke; |
| using ::testing::SaveArg; |
| 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 +96,9 @@ 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(Invoke(DumpError)); |
|
chfremer
2016/09/22 18:05:33
Sgtm. Alternatively, we could use a Lambda express
|
| + } |
| void OnIncomingCapturedData(const uint8_t* data, |
| int length, |