chromium/net/socket/connect_job_factory_unittest.cc

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "net/socket/connect_job_factory.h"

#include <memory>
#include <optional>
#include <vector>

#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "net/base/host_port_pair.h"
#include "net/base/network_isolation_key.h"
#include "net/base/privacy_mode.h"
#include "net/base/proxy_chain.h"
#include "net/base/proxy_server.h"
#include "net/base/request_priority.h"
#include "net/dns/public/secure_dns_policy.h"
#include "net/http/http_proxy_connect_job.h"
#include "net/log/net_log_with_source.h"
#include "net/socket/connect_job.h"
#include "net/socket/connect_job_test_util.h"
#include "net/socket/next_proto.h"
#include "net/socket/socket_tag.h"
#include "net/socket/socks_connect_job.h"
#include "net/socket/ssl_connect_job.h"
#include "net/socket/transport_connect_job.h"
#include "net/socket/websocket_endpoint_lock_manager.h"
#include "net/ssl/ssl_config.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"
#include "url/scheme_host_port.h"
#include "url/url_constants.h"

namespace net {
namespace {

// Mock HttpProxyConnectJob::Factory that records the `params` used and then
// passes on to a real factory.
class TestHttpProxyConnectJobFactory : public HttpProxyConnectJob::Factory {};

// Mock SOCKSConnectJob::Factory that records the `params` used and then passes
// on to a real factory.
class TestSocksConnectJobFactory : public SOCKSConnectJob::Factory {};

// Mock SSLConnectJob::Factory that records the `params` used and then passes on
// to a real factory.
class TestSslConnectJobFactory : public SSLConnectJob::Factory {};

// Mock TransportConnectJob::Factory that records the `params` used and then
// passes on to a real factory.
class TestTransportConnectJobFactory : public TransportConnectJob::Factory {};

class ConnectJobFactoryTest : public TestWithTaskEnvironment {};

TEST_F(ConnectJobFactoryTest, CreateConnectJob) {}

TEST_F(ConnectJobFactoryTest, CreateConnectJobWithoutScheme) {}

TEST_F(ConnectJobFactoryTest, CreateHttpsConnectJob) {}

TEST_F(ConnectJobFactoryTest, CreateHttpsConnectJobForHttp11) {}

TEST_F(ConnectJobFactoryTest, CreateHttpsConnectJobWithoutScheme) {}

TEST_F(ConnectJobFactoryTest, CreateHttpProxyConnectJob) {}

TEST_F(ConnectJobFactoryTest, CreateHttpProxyConnectJobWithoutScheme) {}

TEST_F(ConnectJobFactoryTest, CreateHttpProxyConnectJobForHttps) {}

TEST_F(ConnectJobFactoryTest, CreateHttpProxyConnectJobForHttpsWithoutScheme) {}

TEST_F(ConnectJobFactoryTest, CreateHttpsProxyConnectJob) {}

TEST_F(ConnectJobFactoryTest, CreateHttpsProxyConnectJobWithoutScheme) {}

TEST_F(ConnectJobFactoryTest, CreateNestedHttpsProxyConnectJob) {}

TEST_F(ConnectJobFactoryTest, CreateNestedHttpsProxyConnectJobWithoutScheme) {}

TEST_F(ConnectJobFactoryTest, CreateNestedHttpsProxyConnectJobForHttps) {}

TEST_F(ConnectJobFactoryTest,
       CreateNestedHttpsProxyConnectJobForHttpsWithoutScheme) {}

TEST_F(ConnectJobFactoryTest, CreateSocksProxyConnectJob) {}

TEST_F(ConnectJobFactoryTest, CreateSocksProxyConnectJobWithoutScheme) {}

TEST_F(ConnectJobFactoryTest, CreateWebsocketConnectJob) {}

TEST_F(ConnectJobFactoryTest, CreateWebsocketConnectJobWithoutScheme) {}

}  // namespace
}  // namespace net