| Index: remoting/host/client_session_unittest.cc
|
| diff --git a/remoting/host/client_session_unittest.cc b/remoting/host/client_session_unittest.cc
|
| index 67bf728ba6d0e5f07312c64026a46f3358246c28..ead8dcb468df84bfbf9081a6dbf994cb6579ee47 100644
|
| --- a/remoting/host/client_session_unittest.cc
|
| +++ b/remoting/host/client_session_unittest.cc
|
| @@ -107,8 +107,8 @@ MATCHER_P2(EqualsMouseEvent, x, y, "") {
|
| return arg.x() == x && arg.y() == y;
|
| }
|
|
|
| -MATCHER_P(EqualsMouseUpEvent, button, "") {
|
| - return arg.button() == button && !arg.button_down();
|
| +MATCHER_P2(EqualsMouseButtonEvent, button, down, "") {
|
| + return arg.button() == button && arg.button_down() == down;
|
| }
|
|
|
| TEST_F(ClientSessionTest, InputStubFilter) {
|
| @@ -213,16 +213,23 @@ TEST_F(ClientSessionTest, RestoreEventState) {
|
| mousedown.set_button(protocol::MouseEvent::BUTTON_LEFT);
|
| mousedown.set_button_down(true);
|
|
|
| - client_session_->RecordKeyEvent(key1);
|
| - client_session_->RecordKeyEvent(key2);
|
| - client_session_->RecordMouseButtonState(mousedown);
|
| -
|
| + InSequence s;
|
| + EXPECT_CALL(host_event_stub_, InjectKeyEvent(EqualsKeyEvent(1, true)));
|
| + EXPECT_CALL(host_event_stub_, InjectKeyEvent(EqualsKeyEvent(2, true)));
|
| + EXPECT_CALL(host_event_stub_, InjectMouseEvent(EqualsMouseButtonEvent(
|
| + protocol::MouseEvent::BUTTON_LEFT, true)));
|
| EXPECT_CALL(host_event_stub_, InjectKeyEvent(EqualsKeyEvent(1, false)));
|
| EXPECT_CALL(host_event_stub_, InjectKeyEvent(EqualsKeyEvent(2, false)));
|
| - EXPECT_CALL(host_event_stub_, InjectMouseEvent(EqualsMouseUpEvent(
|
| - protocol::MouseEvent::BUTTON_LEFT)));
|
| + EXPECT_CALL(host_event_stub_, InjectMouseEvent(EqualsMouseButtonEvent(
|
| + protocol::MouseEvent::BUTTON_LEFT, false)));
|
|
|
| - client_session_->RestoreEventState();
|
| + client_session_->OnConnectionOpened(client_session_->connection());
|
| +
|
| + client_session_->InjectKeyEvent(key1);
|
| + client_session_->InjectKeyEvent(key2);
|
| + client_session_->InjectMouseEvent(mousedown);
|
| +
|
| + client_session_->Disconnect();
|
| }
|
|
|
| TEST_F(ClientSessionTest, ClampMouseEvents) {
|
|
|