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

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

Issue 2317123003: misc files R-U: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Just rebased Created 4 years, 2 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 | « remoting/host/linux/certificate_watcher_unittest.cc ('k') | rlz/lib/rlz_lib_test.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 <stddef.h> 5 #include <stddef.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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 } 51 }
52 52
53 } // namespace 53 } // namespace
54 54
55 class SecurityKeyAuthHandlerPosixTest : public testing::Test { 55 class SecurityKeyAuthHandlerPosixTest : public testing::Test {
56 public: 56 public:
57 SecurityKeyAuthHandlerPosixTest() 57 SecurityKeyAuthHandlerPosixTest()
58 : run_loop_(new base::RunLoop()), 58 : run_loop_(new base::RunLoop()),
59 file_thread_("SecurityKeyAuthHandlerPosixTest_FileThread") { 59 file_thread_("SecurityKeyAuthHandlerPosixTest_FileThread") {
60 EXPECT_TRUE(temp_dir_.CreateUniqueTempDir()); 60 EXPECT_TRUE(temp_dir_.CreateUniqueTempDir());
61 socket_path_ = temp_dir_.path().Append(kSocketFilename); 61 socket_path_ = temp_dir_.GetPath().Append(kSocketFilename);
62 remoting::SecurityKeyAuthHandler::SetSecurityKeySocketName(socket_path_); 62 remoting::SecurityKeyAuthHandler::SetSecurityKeySocketName(socket_path_);
63 63
64 EXPECT_TRUE(file_thread_.StartWithOptions( 64 EXPECT_TRUE(file_thread_.StartWithOptions(
65 base::Thread::Options(base::MessageLoop::TYPE_IO, 0))); 65 base::Thread::Options(base::MessageLoop::TYPE_IO, 0)));
66 66
67 send_message_callback_ = 67 send_message_callback_ =
68 base::Bind(&SecurityKeyAuthHandlerPosixTest::SendMessageToClient, 68 base::Bind(&SecurityKeyAuthHandlerPosixTest::SendMessageToClient,
69 base::Unretained(this)); 69 base::Unretained(this));
70 70
71 auth_handler_ = remoting::SecurityKeyAuthHandler::Create( 71 auth_handler_ = remoting::SecurityKeyAuthHandler::Create(
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 net::UnixDomainClientSocket client_socket(socket_path_.value(), false); 258 net::UnixDomainClientSocket client_socket(socket_path_.value(), false);
259 net::TestCompletionCallback connect_callback; 259 net::TestCompletionCallback connect_callback;
260 int rv = client_socket.Connect(connect_callback.callback()); 260 int rv = client_socket.Connect(connect_callback.callback());
261 ASSERT_EQ(net::OK, connect_callback.GetResult(rv)); 261 ASSERT_EQ(net::OK, connect_callback.GetResult(rv));
262 262
263 auth_handler_->SendErrorAndCloseConnection(1); 263 auth_handler_->SendErrorAndCloseConnection(1);
264 ASSERT_EQ(0u, auth_handler_->GetActiveConnectionCountForTest()); 264 ASSERT_EQ(0u, auth_handler_->GetActiveConnectionCountForTest());
265 } 265 }
266 266
267 } // namespace remoting 267 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/linux/certificate_watcher_unittest.cc ('k') | rlz/lib/rlz_lib_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698