#include "services/network/cors/cors_url_loader_factory.h"
#include <memory>
#include "base/memory/raw_ptr.h"
#include "base/test/task_environment.h"
#include "components/privacy_sandbox/masked_domain_list/masked_domain_list.pb.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "mojo/public/cpp/test_support/fake_message_dispatch_context.h"
#include "mojo/public/cpp/test_support/test_utils.h"
#include "net/base/load_flags.h"
#include "net/proxy_resolution/configured_proxy_resolution_service.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_builder.h"
#include "services/network/cors/cors_url_loader_test_util.h"
#include "services/network/is_browser_initiated.h"
#include "services/network/network_context.h"
#include "services/network/network_service.h"
#include "services/network/prefetch_matching_url_loader_factory.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/mojom/network_context.mojom-forward.h"
#include "services/network/public/mojom/url_loader.mojom.h"
#include "services/network/public/mojom/url_loader_factory.mojom.h"
#include "services/network/resource_scheduler/resource_scheduler.h"
#include "services/network/resource_scheduler/resource_scheduler_client.h"
#include "services/network/test/fake_test_cert_verifier_params_factory.h"
#include "services/network/test/test_url_loader_client.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
#include "url/origin.h"
namespace network::cors {
namespace {
constexpr int kProcessId = …;
constexpr int kRequestId = …;
}
class CorsURLLoaderFactoryTest : public testing::Test { … };
TEST_F(CorsURLLoaderFactoryTest, DestructionOrder) { … }
TEST_F(CorsURLLoaderFactoryTest, CleanupWithSharedCacheObjectInUse) { … }
TEST_F(CorsURLLoaderFactoryTest,
NavigationFromRendererWithBadRequestURLOrigin) { … }
TEST_F(CorsURLLoaderFactoryTest, NavigationFromRendererWithBadRedirectMode) { … }
TEST_F(CorsURLLoaderFactoryTest,
NavigationFromRendererWithBadRequestNavigationRedirectChain) { … }
TEST_F(CorsURLLoaderFactoryTest, NavigationRedirectChainWithBadMode) { … }
TEST_F(CorsURLLoaderFactoryTest, OriginalDestinationIsDocumentWithBadMode) { … }
TEST_F(CorsURLLoaderFactoryTest,
OriginalDestinationIsDocumentWithBadDestination) { … }
class RequireCrossSiteRequestForCookiesCorsURLLoaderFactoryTest
: public CorsURLLoaderFactoryTest { … };
TEST_F(RequireCrossSiteRequestForCookiesCorsURLLoaderFactoryTest,
NavigationWithSameSiteForCookies) { … }
TEST_F(RequireCrossSiteRequestForCookiesCorsURLLoaderFactoryTest,
NavigationWithCrossSiteForCookies) { … }
}