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/remote_security_key_ipc_client.h" | 5 #include "remoting/host/security_key/remote_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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 std::string last_message_received_; | 95 std::string last_message_received_; |
96 | 96 |
97 private: | 97 private: |
98 DISALLOW_COPY_AND_ASSIGN(RemoteSecurityKeyIpcClientTest); | 98 DISALLOW_COPY_AND_ASSIGN(RemoteSecurityKeyIpcClientTest); |
99 }; | 99 }; |
100 | 100 |
101 RemoteSecurityKeyIpcClientTest::RemoteSecurityKeyIpcClientTest() | 101 RemoteSecurityKeyIpcClientTest::RemoteSecurityKeyIpcClientTest() |
102 : run_loop_(new base::RunLoop()), | 102 : run_loop_(new base::RunLoop()), |
103 fake_ipc_server_( | 103 fake_ipc_server_( |
104 kTestConnectionId, | 104 kTestConnectionId, |
| 105 /*peer_session_id=*/UINT32_MAX, |
105 /*initial_connect_timeout=*/base::TimeDelta::FromMilliseconds(500), | 106 /*initial_connect_timeout=*/base::TimeDelta::FromMilliseconds(500), |
106 base::Bind(&RemoteSecurityKeyIpcClientTest::SendMessageToClient, | 107 base::Bind(&RemoteSecurityKeyIpcClientTest::SendMessageToClient, |
107 base::Unretained(this)), | 108 base::Unretained(this)), |
108 base::Bind(&RemoteSecurityKeyIpcClientTest::OperationComplete, | 109 base::Bind(&RemoteSecurityKeyIpcClientTest::OperationComplete, |
109 base::Unretained(this), | 110 base::Unretained(this), |
110 /*failed=*/false)) {} | 111 /*failed=*/false)) {} |
111 | 112 |
112 RemoteSecurityKeyIpcClientTest::~RemoteSecurityKeyIpcClientTest() {} | 113 RemoteSecurityKeyIpcClientTest::~RemoteSecurityKeyIpcClientTest() {} |
113 | 114 |
114 void RemoteSecurityKeyIpcClientTest::SetUp() { | 115 void RemoteSecurityKeyIpcClientTest::SetUp() { |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 remote_security_key_ipc_client_.SetExpectedIpcServerSessionIdForTest( | 346 remote_security_key_ipc_client_.SetExpectedIpcServerSessionIdForTest( |
346 session_id_ + 1); | 347 session_id_ + 1); |
347 | 348 |
348 // Attempting to establish a connection should fail here since the IPC Server | 349 // Attempting to establish a connection should fail here since the IPC Server |
349 // is 'running' in a different session than expected. | 350 // is 'running' in a different session than expected. |
350 EstablishConnection(/*expect_success=*/false); | 351 EstablishConnection(/*expect_success=*/false); |
351 } | 352 } |
352 #endif // defined(OS_WIN) | 353 #endif // defined(OS_WIN) |
353 | 354 |
354 } // namespace remoting | 355 } // namespace remoting |
OLD | NEW |