#include <stddef.h>
#include <sys/socket.h>
#include <cstdint>
#include <memory>
#include <string>
#include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "base/threading/thread.h"
#include "base/time/time.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/base/sockaddr_storage.h"
#include "net/base/sockaddr_util_posix.h"
#include "net/base/test_completion_callback.h"
#include "net/socket/socket_posix.h"
#include "net/socket/unix_domain_client_socket_posix.h"
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "remoting/host/security_key/security_key_auth_handler.h"
#include "remoting/host/security_key/security_key_socket.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace remoting {
namespace {
const char kSocketFilename[] = …;
const uint8_t kRequestData[] = …;
const uint8_t kResponseData[] = …;
const uint8_t kSshErrorData[] = …;
void RunUntilIdle() { … }
}
class SecurityKeyAuthHandlerPosixTest : public testing::Test { … };
TEST_F(SecurityKeyAuthHandlerPosixTest, HandleSingleRequest) { … }
TEST_F(SecurityKeyAuthHandlerPosixTest, HandleSingleRequestWithEof) { … }
TEST_F(SecurityKeyAuthHandlerPosixTest, HandleTwoRequests) { … }
TEST_F(SecurityKeyAuthHandlerPosixTest, HandleTwoIndependentRequests) { … }
TEST_F(SecurityKeyAuthHandlerPosixTest, HandleReadTimeout) { … }
TEST_F(SecurityKeyAuthHandlerPosixTest, HandleClientErrorMessage) { … }
}