| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/host/security_key/security_key_ipc_client.h" | 5 #include "remoting/host/security_key/security_key_ipc_client.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 std::string last_message_received_; | 94 std::string last_message_received_; |
| 95 | 95 |
| 96 private: | 96 private: |
| 97 DISALLOW_COPY_AND_ASSIGN(SecurityKeyIpcClientTest); | 97 DISALLOW_COPY_AND_ASSIGN(SecurityKeyIpcClientTest); |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 SecurityKeyIpcClientTest::SecurityKeyIpcClientTest() | 100 SecurityKeyIpcClientTest::SecurityKeyIpcClientTest() |
| 101 : run_loop_(new base::RunLoop()), | 101 : run_loop_(new base::RunLoop()), |
| 102 fake_ipc_server_( | 102 fake_ipc_server_( |
| 103 kTestConnectionId, | 103 kTestConnectionId, |
| 104 /*peer_session_id=*/UINT32_MAX, | 104 /*client_session_details=*/nullptr, |
| 105 /*initial_connect_timeout=*/base::TimeDelta::FromMilliseconds(500), | 105 /*initial_connect_timeout=*/base::TimeDelta::FromMilliseconds(500), |
| 106 base::Bind(&SecurityKeyIpcClientTest::SendMessageToClient, | 106 base::Bind(&SecurityKeyIpcClientTest::SendMessageToClient, |
| 107 base::Unretained(this)), | 107 base::Unretained(this)), |
| 108 base::Bind(&SecurityKeyIpcClientTest::OperationComplete, | 108 base::Bind(&SecurityKeyIpcClientTest::OperationComplete, |
| 109 base::Unretained(this), | 109 base::Unretained(this), |
| 110 /*failed=*/false)) {} | 110 /*failed=*/false)) {} |
| 111 | 111 |
| 112 SecurityKeyIpcClientTest::~SecurityKeyIpcClientTest() {} | 112 SecurityKeyIpcClientTest::~SecurityKeyIpcClientTest() {} |
| 113 | 113 |
| 114 void SecurityKeyIpcClientTest::SetUp() { | 114 void SecurityKeyIpcClientTest::SetUp() { |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 security_key_ipc_client_.SetExpectedIpcServerSessionIdForTest(session_id_ + | 335 security_key_ipc_client_.SetExpectedIpcServerSessionIdForTest(session_id_ + |
| 336 1); | 336 1); |
| 337 | 337 |
| 338 // Attempting to establish a connection should fail here since the IPC Server | 338 // Attempting to establish a connection should fail here since the IPC Server |
| 339 // is 'running' in a different session than expected. | 339 // is 'running' in a different session than expected. |
| 340 EstablishConnection(/*expect_success=*/false); | 340 EstablishConnection(/*expect_success=*/false); |
| 341 } | 341 } |
| 342 #endif // defined(OS_WIN) | 342 #endif // defined(OS_WIN) |
| 343 | 343 |
| 344 } // namespace remoting | 344 } // namespace remoting |
| OLD | NEW |