Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: remoting/host/security_key/security_key_ipc_client_unittest.cc

Issue 2161013003: Changing the default path for RemoteSecurityKeyIpcServer test channels (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rename
Patch Set: Fixing a potential problem where the socket name is longer than 104 chars Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | remoting/host/security_key/security_key_ipc_constants.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | remoting/host/security_key/security_key_ipc_constants.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698