#include "net/socket/socks_client_socket.h"
#include <memory>
#include <utility>
#include "base/containers/span.h"
#include "base/memory/raw_ptr.h"
#include "build/build_config.h"
#include "net/base/address_list.h"
#include "net/base/test_completion_callback.h"
#include "net/base/winsock_init.h"
#include "net/dns/host_resolver.h"
#include "net/dns/mock_host_resolver.h"
#include "net/dns/public/secure_dns_policy.h"
#include "net/log/net_log_event_type.h"
#include "net/log/test_net_log.h"
#include "net/log/test_net_log_util.h"
#include "net/socket/client_socket_factory.h"
#include "net/socket/socket_test_util.h"
#include "net/socket/tcp_client_socket.h"
#include "net/test/gtest_util.h"
#include "net/test/test_with_task_environment.h"
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
IsError;
IsOk;
namespace net {
class NetLog;
class SOCKSClientSocketTest : public PlatformTest, public WithTaskEnvironment { … };
SOCKSClientSocketTest::SOCKSClientSocketTest()
: … { … }
void SOCKSClientSocketTest::SetUp() { … }
std::unique_ptr<SOCKSClientSocket> SOCKSClientSocketTest::BuildMockSocket(
base::span<const MockRead> reads,
base::span<const MockWrite> writes,
HostResolver* host_resolver,
const std::string& hostname,
int port,
NetLog* net_log) { … }
TEST_F(SOCKSClientSocketTest, CompleteHandshake) { … }
TEST_F(SOCKSClientSocketTest, CancelPendingReadIfReady) { … }
TEST_F(SOCKSClientSocketTest, HandshakeFailures) { … }
TEST_F(SOCKSClientSocketTest, PartialServerReads) { … }
TEST_F(SOCKSClientSocketTest, PartialClientWrites) { … }
TEST_F(SOCKSClientSocketTest, FailedSocketRead) { … }
TEST_F(SOCKSClientSocketTest, FailedDNS) { … }
TEST_F(SOCKSClientSocketTest, DisconnectWhileHostResolveInProgress) { … }
TEST_F(SOCKSClientSocketTest, NoIPv6) { … }
TEST_F(SOCKSClientSocketTest, NoIPv6RealResolver) { … }
TEST_F(SOCKSClientSocketTest, Tag) { … }
TEST_F(SOCKSClientSocketTest, SetSecureDnsPolicy) { … }
}