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

Unified Diff: remoting/host/security_key/security_key_auth_handler_linux_unittest.cc

Issue 2162083003: Renaming Gnubby and RemoteSecurityKey files/classes/members (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing a GYP build error 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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/security_key/security_key_auth_handler_linux_unittest.cc
diff --git a/remoting/host/security_key/gnubby_auth_handler_linux_unittest.cc b/remoting/host/security_key/security_key_auth_handler_linux_unittest.cc
similarity index 86%
rename from remoting/host/security_key/gnubby_auth_handler_linux_unittest.cc
rename to remoting/host/security_key/security_key_auth_handler_linux_unittest.cc
index 679d7184454ea8e1d7ec20cef5cbd5b6fe81bd34..1d36b286f5ff2c99241924b8ff2607afa4415bb7 100644
--- a/remoting/host/security_key/gnubby_auth_handler_linux_unittest.cc
+++ b/remoting/host/security_key/security_key_auth_handler_linux_unittest.cc
@@ -16,8 +16,8 @@
#include "net/base/net_errors.h"
#include "net/base/test_completion_callback.h"
#include "net/socket/unix_domain_client_socket_posix.h"
-#include "remoting/host/security_key/gnubby_auth_handler.h"
-#include "remoting/host/security_key/gnubby_socket.h"
+#include "remoting/host/security_key/security_key_auth_handler.h"
+#include "remoting/host/security_key/security_key_socket.h"
#include "remoting/proto/internal.pb.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -27,7 +27,7 @@ namespace {
const char kSocketFilename[] = "socket_for_testing";
-// Test gnubby request data.
+// Test security key request data.
const unsigned char kRequestData[] = {
0x00, 0x00, 0x00, 0x9a, 0x65, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x60, 0x90,
@@ -46,19 +46,19 @@ const unsigned char kRequestData[] = {
} // namespace
-class GnubbyAuthHandlerLinuxTest : public testing::Test {
+class SecurityKeyAuthHandlerLinuxTest : public testing::Test {
public:
- GnubbyAuthHandlerLinuxTest()
+ SecurityKeyAuthHandlerLinuxTest()
: run_loop_(new base::RunLoop()), last_connection_id_received_(-1) {
EXPECT_TRUE(temp_dir_.CreateUniqueTempDir());
socket_path_ = temp_dir_.path().Append(kSocketFilename);
- remoting::GnubbyAuthHandler::SetGnubbySocketName(socket_path_);
+ remoting::SecurityKeyAuthHandler::SetSecurityKeySocketName(socket_path_);
send_message_callback_ =
- base::Bind(&GnubbyAuthHandlerLinuxTest::SendMessageToClient,
+ base::Bind(&SecurityKeyAuthHandlerLinuxTest::SendMessageToClient,
base::Unretained(this));
- auth_handler_ =
- remoting::GnubbyAuthHandler::Create(nullptr, send_message_callback_);
+ auth_handler_ = remoting::SecurityKeyAuthHandler::Create(
+ nullptr, send_message_callback_);
}
void WaitForSendMessageToClient() {
@@ -118,9 +118,9 @@ class GnubbyAuthHandlerLinuxTest : public testing::Test {
std::unique_ptr<base::RunLoop> run_loop_;
// Object under test.
- std::unique_ptr<GnubbyAuthHandler> auth_handler_;
+ std::unique_ptr<SecurityKeyAuthHandler> auth_handler_;
- GnubbyAuthHandler::SendMessageCallback send_message_callback_;
+ SecurityKeyAuthHandler::SendMessageCallback send_message_callback_;
int last_connection_id_received_;
std::string last_message_received_;
@@ -130,13 +130,13 @@ class GnubbyAuthHandlerLinuxTest : public testing::Test {
base::Closure accept_callback_;
private:
- DISALLOW_COPY_AND_ASSIGN(GnubbyAuthHandlerLinuxTest);
+ DISALLOW_COPY_AND_ASSIGN(SecurityKeyAuthHandlerLinuxTest);
};
-TEST_F(GnubbyAuthHandlerLinuxTest, NotClosedAfterRequest) {
+TEST_F(SecurityKeyAuthHandlerLinuxTest, NotClosedAfterRequest) {
ASSERT_EQ(0u, auth_handler_->GetActiveConnectionCountForTest());
- auth_handler_->CreateGnubbyConnection();
+ auth_handler_->CreateSecurityKeyConnection();
net::UnixDomainClientSocket client_socket(socket_path_.value(), false);
net::TestCompletionCallback connect_callback;
@@ -155,10 +155,10 @@ TEST_F(GnubbyAuthHandlerLinuxTest, NotClosedAfterRequest) {
ASSERT_EQ(1u, auth_handler_->GetActiveConnectionCountForTest());
}
-TEST_F(GnubbyAuthHandlerLinuxTest, HandleTwoRequests) {
+TEST_F(SecurityKeyAuthHandlerLinuxTest, HandleTwoRequests) {
ASSERT_EQ(0u, auth_handler_->GetActiveConnectionCountForTest());
- auth_handler_->CreateGnubbyConnection();
+ auth_handler_->CreateSecurityKeyConnection();
net::UnixDomainClientSocket client_socket(socket_path_.value(), false);
net::TestCompletionCallback connect_callback;
@@ -185,10 +185,10 @@ TEST_F(GnubbyAuthHandlerLinuxTest, HandleTwoRequests) {
ASSERT_EQ(1u, auth_handler_->GetActiveConnectionCountForTest());
}
-TEST_F(GnubbyAuthHandlerLinuxTest, HandleTwoIndependentRequests) {
+TEST_F(SecurityKeyAuthHandlerLinuxTest, HandleTwoIndependentRequests) {
ASSERT_EQ(0u, auth_handler_->GetActiveConnectionCountForTest());
- auth_handler_->CreateGnubbyConnection();
+ auth_handler_->CreateSecurityKeyConnection();
net::UnixDomainClientSocket client_socket(socket_path_.value(), false);
net::TestCompletionCallback connect_callback;
@@ -220,9 +220,9 @@ TEST_F(GnubbyAuthHandlerLinuxTest, HandleTwoIndependentRequests) {
ASSERT_EQ(1u, auth_handler_->GetActiveConnectionCountForTest());
}
-TEST_F(GnubbyAuthHandlerLinuxTest, DidReadTimeout) {
+TEST_F(SecurityKeyAuthHandlerLinuxTest, DidReadTimeout) {
ASSERT_EQ(0u, auth_handler_->GetActiveConnectionCountForTest());
- auth_handler_->CreateGnubbyConnection();
+ auth_handler_->CreateSecurityKeyConnection();
net::UnixDomainClientSocket client_socket(socket_path_.value(), false);
net::TestCompletionCallback connect_callback;
@@ -232,9 +232,9 @@ TEST_F(GnubbyAuthHandlerLinuxTest, DidReadTimeout) {
ASSERT_EQ(0u, auth_handler_->GetActiveConnectionCountForTest());
}
-TEST_F(GnubbyAuthHandlerLinuxTest, ClientErrorMessageDelivered) {
+TEST_F(SecurityKeyAuthHandlerLinuxTest, ClientErrorMessageDelivered) {
ASSERT_EQ(0u, auth_handler_->GetActiveConnectionCountForTest());
- auth_handler_->CreateGnubbyConnection();
+ auth_handler_->CreateSecurityKeyConnection();
net::UnixDomainClientSocket client_socket(socket_path_.value(), false);
net::TestCompletionCallback connect_callback;

Powered by Google App Engine
This is Rietveld 408576698