#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "net/socket/transport_connect_job.h"
#include <memory>
#include <string>
#include <vector>
#include "base/memory/ref_counted.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "net/base/address_family.h"
#include "net/base/features.h"
#include "net/base/host_port_pair.h"
#include "net/base/ip_address.h"
#include "net/base/ip_endpoint.h"
#include "net/base/net_errors.h"
#include "net/cert/mock_cert_verifier.h"
#include "net/dns/mock_host_resolver.h"
#include "net/dns/public/secure_dns_policy.h"
#include "net/http/transport_security_state.h"
#include "net/log/net_log.h"
#include "net/socket/connect_job_test_util.h"
#include "net/socket/connection_attempts.h"
#include "net/socket/ssl_client_socket.h"
#include "net/socket/stream_socket.h"
#include "net/socket/transport_client_socket_pool_test_util.h"
#include "net/ssl/ssl_config_service.h"
#include "net/ssl/test_ssl_config_service.h"
#include "net/test/gtest_util.h"
#include "net/test/test_with_task_environment.h"
#include "net/url_request/static_http_user_agent_settings.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/scheme_host_port.h"
#include "url/url_constants.h"
namespace net {
namespace {
const char kHostName[] = …;
IPAddress ParseIP(const std::string& ip) { … }
class TransportConnectJobTest : public WithTaskEnvironment,
public testing::Test { … };
TEST_F(TransportConnectJobTest, HostResolutionFailure) { … }
TEST_F(TransportConnectJobTest, ConnectionFailure) { … }
TEST_F(TransportConnectJobTest, HostResolutionTimeout) { … }
TEST_F(TransportConnectJobTest, ConnectionTimeout) { … }
TEST_F(TransportConnectJobTest, ConnectionSuccess) { … }
TEST_F(TransportConnectJobTest, LoadState) { … }
TEST_F(TransportConnectJobTest, HandlesHttpsEndpoint) { … }
TEST_F(TransportConnectJobTest, HandlesNonStandardEndpoint) { … }
TEST_F(TransportConnectJobTest, SecureDnsPolicy) { … }
TEST_F(TransportConnectJobTest, IPv6FallbackSocketIPv4FinishesFirst) { … }
TEST_F(TransportConnectJobTest, IPv6FallbackSocketIPv6FinishesFirst) { … }
TEST_F(TransportConnectJobTest, IPv6NoIPv4AddressesToFallbackTo) { … }
TEST_F(TransportConnectJobTest, IPv4HasNoFallback) { … }
TEST_F(TransportConnectJobTest, DnsAliases) { … }
TEST_F(TransportConnectJobTest, NoAdditionalDnsAliases) { … }
TEST_F(TransportConnectJobTest, EndpointResult) { … }
TEST_F(TransportConnectJobTest, MultipleRoutesFallback) { … }
TEST_F(TransportConnectJobTest, MultipleRoutesIPV4Fallback) { … }
TEST_F(TransportConnectJobTest, MultipleRoutesSuspended) { … }
TEST_F(TransportConnectJobTest, NoAlpnProtocols) { … }
TEST_F(TransportConnectJobTest, MultipleRoutesAllFailed) { … }
TEST_F(TransportConnectJobTest, NoUsableRoutes) { … }
TEST_F(TransportConnectJobTest, LastRouteUnusable) { … }
TEST_F(TransportConnectJobTest, GetHostResolverEndpointResult) { … }
TEST_F(TransportConnectJobTest, SvcbReliantIfEch) { … }
TEST_F(TransportConnectJobTest, SvcbOptionalIfEchDisabledConfig) { … }
TEST_F(TransportConnectJobTest, SvcbOptionalIfEchInconsistent) { … }
TEST_F(TransportConnectJobTest, EndpointResultOverride) { … }
TEST_F(TransportConnectJobTest, DedupIPEndPoints) { … }
}
}