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

Unified Diff: remoting/host/ipc_desktop_environment_unittest.cc

Issue 1033913003: Touch Events capability negotiation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: back to setting a flag on DesktopEnvironmentFactory Created 5 years, 8 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
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 d31d3d46acd51160f2aae5e3b6084cd03b66e202..34a17fd251fa646f9e42fc0485d4a21a4e9ffc45 100644
--- a/remoting/host/ipc_desktop_environment_unittest.cc
+++ b/remoting/host/ipc_desktop_environment_unittest.cc
@@ -459,6 +459,59 @@ TEST_F(IpcDesktopEnvironmentTest, Basic) {
main_run_loop_.Run();
}
+// Check Capabilities.
+TEST_F(IpcDesktopEnvironmentTest, CapabilitiesNoTouch) {
+ scoped_ptr<protocol::MockClipboardStub> clipboard_stub(
+ new protocol::MockClipboardStub());
+ EXPECT_CALL(*clipboard_stub, InjectClipboardEvent(_))
+ .Times(0);
+
+ EXPECT_EQ("rateLimitResizeRequests", desktop_environment_->GetCapabilities());
+
+ // Start the input injector and screen capturer.
+ input_injector_->Start(clipboard_stub.Pass());
+
+ // Run the message loop until the desktop is attached.
+ setup_run_loop_->Run();
+
+ // Stop the test.
+ DeleteDesktopEnvironment();
+
+ task_runner_ = nullptr;
+ io_task_runner_ = nullptr;
+ main_run_loop_.Run();
+}
+
+// Check multiTouch capability is set when InputInjector can inject touch
+// events.
+TEST_F(IpcDesktopEnvironmentTest, MultiTouchCapabilities) {
+ // Create an environment with multi touch enabled.
+ desktop_environment_factory_->SetEnableMultiTouch(true);
+ desktop_environment_ = desktop_environment_factory_->Create(
+ client_session_control_factory_.GetWeakPtr());
+
+ scoped_ptr<protocol::MockClipboardStub> clipboard_stub(
+ new protocol::MockClipboardStub());
+ EXPECT_CALL(*clipboard_stub, InjectClipboardEvent(_))
+ .Times(0);
+
+ EXPECT_EQ("rateLimitResizeRequests multiTouch",
+ desktop_environment_->GetCapabilities());
+
+ // Start the input injector and screen capturer.
+ input_injector_->Start(clipboard_stub.Pass());
+
+ // Run the message loop until the desktop is attached.
+ setup_run_loop_->Run();
+
+ // Stop the test.
+ DeleteDesktopEnvironment();
+
+ task_runner_ = nullptr;
+ io_task_runner_ = nullptr;
+ main_run_loop_.Run();
+}
+
// Tests that the video capturer receives a frame over IPC.
TEST_F(IpcDesktopEnvironmentTest, CaptureFrame) {
scoped_ptr<protocol::MockClipboardStub> clipboard_stub(

Powered by Google App Engine
This is Rietveld 408576698