| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 // MockSession won't trigger OnConnectionClosed, so fake it. | 58 // MockSession won't trigger OnConnectionClosed, so fake it. |
| 59 client_session_->OnConnectionClosed(client_session_->connection(), | 59 client_session_->OnConnectionClosed(client_session_->connection(), |
| 60 protocol::OK); | 60 protocol::OK); |
| 61 } | 61 } |
| 62 | 62 |
| 63 SkISize default_screen_size_; | 63 SkISize default_screen_size_; |
| 64 MessageLoop message_loop_; | 64 MessageLoop message_loop_; |
| 65 std::string client_jid_; | 65 std::string client_jid_; |
| 66 MockHostStub host_stub_; | 66 MockHostStub host_stub_; |
| 67 MockHostEventStub host_event_stub_; | 67 MockHostEventStub host_event_stub_; |
| 68 MockCapturer capturer_; | 68 MockVideoFrameCapturer capturer_; |
| 69 MockClientSessionEventHandler session_event_handler_; | 69 MockClientSessionEventHandler session_event_handler_; |
| 70 scoped_ptr<ClientSession> client_session_; | 70 scoped_ptr<ClientSession> client_session_; |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 MATCHER_P2(EqualsClipboardEvent, m, d, "") { | 73 MATCHER_P2(EqualsClipboardEvent, m, d, "") { |
| 74 return (strcmp(arg.mime_type().c_str(), m) == 0 && | 74 return (strcmp(arg.mime_type().c_str(), m) == 0 && |
| 75 memcmp(arg.data().data(), d, arg.data().size()) == 0); | 75 memcmp(arg.data().data(), d, arg.data().size()) == 0); |
| 76 } | 76 } |
| 77 | 77 |
| 78 TEST_F(ClientSessionTest, ClipboardStubFilter) { | 78 TEST_F(ClientSessionTest, ClipboardStubFilter) { |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 EXPECT_CALL(host_event_stub_, InjectMouseEvent(EqualsMouseEvent( | 270 EXPECT_CALL(host_event_stub_, InjectMouseEvent(EqualsMouseEvent( |
| 271 expected_x[i], expected_y[j]))); | 271 expected_x[i], expected_y[j]))); |
| 272 client_session_->InjectMouseEvent(event); | 272 client_session_->InjectMouseEvent(event); |
| 273 } | 273 } |
| 274 } | 274 } |
| 275 | 275 |
| 276 DisconnectClientSession(); | 276 DisconnectClientSession(); |
| 277 } | 277 } |
| 278 | 278 |
| 279 } // namespace remoting | 279 } // namespace remoting |
| OLD | NEW |