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

Unified Diff: remoting/host/desktop_process_unittest.cc

Issue 1673723002: Use IpcVideoFrameCapturer on network thread instead of capturer thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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_process_main.cc ('k') | remoting/host/desktop_session_agent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/desktop_process_unittest.cc
diff --git a/remoting/host/desktop_process_unittest.cc b/remoting/host/desktop_process_unittest.cc
index 55aac14bbf70f21d4341c976f7a4d7cf9a9ec2ac..97d0249d803218a851c593c8d0090d3bbbfefa05 100644
--- a/remoting/host/desktop_process_unittest.cc
+++ b/remoting/host/desktop_process_unittest.cc
@@ -25,6 +25,7 @@
#include "remoting/base/auto_thread_task_runner.h"
#include "remoting/host/chromoting_messages.h"
#include "remoting/host/desktop_process.h"
+#include "remoting/host/fake_mouse_cursor_monitor.h"
#include "remoting/host/host_exit_codes.h"
#include "remoting/host/host_mock_objects.h"
#include "remoting/host/screen_resolution.h"
@@ -123,6 +124,10 @@ class DesktopProcessTest : public testing::Test {
// DesktopEnvironment::CreateVideoCapturer().
webrtc::DesktopCapturer* CreateVideoCapturer();
+ // Creates a fake webrtc::MouseCursorMonitor, to mock
+ // DesktopEnvironment::CreateMouseCursorMonitor().
+ webrtc::MouseCursorMonitor* CreateMouseCursorMonitor();
+
// Disconnects the daemon-to-desktop channel causing the desktop process to
// exit.
void DisconnectChannels();
@@ -207,6 +212,9 @@ DesktopEnvironment* DesktopProcessTest::CreateDesktopEnvironment() {
EXPECT_CALL(*desktop_environment, CreateVideoCapturerPtr())
.Times(AtMost(1))
.WillOnce(Invoke(this, &DesktopProcessTest::CreateVideoCapturer));
+ EXPECT_CALL(*desktop_environment, CreateMouseCursorMonitorPtr())
+ .Times(AtMost(1))
+ .WillOnce(Invoke(this, &DesktopProcessTest::CreateMouseCursorMonitor));
EXPECT_CALL(*desktop_environment, GetCapabilities())
.Times(AtMost(1));
EXPECT_CALL(*desktop_environment, SetCapabilities(_))
@@ -227,6 +235,10 @@ webrtc::DesktopCapturer* DesktopProcessTest::CreateVideoCapturer() {
return new protocol::FakeDesktopCapturer();
}
+webrtc::MouseCursorMonitor* DesktopProcessTest::CreateMouseCursorMonitor() {
+ return new FakeMouseCursorMonitor();
+}
+
void DesktopProcessTest::DisconnectChannels() {
daemon_channel_.reset();
network_channel_.reset();
« no previous file with comments | « remoting/host/desktop_process_main.cc ('k') | remoting/host/desktop_session_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698