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

Unified Diff: remoting/host/ipc_desktop_environment_unittest.cc

Issue 455073004: Switch DesktopEnvironment to return a DesktopCapturer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove ShapedDesktopCapturer::Create() Created 6 years, 4 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/ipc_desktop_environment.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 542fec6c0d6a018a738126ada9eecb5e19a3888c..9e13e8f4dec8cc55d3bebfc0e75847610d495fff 100644
--- a/remoting/host/ipc_desktop_environment_unittest.cc
+++ b/remoting/host/ipc_desktop_environment_unittest.cc
@@ -24,8 +24,8 @@
#include "remoting/host/desktop_session.h"
#include "remoting/host/desktop_session_connector.h"
#include "remoting/host/desktop_session_proxy.h"
+#include "remoting/host/fake_desktop_capturer.h"
#include "remoting/host/fake_mouse_cursor_monitor.h"
-#include "remoting/host/fake_screen_capturer.h"
#include "remoting/host/host_mock_objects.h"
#include "remoting/host/ipc_desktop_environment.h"
#include "remoting/protocol/protocol_mock_objects.h"
@@ -130,7 +130,7 @@ class IpcDesktopEnvironmentTest : public testing::Test {
bool virtual_terminal);
void DisconnectTerminal(int terminal_id);
- // Creates a DesktopEnvironment with a fake webrtc::ScreenCapturer, to mock
+ // Creates a DesktopEnvironment with a fake webrtc::DesktopCapturer, to mock
// DesktopEnvironmentFactory::Create().
DesktopEnvironment* CreateDesktopEnvironment();
@@ -138,9 +138,9 @@ class IpcDesktopEnvironmentTest : public testing::Test {
// DesktopEnvironment::CreateInputInjector().
InputInjector* CreateInputInjector();
- // Creates a fake webrtc::ScreenCapturer, to mock
+ // Creates a fake webrtc::DesktopCapturer, to mock
// DesktopEnvironment::CreateVideoCapturer().
- webrtc::ScreenCapturer* CreateVideoCapturer();
+ webrtc::DesktopCapturer* CreateVideoCapturer();
// Creates a MockMouseCursorMonitor, to mock
// DesktopEnvironment::CreateMouseCursorMonitor
@@ -202,7 +202,7 @@ class IpcDesktopEnvironmentTest : public testing::Test {
scoped_ptr<ScreenControls> screen_controls_;
// The IPC screen capturer.
- scoped_ptr<webrtc::ScreenCapturer> video_capturer_;
+ scoped_ptr<webrtc::DesktopCapturer> video_capturer_;
// Represents the desktop process running in a user session.
scoped_ptr<DesktopProcess> desktop_process_;
@@ -213,7 +213,7 @@ class IpcDesktopEnvironmentTest : public testing::Test {
// The last |terminal_id| passed to ConnectTermina();
int terminal_id_;
- webrtc::MockScreenCapturerCallback screen_capturer_callback_;
+ webrtc::MockScreenCapturerCallback desktop_capturer_callback_;
MockClientSessionControl client_session_control_;
base::WeakPtrFactory<ClientSessionControl> client_session_control_factory_;
@@ -352,8 +352,8 @@ InputInjector* IpcDesktopEnvironmentTest::CreateInputInjector() {
return remote_input_injector_;
}
-webrtc::ScreenCapturer* IpcDesktopEnvironmentTest::CreateVideoCapturer() {
- return new FakeScreenCapturer();
+webrtc::DesktopCapturer* IpcDesktopEnvironmentTest::CreateVideoCapturer() {
+ return new FakeDesktopCapturer();
}
webrtc::MouseCursorMonitor*
@@ -457,13 +457,13 @@ TEST_F(IpcDesktopEnvironmentTest, CaptureFrame) {
// Start the input injector and screen capturer.
input_injector_->Start(clipboard_stub.PassAs<protocol::ClipboardStub>());
- video_capturer_->Start(&screen_capturer_callback_);
+ video_capturer_->Start(&desktop_capturer_callback_);
// Run the message loop until the desktop is attached.
setup_run_loop_->Run();
// Stop the test when the first frame is captured.
- EXPECT_CALL(screen_capturer_callback_, OnCaptureCompleted(_))
+ EXPECT_CALL(desktop_capturer_callback_, OnCaptureCompleted(_))
.WillOnce(DoAll(
DeleteArg<0>(),
InvokeWithoutArgs(
@@ -486,7 +486,7 @@ TEST_F(IpcDesktopEnvironmentTest, Reattach) {
// Start the input injector and screen capturer.
input_injector_->Start(clipboard_stub.PassAs<protocol::ClipboardStub>());
- video_capturer_->Start(&screen_capturer_callback_);
+ video_capturer_->Start(&desktop_capturer_callback_);
// Run the message loop until the desktop is attached.
setup_run_loop_->Run();
@@ -519,7 +519,7 @@ TEST_F(IpcDesktopEnvironmentTest, InjectClipboardEvent) {
// Start the input injector and screen capturer.
input_injector_->Start(clipboard_stub.PassAs<protocol::ClipboardStub>());
- video_capturer_->Start(&screen_capturer_callback_);
+ video_capturer_->Start(&desktop_capturer_callback_);
// Run the message loop until the desktop is attached.
setup_run_loop_->Run();
@@ -550,7 +550,7 @@ TEST_F(IpcDesktopEnvironmentTest, InjectKeyEvent) {
// Start the input injector and screen capturer.
input_injector_->Start(clipboard_stub.PassAs<protocol::ClipboardStub>());
- video_capturer_->Start(&screen_capturer_callback_);
+ video_capturer_->Start(&desktop_capturer_callback_);
// Run the message loop until the desktop is attached.
setup_run_loop_->Run();
@@ -581,7 +581,7 @@ TEST_F(IpcDesktopEnvironmentTest, InjectTextEvent) {
// Start the input injector and screen capturer.
input_injector_->Start(clipboard_stub.PassAs<protocol::ClipboardStub>());
- video_capturer_->Start(&screen_capturer_callback_);
+ video_capturer_->Start(&desktop_capturer_callback_);
// Run the message loop until the desktop is attached.
setup_run_loop_->Run();
@@ -611,7 +611,7 @@ TEST_F(IpcDesktopEnvironmentTest, InjectMouseEvent) {
// Start the input injector and screen capturer.
input_injector_->Start(clipboard_stub.PassAs<protocol::ClipboardStub>());
- video_capturer_->Start(&screen_capturer_callback_);
+ video_capturer_->Start(&desktop_capturer_callback_);
// Run the message loop until the desktop is attached.
setup_run_loop_->Run();
@@ -642,7 +642,7 @@ TEST_F(IpcDesktopEnvironmentTest, SetScreenResolution) {
// Start the input injector and screen capturer.
input_injector_->Start(clipboard_stub.PassAs<protocol::ClipboardStub>());
- video_capturer_->Start(&screen_capturer_callback_);
+ video_capturer_->Start(&desktop_capturer_callback_);
// Run the message loop until the desktop is attached.
setup_run_loop_->Run();
« no previous file with comments | « remoting/host/ipc_desktop_environment.cc ('k') | remoting/host/ipc_video_frame_capturer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698