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" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
14 #include "ipc/ipc_channel.h" | 14 #include "ipc/ipc_channel.h" |
15 #include "remoting/host/security_key/fake_ipc_security_key_auth_handler.h" | 15 #include "remoting/host/security_key/fake_ipc_security_key_auth_handler.h" |
16 #include "remoting/host/security_key/fake_security_key_ipc_server.h" | 16 #include "remoting/host/security_key/fake_security_key_ipc_server.h" |
17 #include "remoting/host/security_key/security_key_ipc_constants.h" | 17 #include "remoting/host/security_key/security_key_ipc_constants.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 | 19 |
20 namespace { | 20 namespace { |
21 const int kTestConnectionId = 1; | 21 const int kTestConnectionId = 1; |
22 const char kNonexistentIpcChannelName[] = "Nonexistent_IPC_Channel"; | 22 const char kNonexistentIpcChannelName[] = "Nonexistent_IPC_Channel"; |
23 const char kValidIpcChannelName[] = "Security_Key_Ipc_Client_Test_Channel."; | 23 const char kValidIpcChannelName[] = "SecurityKeyIpcClientTest"; |
24 const int kLargeMessageSizeBytes = 256 * 1024; | 24 const int kLargeMessageSizeBytes = 256 * 1024; |
25 } // namespace | 25 } // namespace |
26 | 26 |
27 namespace remoting { | 27 namespace remoting { |
28 | 28 |
29 class SecurityKeyIpcClientTest : public testing::Test { | 29 class SecurityKeyIpcClientTest : public testing::Test { |
30 public: | 30 public: |
31 SecurityKeyIpcClientTest(); | 31 SecurityKeyIpcClientTest(); |
32 ~SecurityKeyIpcClientTest() override; | 32 ~SecurityKeyIpcClientTest() override; |
33 | 33 |
(...skipping 301 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 |