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

Unified Diff: remoting/host/ipc_desktop_environment_unittest.cc

Issue 2050353002: Update webrtc::DesktopCapturer clients to implement OnCaptureResult(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix chromeos Created 4 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 | « remoting/host/desktop_session_proxy.cc ('k') | remoting/host/ipc_video_frame_capturer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/ipc_desktop_environment_unittest.cc
diff --git a/remoting/host/ipc_desktop_environment_unittest.cc b/remoting/host/ipc_desktop_environment_unittest.cc
index a7491c069419632c3810f7d69deafad935a6db96..c7965f2e273a1b06f62e2aafdc37563967b422f3 100644
--- a/remoting/host/ipc_desktop_environment_unittest.cc
+++ b/remoting/host/ipc_desktop_environment_unittest.cc
@@ -66,7 +66,13 @@ class MockScreenCapturerCallback : public webrtc::ScreenCapturer::Callback {
MockScreenCapturerCallback() {}
virtual ~MockScreenCapturerCallback() {}
- MOCK_METHOD1(OnCaptureCompleted, void(webrtc::DesktopFrame*));
+ MOCK_METHOD2(OnCaptureResultPtr,
+ void(webrtc::DesktopCapturer::Result result,
+ std::unique_ptr<webrtc::DesktopFrame>* frame));
+ void OnCaptureResult(webrtc::DesktopCapturer::Result result,
+ std::unique_ptr<webrtc::DesktopFrame> frame) override {
+ OnCaptureResultPtr(result, &frame);
+ }
private:
DISALLOW_COPY_AND_ASSIGN(MockScreenCapturerCallback);
@@ -543,11 +549,9 @@ TEST_F(IpcDesktopEnvironmentTest, CaptureFrame) {
setup_run_loop_->Run();
// Stop the test when the first frame is captured.
- EXPECT_CALL(desktop_capturer_callback_, OnCaptureCompleted(_))
- .WillOnce(DoAll(
- DeleteArg<0>(),
- InvokeWithoutArgs(
- this, &IpcDesktopEnvironmentTest::DeleteDesktopEnvironment)));
+ EXPECT_CALL(desktop_capturer_callback_, OnCaptureResultPtr(_, _))
+ .WillOnce(InvokeWithoutArgs(
+ this, &IpcDesktopEnvironmentTest::DeleteDesktopEnvironment));
// Capture a single frame.
video_capturer_->Capture(webrtc::DesktopRegion());
« no previous file with comments | « remoting/host/desktop_session_proxy.cc ('k') | remoting/host/ipc_video_frame_capturer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698