#include "content/browser/interest_group/auction_url_loader_factory_proxy.h"
#include <stdint.h>
#include <vector>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/ref_counted.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/test/bind.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "content/browser/interest_group/auction_worklet_manager.h"
#include "content/browser/interest_group/subresource_url_builder.h"
#include "content/public/browser/render_frame_host.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "net/base/isolation_info.h"
#include "net/base/load_flags.h"
#include "net/base/network_anonymization_key.h"
#include "net/base/schemeful_site.h"
#include "net/cookies/site_for_cookies.h"
#include "net/http/http_request_headers.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/mojom/client_security_state.mojom.h"
#include "services/network/public/mojom/ip_address_space.mojom.h"
#include "services/network/public/mojom/url_loader_factory.mojom.h"
#include "services/network/test/test_url_loader_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/interest_group/auction_config.h"
#include "url/gurl.h"
#include "url/origin.h"
namespace content {
namespace {
WorkletHandle;
BundleSubresourceInfo;
const char kScriptUrl[] = …;
const char kWasmUrl[] = …;
const char kTrustedSignalsBaseUrl[] = …;
const char kTrustedSignalsUrl[] = …;
const char kAdAuctionTrustedSignalsContentType[] = …;
const char kAcceptJavascript[] = …;
const char kAcceptJson[] = …;
const char kAcceptAdAuctionTrustedSignals[] = …;
const char kAcceptOther[] = …;
const char kAcceptWasm[] = …;
const char kBundleUrl[] = …;
const int kRenderProcessId = …;
const char kSubresourceUrl1[] = …;
const char kSubresourceUrl2[] = …;
const char kSubresourceUrl3[] = …;
const WorkletHandle* const kWorkletHandle1 = …;
const WorkletHandle* const kWorkletHandle2 = …;
BundleSubresourceInfo MakeBundleSubresourceInfo(
const std::string& bundle_url,
const std::string& subresource_url) { … }
}
class AuctionUrlLoaderFactoryProxyTest : public testing::TestWithParam<bool> { … };
TEST_P(AuctionUrlLoaderFactoryProxyTest, Basic) { … }
TEST_P(AuctionUrlLoaderFactoryProxyTest, ForceReload) { … }
TEST_P(AuctionUrlLoaderFactoryProxyTest, NoWasmUrl) { … }
TEST_P(AuctionUrlLoaderFactoryProxyTest, NoTrustedSignalsUrl) { … }
TEST_P(AuctionUrlLoaderFactoryProxyTest, TrustedSignalsUrl) { … }
TEST_P(AuctionUrlLoaderFactoryProxyTest, SellerSignalsNetworkIsolationKey) { … }
TEST_P(AuctionUrlLoaderFactoryProxyTest, SameUrl) { … }
TEST_P(AuctionUrlLoaderFactoryProxyTest, ClientSecurityState) { … }
TEST_P(AuctionUrlLoaderFactoryProxyTest, BasicSubresourceBundles1) { … }
TEST_P(AuctionUrlLoaderFactoryProxyTest, BasicSubresourceBundles2) { … }
TEST_P(AuctionUrlLoaderFactoryProxyTest, AdditionalBidCors) { … }
INSTANTIATE_TEST_SUITE_P(…);
}