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

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: Created 5 years, 9 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..5fce713de8c1569f4f29ac586eaecc42360d872a 100644
--- a/remoting/host/ipc_desktop_environment_unittest.cc
+++ b/remoting/host/ipc_desktop_environment_unittest.cc
@@ -459,6 +459,58 @@ TEST_F(IpcDesktopEnvironmentTest, Basic) {
main_run_loop_.Run();
}
+// Check Capabilities.
+TEST_F(IpcDesktopEnvironmentTest, Capabilities) {
Wez 2015/03/30 17:10:07 CapabilitiesNoTouch?
Rintaro Kuroiwa 2015/04/08 03:27:43 Renamed to NoTouchCapabilities and moved these tes
+ 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 in capabilities.
+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