#include "net/socket/socks_connect_job.h"
#include "base/containers/flat_set.h"
#include "base/containers/span.h"
#include "base/functional/callback.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "net/base/load_states.h"
#include "net/base/load_timing_info.h"
#include "net/base/load_timing_info_test_util.h"
#include "net/base/net_errors.h"
#include "net/base/network_isolation_key.h"
#include "net/dns/mock_host_resolver.h"
#include "net/dns/public/secure_dns_policy.h"
#include "net/log/net_log.h"
#include "net/socket/client_socket_factory.h"
#include "net/socket/client_socket_handle.h"
#include "net/socket/connect_job_test_util.h"
#include "net/socket/socket_tag.h"
#include "net/socket/socket_test_util.h"
#include "net/socket/socks_connect_job.h"
#include "net/socket/transport_client_socket_pool_test_util.h"
#include "net/socket/transport_connect_job.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 "net/url_request/static_http_user_agent_settings.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace net {
namespace {
const char kProxyHostName[] = …;
const int kProxyPort = …;
constexpr base::TimeDelta kTinyTime = …;
class SOCKSConnectJobTest : public testing::Test, public WithTaskEnvironment { … };
TEST_F(SOCKSConnectJobTest, HostResolutionFailure) { … }
TEST_F(SOCKSConnectJobTest, HostResolutionFailureSOCKS4Endpoint) { … }
TEST_F(SOCKSConnectJobTest, HandshakeError) { … }
TEST_F(SOCKSConnectJobTest, SOCKS4) { … }
TEST_F(SOCKSConnectJobTest, SOCKS5) { … }
TEST_F(SOCKSConnectJobTest, HasEstablishedConnection) { … }
TEST_F(SOCKSConnectJobTest, TimeoutDuringDnsResolution) { … }
TEST_F(SOCKSConnectJobTest, TimeoutDuringHandshake) { … }
TEST_F(SOCKSConnectJobTest, Priority) { … }
TEST_F(SOCKSConnectJobTest, SecureDnsPolicy) { … }
TEST_F(SOCKSConnectJobTest, ConnectTiming) { … }
TEST_F(SOCKSConnectJobTest, CancelDuringDnsResolution) { … }
TEST_F(SOCKSConnectJobTest, CancelDuringConnect) { … }
TEST_F(SOCKSConnectJobTest, CancelDuringHandshake) { … }
}
}