| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "remoting/base/constants.h" | 5 #include "remoting/base/constants.h" |
| 6 #include "remoting/host/client_session.h" | 6 #include "remoting/host/client_session.h" |
| 7 #include "remoting/host/host_mock_objects.h" | 7 #include "remoting/host/host_mock_objects.h" |
| 8 #include "remoting/protocol/protocol_mock_objects.h" | 8 #include "remoting/protocol/protocol_mock_objects.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // MockSession won't trigger OnConnectionClosed, so fake it. | 59 // MockSession won't trigger OnConnectionClosed, so fake it. |
| 60 client_session_->OnConnectionClosed(client_session_->connection(), | 60 client_session_->OnConnectionClosed(client_session_->connection(), |
| 61 protocol::OK); | 61 protocol::OK); |
| 62 } | 62 } |
| 63 | 63 |
| 64 SkISize default_screen_size_; | 64 SkISize default_screen_size_; |
| 65 MessageLoop message_loop_; | 65 MessageLoop message_loop_; |
| 66 std::string client_jid_; | 66 std::string client_jid_; |
| 67 MockHostStub host_stub_; | 67 MockHostStub host_stub_; |
| 68 MockHostEventStub host_event_stub_; | 68 MockHostEventStub host_event_stub_; |
| 69 MockCapturer capturer_; | 69 MockVideoFrameCapturer capturer_; |
| 70 MockClientSessionEventHandler session_event_handler_; | 70 MockClientSessionEventHandler session_event_handler_; |
| 71 scoped_ptr<ClientSession> client_session_; | 71 scoped_ptr<ClientSession> client_session_; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 MATCHER_P2(EqualsClipboardEvent, m, d, "") { | 74 MATCHER_P2(EqualsClipboardEvent, m, d, "") { |
| 75 return (strcmp(arg.mime_type().c_str(), m) == 0 && | 75 return (strcmp(arg.mime_type().c_str(), m) == 0 && |
| 76 memcmp(arg.data().data(), d, arg.data().size()) == 0); | 76 memcmp(arg.data().data(), d, arg.data().size()) == 0); |
| 77 } | 77 } |
| 78 | 78 |
| 79 TEST_F(ClientSessionTest, ClipboardStubFilter) { | 79 TEST_F(ClientSessionTest, ClipboardStubFilter) { |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 EXPECT_CALL(host_event_stub_, InjectMouseEvent(EqualsMouseEvent( | 271 EXPECT_CALL(host_event_stub_, InjectMouseEvent(EqualsMouseEvent( |
| 272 expected_x[i], expected_y[j]))); | 272 expected_x[i], expected_y[j]))); |
| 273 client_session_->InjectMouseEvent(event); | 273 client_session_->InjectMouseEvent(event); |
| 274 } | 274 } |
| 275 } | 275 } |
| 276 | 276 |
| 277 DisconnectClientSession(); | 277 DisconnectClientSession(); |
| 278 } | 278 } |
| 279 | 279 |
| 280 } // namespace remoting | 280 } // namespace remoting |
| OLD | NEW |