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

Unified Diff: remoting/host/client_session_unittest.cc

Issue 1033913003: Touch Events capability negotiation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: should fix mac build 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/client_session_unittest.cc
diff --git a/remoting/host/client_session_unittest.cc b/remoting/host/client_session_unittest.cc
index 5d94591c495aa9f71c1d2884399b9692a8477551..79f77e2c785d5757c9d7e49a6749184eb4211a63 100644
--- a/remoting/host/client_session_unittest.cc
+++ b/remoting/host/client_session_unittest.cc
@@ -773,4 +773,44 @@ TEST_F(ClientSessionTest, StealVideoCapturer) {
EXPECT_TRUE(extension.has_wrapped_video_capturer());
}
+// Check multiTouch in capabilities is set when InputInjector can inject touch
Wez 2015/04/09 22:58:59 nit: "Check multiTouch capability is set when..."
Rintaro Kuroiwa 2015/04/20 18:20:03 Done.
+// events.
+TEST_F(ClientSessionTest, MultiTouchCapabilities) {
+ CreateClientSession();
+
+ // This host can inject touch.
+ EXPECT_CALL(*input_injector_, CanInjectTouch())
+ .WillRepeatedly(Return(true));
+
+ EXPECT_CALL(session_event_handler_, OnSessionAuthenticated(_))
+ .WillOnce(Return(true));
+
+ EXPECT_CALL(client_stub_,
+ SetCapabilities(EqCapabilities("default multiTouch")));
+
+ ConnectClientSession();
+ base::RunLoop().RunUntilIdle();
+ DisconnectClientSession();
+ StopClientSession();
+}
+
+TEST_F(ClientSessionTest, NoTouchCapabilities) {
+ CreateClientSession();
+
+ // This host can inject touch.
+ EXPECT_CALL(*input_injector_, CanInjectTouch())
+ .WillRepeatedly(Return(false));
+
+ EXPECT_CALL(session_event_handler_, OnSessionAuthenticated(_))
+ .WillOnce(Return(true));
+
+ EXPECT_CALL(client_stub_,
+ SetCapabilities(EqCapabilities("default")));
+
+ ConnectClientSession();
+ base::RunLoop().RunUntilIdle();
+ DisconnectClientSession();
+ StopClientSession();
+}
+
} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698