Chromium Code Reviews| 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 |