chromium/content/browser/interest_group/interest_group_browsertest.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.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/342213636): Remove this and spanify to fix the errors.
#pragma allow_unsafe_buffers
#endif

#include "third_party/blink/public/common/interest_group/interest_group.h"

#include <stdint.h>

#include <algorithm>
#include <cmath>
#include <cstddef>
#include <optional>
#include <sstream>
#include <string>
#include <string_view>
#include <tuple>
#include <variant>
#include <vector>

#include "base/base64.h"
#include "base/base64url.h"
#include "base/command_line.h"
#include "base/containers/contains.h"
#include "base/containers/flat_map.h"
#include "base/containers/flat_set.h"
#include "base/feature_list.h"
#include "base/functional/callback.h"
#include "base/functional/callback_forward.h"
#include "base/json/json_reader.h"
#include "base/json/json_string_value_serializer.h"
#include "base/json/json_writer.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/run_loop.h"
#include "base/strings/escape.h"
#include "base/strings/pattern.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/synchronization/lock.h"
#include "base/test/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/mock_callback.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/test_timeouts.h"
#include "base/test/values_test_util.h"
#include "base/test/with_feature_override.h"
#include "base/thread_annotations.h"
#include "base/time/time.h"
#include "base/trace_event/trace_config.h"
#include "base/values.h"
#include "build/build_config.h"
#include "components/aggregation_service/aggregation_coordinator_utils.h"
#include "components/cbor/reader.h"
#include "components/network_session_configurator/common/network_switches.h"
#include "components/web_package/web_bundle_builder.h"
#include "content/browser/aggregation_service/aggregatable_report.h"
#include "content/browser/fenced_frame/fenced_frame.h"
#include "content/browser/fenced_frame/fenced_frame_url_mapping.h"
#include "content/browser/interest_group/ad_auction_page_data.h"
#include "content/browser/interest_group/ad_auction_service_impl.h"
#include "content/browser/interest_group/additional_bids_test_util.h"
#include "content/browser/interest_group/interest_group_features.h"
#include "content/browser/interest_group/interest_group_manager_impl.h"
#include "content/browser/interest_group/test_interest_group_observer.h"
#include "content/browser/private_aggregation/private_aggregation_manager_impl.h"
#include "content/browser/private_aggregation/private_aggregation_test_utils.h"
#include "content/browser/renderer_host/page_impl.h"
#include "content/browser/renderer_host/render_frame_host_impl.h"
#include "content/browser/storage_partition_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/common/features.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/site_isolation_policy.h"
#include "content/public/browser/tracing_controller.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_features.h"
#include "content/public/test/back_forward_cache_util.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_content_browser_client.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/public/test/test_frame_navigation_observer.h"
#include "content/public/test/test_navigation_observer.h"
#include "content/public/test/url_loader_monitor.h"
#include "content/services/auction_worklet/public/mojom/bidder_worklet.mojom.h"
#include "content/shell/browser/shell.h"
#include "content/test/content_browser_test_utils_internal.h"
#include "content/test/fenced_frame_test_utils.h"
#include "net/base/isolation_info.h"
#include "net/base/network_isolation_key.h"
#include "net/dns/mock_host_resolver.h"
#include "net/http/http_request_headers.h"
#include "net/http/http_status_code.h"
#include "net/test/embedded_test_server/controllable_http_response.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "net/test/embedded_test_server/http_request.h"
#include "net/test/embedded_test_server/http_response.h"
#include "net/test/embedded_test_server/request_handler_util.h"
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "services/data_decoder/public/cpp/test_support/in_process_data_decoder.h"
#include "services/network/public/cpp/features.h"
#include "services/network/public/cpp/network_switches.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/mojom/fetch_api.mojom.h"
#include "services/network/public/mojom/ip_address_space.mojom.h"
#include "services/network/test/test_network_context.h"
#include "services/network/test/test_utils.h"
#include "testing/gmock/include/gmock/gmock-matchers.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/features_generated.h"
#include "third_party/blink/public/common/interest_group/ad_auction_constants.h"
#include "third_party/blink/public/common/interest_group/ad_display_size_utils.h"
#include "third_party/blink/public/common/interest_group/test/interest_group_test_utils.h"
#include "third_party/blink/public/common/interest_group/test_interest_group_builder.h"
#include "third_party/blink/public/mojom/aggregation_service/aggregatable_report.mojom.h"
#include "third_party/blink/public/mojom/interest_group/ad_auction_service.mojom.h"
#include "third_party/blink/public/mojom/interest_group/interest_group_types.mojom.h"
#include "third_party/blink/public/mojom/private_aggregation/private_aggregation_host.mojom.h"
#include "ui/display/screen.h"
#include "url/gurl.h"
#include "url/origin.h"
#include "url/url_constants.h"

namespace content {

namespace {

IgExpectEqualsForTesting;
IgExpectNotEqualsForTesting;
Eq;
HasSubstr;
Optional;

constexpr char kLegitimateAdAuctionResponse[] =;
constexpr char kLegitimateAdAuctionSignals[] =;

// Returned by test Javascript code when join or leave promises complete without
// throwing an exception.
const char kSuccess[] =;

// Returns a string that declares a "maybePromise()" Javascript function, which
// takes an argument and either returns it (if `use_promise` is false) or
// returns a promise that will be resolved with that value in a millisecond (if
// `use_promise` is true).
std::string MaybePromiseFunction(bool use_promise) {}

const blink::InterestGroup::AdditionalBidKey kPublicKey1 =;

const char kBase64PublicKey1[] =;

const uint8_t kPrivateKey1[] =;

const blink::InterestGroup::AdditionalBidKey kPublicKey2 =;

const char kBase64PublicKey2[] =;

const uint8_t kPrivateKey2[] =;

const blink::InterestGroup::AdditionalBidKey kPublicKeyWithNoMatchingSignature =;

std::string base64Decode(std::string_view input) {}

// Convenience helper to parse JSON to a base::Value. CHECKs on failure, rather
// than letting callers handle it.
base::Value JsonToValue(const std::string& json) {}

base::Value::List AdAllowedReportingOriginsToList(
    std::vector<url::Origin> origins) {}

// Creates base::Value representations of ads and adComponents arrays from the
// provided InterestGroup::Ads.
base::Value::List MakeAdsValue(
    const std::vector<blink::InterestGroup::Ad>& ads) {}

base::Value::Dict StringDoubleMapToDict(
    const base::flat_map<std::string, double>& map) {}

base::Value::List SellerCapabilitiesToList(
    blink::SellerCapabilitiesType capabilities) {}

base::Value::Dict SellerCapabilitiesToDict(
    const std::optional<
        base::flat_map<url::Origin, blink::SellerCapabilitiesType>>& map,
    blink::SellerCapabilitiesType all_sellers_capabilities) {}

base::Value::Dict InterestGroupSizeToDict(const blink::AdSize& size) {}

base::Value::Dict AdSizesToDict(
    const base::flat_map<std::string, blink::AdSize>& map) {}

base::Value::Dict SizeGroupsToDict(
    const base::flat_map<std::string, std::vector<std::string>>& map) {}

base::Value::List AuctionServerRequestFlagsToList(
    const blink::AuctionServerRequestFlags& flags) {}

bool IsErrorMessage(const content::WebContentsConsoleObserver::Message& msg) {}

// This convoluted way to validate the UUID is necessary because MatchesRegex
// only support simple regular expressions, not PCRE.
std::string ConvertUuidWithOnlyZeros(const std::string& uuid) {}

class AllowlistedOriginContentBrowserClient
    : public ContentBrowserTestContentBrowserClient {};

// A special path for updates that allows deferring the server response. Only
// update requests to this path can be deferred, because the path must be
// registered before the EmbeddedTestServer starts.
constexpr char kDeferredUpdateResponsePath[] =;

constexpr char kFledgeHeader[] =;

// Allows registering responses to network requests.
class NetworkResponder {};

// Handle well-known requests. Frame origins are expected to be of the form
// "allow-join...", "allow-leave...", or "no-cors...".
std::unique_ptr<net::test_server::HttpResponse> HandleWellKnownRequest(
    const net::test_server::HttpRequest& request) {}

std::unique_ptr<net::test_server::HttpResponse> HandleAdditionalBids(
    const net::test_server::HttpRequest& request) {}

class InterestGroupBrowserTest : public ContentBrowserTest {};

// At the moment, InterestGroups use either:
//   a. Web-exposed `FencedFrameConfig` objects or URN urls, when fenced frames
//      are enabled
//   b. Normal URLs when fenced frames are not enabled
// This means they require ads be loaded in fenced frames when Chrome is running
// with the option enabled. This fixture is parameterized over whether the test
// should call `navigator.runAdAuction()` with a request to have the promise
// resolve to a JS `FencedFrameConfig` object or a URN.
class InterestGroupFencedFrameBrowserTest : public InterestGroupBrowserTest {};

// Make sure that FLEDGE has protections against making local network requests..
class InterestGroupPrivateNetworkBrowserTest : public InterestGroupBrowserTest {};

// More restricted Permissions Policy is set for features join-ad-interest-group
// and run-ad-auction (EnableForSelf instead of EnableForAll) when runtime flag
// kAdInterestGroupAPIRestrictedPolicyByDefault is enabled.
class InterestGroupRestrictedPermissionsPolicyBrowserTest
    : public InterestGroupBrowserTest {};

class InterestGroupMultiBidBrowserTest : public InterestGroupBrowserTest {};

class InterestGroupMultiBidAndCookieDeprecationBrowserTest
    : public InterestGroupBrowserTest {};

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       SameOriginJoinLeaveInterestGroup) {}

IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    SameOriginClearOriginJoinedInterestGroupsWithoutGroupsToKeep) {}

IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    SameOriginClearOriginJoinedInterestGroupsWithGroupsToKeep) {}

// Make sure that ClearOriginJoinedInterestGroups() sends leave notifications
// for the right set of interest groups. This is separate from the above tests
// because the *AndVerify() series of methods results in extra notifications.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       SameOriginClearOriginJoinedInterestGroupsNotifications) {}

// Can't join or leave interest groups from http://localhost, even though it's
// a "secure context" (since it's potentially trustworthy).
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, CantJoinLeaveHttpLocalhost) {}

// Test the case of a cross-origin iframe joining and leaving same-origin
// interest groups. This should succeed without any .well-known fetches needed.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       SameOriginIframeJoinLeaveInterestGroup) {}

// Test cross-origin joining/leaving of interest groups, in the case an IG owner
// only allows cross-origin joining. Only allow joining to make sure join and
// leave permissions are tracked separately.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       CrossOriginJoinAllowedByWellKnownFetch) {}

// Test cross-origin joining/leaving of interest groups, in the case an IG owner
// only allows cross-origin leaving. Only allow leaving to make sure leave and
// leave permissions are tracked separately.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       CrossOriginLeaveAllowedByWellKnownFetch) {}

// Test cross-origin joining/leaving of interest groups from an iframe, in the
// case an IG owner only allows cross-origin joining. Only allow joining to make
// sure join and leave permissions are tracked separately.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       CrossOriginIframeJoinAllowedByWellKnownFetch) {}

// Test cross-origin joining/leaving of interest groups from an iframe, in the
// case an IG owner only allows cross-origin leaving. Only allow leaving to make
// sure join and leave permissions are tracked separately.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       CrossOriginIframeLeaveAllowedByWellKnownFetch) {}

// Test the case cross-origin joining/leaving of interest groups is blocked by
// the ContentBrowserClient, but allowed by the .well-known URL. In this case,
// the .well-known URL should be fetched, and the return value should be derived
// from that fetch returned, but the database should not updated, regardless of
// whether the .well-known URL allows it. This can happen if, for example,
// cookies blocking is enabled for a site.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       CrossOriginJoinLeaveBlockedByContentBrowserClient) {}

// Test cross-origin joining of interest groups requires CORS.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, CrossOriginJoinNoCors) {}

// Test cross-origin leaving of interest groups requires CORS.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, CrossOriginLeaveNoCors) {}

// Test the renderer restricting the number of active cross-origin joins per
// frame. One page tries to join kMaxActiveCrossSiteJoins+1 cross-origin
// interest groups from 3 different origins, the last two requests are to two
// distinct origins. All but the last are sent to the browser process. The
// results in two .well-known permissions requests. While those two requests are
// pending, the last request is held back in the renderer.
//
// Then the site joins and leaves a same-origin interest group, which should
// bypass the queue. Then one of the hung .well-known requests completes, which
// should allow the final cross-origin join to send out its .well-known request.
//
// Then a cross-origin leave request is issued for the group just joined, which
// should not wait before sending the request to the browser process, since
// leaves and joins are throttled separately. The browser process then leaves
// the group immediately, using the cached result of the previous .well-known
// fetch.
//
// The remaining two .well-known requests for the joins are then completed,
// which should result in all pending joins completing successfully.
//
// The title of the page is updated when each promise completes successfully, to
// allow waiting on promises that were created earlier in the test run.
//
// Only 3 cross-site origins are used to limit the test to 3 simultaneous
// .well-known requests. Using too many would run into the network stack's
// request throttling code.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, CrossOriginJoinQueue) {}

// The inverse of CrossOriginJoinQueue. Unlike most leave tests, leaves interest
// groups the user isn't actually in.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, CrossOriginLeaveQueue) {}

// Much like CrossOriginJoinQueue, but navigates the page when the queue is
// full. Makes sure started joins complete successfully, and a join that was
// still queued when the frame was navigated away is dropped.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       CrossOriginJoinAndNavigateAway) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupUnsupportedFields) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupMissingLifetimeMs) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, JoinInterestGroupLifetimeMs) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupLifetimeMsAndDeprecatedDuration) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupInvalidOwner) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupInvalidPrioritySignalsOverrides) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupSupportsDeprecatedNames) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupInvalidEnumFieldsIgnored) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupValidSellerCapabilities) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupValidSizeFields) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupWithAuctionServerRequestFlags) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupValidReportingIds) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupValidAdRenderId) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupValidAttestedAllowedReportingOrigins) {}

// Some of ad's fields are ignored in adComponents, such as
// allowedReportingOrigins.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupAdComponentsIgnoredFields) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupInvalidBiddingLogicUrl) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupInvalidBiddingWasmHelperUrl) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupInvalidUpdateUrl) {}

// TODO(crbug.com/40258629): Remove one support for `dailyUpdateUrl` has
// been removed.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupInvalidDailyUpdateUrl) {}

// TODO(crbug.com/40258629): Remove one support for `dailyUpdateUrl` has
// been removed.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupDifferentUpdateURLAndDailyUpdateUrl) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupInvalidTrustedBiddingSignalsUrl) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupInvalidUserBiddingSignals) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupInvalidAdUrl) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupInvalidAdMetadata) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       LeaveInterestGroupInvalidOwner) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       ClearOriginJoinedInterestGroupsInvalidOwner) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupInvalidAdSizeGroupEmptyName) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupInvalidAdSizeGroupNoSizeGroups) {}

IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    JoinInterestGroupInvalidAdSizeGroupNotContainedInSizeGroups) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupInvalidAdSizeGroupNoAdSize) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupInvalidAdComponentSizeGroupEmptyName) {}

IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    JoinInterestGroupInvalidAdComponentSizeGroupNoSizeGroups) {}

IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    JoinInterestGroupInvalidAdComponentSizeGroupNotContainedInSizeGroups) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupInvalidAdComponentSizeGroupNoAdSizes) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupInvalidAdSize) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupInvalidAdSizeUnits) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupInvalidAdSizeNoNumber) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupInvalidSizeGroup) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupInvalidSizeGroupSize) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupInvalidAdRenderId) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupNonHttpsAllowedReportingOrigins) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupTooManyAllowedReportingOrigins) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupWithValidAdditionalBidKey) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupAdditionalBidKeyNotValidBase64) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupAdditionalBidKeyInvalidLength) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupWithBothAdditionalBidKeyAndAdsFails) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       NegativeInterestGroupsMustNotHaveUpdateURL) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupRenamedFields) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupInvalidAggregationCoordinatorOrigin) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupValidAggregationCoordinatorOrigin) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupNonHTTPSAggregationCoordinatorOrigin) {}

IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    JoinInterestGroupUnsupportedAggregationCoordinatorOrigin) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, RunAdAuctionInvalidSeller) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, RunAdAuctionHttpSeller) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidDecisionLogicUrl) {}

// TODO(crbug.com/40266734): Remove test when old names are no longer supported.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionMissingDecisionLogicUrl) {}

// TODO(crbug.com/40266734): Remove test when old names are no longer supported.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionDecisionLogicUrlOldAndNewNamesDontMatch) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidTrustedScoringSignalsUrl) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidTrustedScoringSignalsUrl2) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidTrustedScoringSignalsUrl3) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAuctionWithTooLongDecisionLogicUrl) {}

// Run two multi-seller auctions with two components. In the first auction, both
// components have too-long decision logic URLs, and there should be no winner.
// In the second auction, one component has a too-long URL. There should be a
// winner.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunComponentAuctionWithTooLongDecisionLogicUrl) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAuctionWithTooLongTrustedSellerSignalsUrl) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionPositiveMaxTrustedScoringSignalsURLLength) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionZeroMaxTrustedScoringSignalsURLLength) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionNegativeMaxTrustedScoringSignalsURLLength) {}

class InterestGroupCoordinatorBrowserTest : public InterestGroupBrowserTest {};

IN_PROC_BROWSER_TEST_F(InterestGroupCoordinatorBrowserTest,
                       RunAdAuctionValidTrustedScoringSignalsCoordinator) {}

IN_PROC_BROWSER_TEST_F(InterestGroupCoordinatorBrowserTest,
                       RunAdAuctionHTTPSchemeTrustedScoringSignalsCoordinator) {}

IN_PROC_BROWSER_TEST_F(InterestGroupCoordinatorBrowserTest,
                       RunAdAuctionOpaqueTrustedScoringSignalsCoordinator) {}

// TODO(crbug.com/40266734): Remove test when old names are no longer supported.
IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    RunAdAuctionTrustedScoringSignalsUrlOldAndNewNamesDontMatch) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionDecisionLogicUrlDifferentFromSeller) {}

IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    RunAdAuctionTrustedScoringSignalsUrlDifferentFromSeller) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidInterestGroupBuyers) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidInterestGroupBuyersStr) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionNoInterestGroupBuyers) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionEmptyInterestGroupBuyers) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidAuctionSignals) {}

// Exercise rejection path in the renderer for promise-delivered auction
// signals.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionRejectPromiseAuctionSignals) {}

// Exercise error-handling path in the renderer for promise-delivered auction
// signals.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionResolvePromiseInvalidAuctionSignals) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidSellerSignals) {}

// Exercise rejection path in the renderer for promise-delivered seller signals.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionRejectPromiseSellerSignals) {}

// Exercise error-handling path in the renderer for promise-delivered seller
// signals.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionResolvePromiseInvalidSellerSignals) {}

// Test rejection path in the renderer for promise-delivered perBuyerSignals.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionRejectPromisePerBuyerSignals) {}

// Exercise error-handling path in the renderer for promise-delivered
// perBuyerSignals.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionResolvePromiseInvalidPerBuyerSignals) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidPerBuyerSignalsOrigin) {}

// Test rejection path in the renderer for promise-delivered perBuyerTimeouts.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionRejectPromisePerBuyerTimeouts) {}

// Exercise error-handling path in the renderer for promise-delivered
// perBuyerTimeouts.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionResolvePromiseInvalidPerBuyerTimeouts) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidPerBuyerTimeoutsOrigin) {}

// Test rejection path in the renderer for promise-delivered
// perBuyerCumulativeTimeouts.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionRejectPromisePerBuyerCumulativeTimeouts) {}

// Exercise error-handling path in the renderer for promise-delivered
// perBuyerCumulativeTimeouts.
IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    RunAdAuctionResolvePromiseInvalidPerBuyerCumulativeTimeouts) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidPerBuyerCumulativeTimeoutsOrigin) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidPerBuyerCurrenciesOrigin) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidPerBuyerCurrenciesCurrency) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidSellerCurrency) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidPerBuyerGroupLimitsValue) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidPerBuyerGroupLimitsOrigin) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidPerBuyerPrioritySignals) {}

// Note -- this property is enforced by using the `double` WebIDL type.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, NonFiniteValuesRejected) {}

// Test for invalid origin in perBuyerMultiBidLimits.
IN_PROC_BROWSER_TEST_F(InterestGroupMultiBidBrowserTest,
                       RunAdAuctionInvalidPerBuyerMultiBidLimits) {}

// It's invalid for an auction to have both component auctions and buyers.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidComponentAuctionsAndBuyers) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidComponentAuctionsArray) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidComponentAuctionsElementType) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidComponentAuctionsAuctionConfig) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidComponentAuctionDepth) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidPerBuyerSignals) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionRejectPromiseDirectFromSellerSignals) {}

IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    RunAdAuctionRejectPromiseDirectFromSellerSignalsHeaderAdSlot) {}

IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    RunAdAuctionMissingDirectFromSellerSignalsHeaderAdSlotLogged) {}

// Parse errors for directFromSellerSignalsHeaderAdSlot are logged to devtools.
IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    RunAdAuctionInvalidDirectFromSellerSignalsHeaderAdSlotLogged) {}

// If this test fails, check that you haven't added a required field that's
// alphabetically before directFromSellerSignalsHeaderAdSlot. See details at
// https://github.com/WICG/turtledove/issues/803
IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    RunAdAuctionDirectFromSellerSignalsHeaderAdSlotFeatureDetection) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionPromiseInvalidDirectFromSellerSignals) {}

IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    RunAdAuctionPromiseToStringThrowDirectFromSellerSignals) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidDirectFromSellerSignalsInvalidURL) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidDirectFromSellerSignalsNotHttps) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidDirectFromSellerSignalsWrongOrigin) {}

IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    RunAdAuctionInvalidDirectFromSellerSignalsHasQueryString) {}

// `bidder_origin` is used in per-buyer signals, but the bundle only has
// per-buyer signals for `non_bidder_origin`.
//
// No signals should be delivered.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       DirectFromSellerSignalsNotInBuyers) {}

// The bundle is served from `seller_origin`, but the subresource is from
// `bidder_origin` -- subresource bundles don't allow subresources to be
// cross-origin with their bundle's origin.
//
// No signals should be delivered.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       DirectFromSellerSignalsBundleSubresourceOriginMismatch) {}

// Use "bundle_doesnt_exist.wbn" as the bundle filename -- the fetch for the
// bundle will fail, and null will be passed to the worklet. Note that no
// exception is thrown; the auction does run, since the
// <script type="webbundle"> tag does declare a subresource
// "/direct_from_seller_signals?auctionSignals", but the bundle itself (which
// loads asynchronously) fails to load, causing the auction-time
// DirectFromSellerSignals load to fail.
//
// No signals should be delivered.
IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    RunAdAuctionInvalidDirectFromSellerSignalsBundleDoesntExist) {}

// Create a cross-origin iframe, and run an auction in that iframe using
// DirectFromSellerSignals.
//
// The signals should be correctly loaded.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       DirectFromSellerSignalsInCrossOriginIframe) {}

// Create a cross origin iframe, and load header-based directFromSellerSignals
// in that frame. Then, in the main frame, run an auction using the loaded
// signals.
IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    DirectFromSellerSignalsHeaderAdSlotFromCrossOriginIframe) {}

// Start an auction using directFromSellerSignalsHeaderAdSlot, but navigate away
// immediately after starting the auction.
IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    DirectFromSellerSignalsHeaderAdSlotNavigateAwayDuringAuction) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       InvalidDirectFromSellerSignalsHeaderAdSlot) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       InvalidDirectFromSellerSignalsHeaderAdSlotAndBundles) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidAdditionalBidsNoNonce) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidAdditionalBidsMalformattedNonce) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidAdditionalBidsNoInterestGroupBuyers) {}

IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    RunAdAuctionInvalidAdditionalBidsEmptyInterestGroupBuyers) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidSignedAdditionalBidsBase64) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidSignedAdditionalBidsJson) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionInvalidSignedAdditionalBidsStructure) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionBuyersNoInterestGroup) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionAuctionReportBuyerKeysNotBigInt) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionAuctionReportBuyerKeysTooLargeBigInt) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionAuctionReportBuyerKeysNegativeBigInt) {}

IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    RunAdAuctionAuctionReportBuyersUnknownReportTypeIgnored) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionAuctionReportBuyersIncompleteDictionary) {}

IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    RunAdAuctionAuctionInvalidRequiredSellerCapabilitiesIgnored) {}

class InterestGroupAuctionReportBuyersEnableDebugModeTest
    : public InterestGroupBrowserTest {};

class InterestGroupAuctionReportBuyersEnableDebugModeFeatureDisabledTest
    : public InterestGroupAuctionReportBuyersEnableDebugModeTest {};

IN_PROC_BROWSER_TEST_F(InterestGroupAuctionReportBuyersEnableDebugModeTest,
                       NegativeDebugKey_Error) {}

IN_PROC_BROWSER_TEST_F(InterestGroupAuctionReportBuyersEnableDebugModeTest,
                       TooLargeBigInt_Error) {}

IN_PROC_BROWSER_TEST_F(InterestGroupAuctionReportBuyersEnableDebugModeTest,
                       DebugKeySetWithEnabledFalse_Error) {}

IN_PROC_BROWSER_TEST_F(InterestGroupAuctionReportBuyersEnableDebugModeTest,
                       DebugModeConfigNotADictionary_Error) {}

IN_PROC_BROWSER_TEST_F(InterestGroupAuctionReportBuyersEnableDebugModeTest,
                       DebugModeWithoutDebugKey_Success) {}

IN_PROC_BROWSER_TEST_F(InterestGroupAuctionReportBuyersEnableDebugModeTest,
                       DebugModeWithDebugKey_Success) {}

IN_PROC_BROWSER_TEST_F(InterestGroupAuctionReportBuyersEnableDebugModeTest,
                       DebugModeDisabled_Success) {}

IN_PROC_BROWSER_TEST_F(InterestGroupAuctionReportBuyersEnableDebugModeTest,
                       DebugModeDisabledImplicity_Success) {}

IN_PROC_BROWSER_TEST_F(InterestGroupAuctionReportBuyersEnableDebugModeTest,
                       DebugConfigMissing_Disabled) {}

IN_PROC_BROWSER_TEST_F(InterestGroupAuctionReportBuyersEnableDebugModeTest,
                       MultipleBuyersDebugConfig) {}

IN_PROC_BROWSER_TEST_F(
    InterestGroupAuctionReportBuyersEnableDebugModeFeatureDisabledTest,
    DebugMode_Ignored) {}

IN_PROC_BROWSER_TEST_F(
    InterestGroupAuctionReportBuyersEnableDebugModeFeatureDisabledTest,
    InvalidInput_Ignored) {}

// Run an auction with 2 interest groups. One of the interest groups will
// satisfy the `requiredSellerCapabilities` of the auction config, and one will
// not.
//
// The bid of the interest group satisfied the `requiredSellerCapabilities`
// wins the auction, even though normally the other interest group would win,
// because the other interest group was removed from the auction for failing to
// satisfy the `requiredSellerCapabilities`.
//
// Both interest groups set an update URL, so after the auction, a post auction
// interest group update occurs and succeeds for both groups. (This is so that
// bidders can choose to make the groups that don't meet the
// requiredSellerCapabilities update to then satisfy those conditions).
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RequiredSellerCapabilitiesWithPostAuctionUpdates) {}

// Like RequiredSellerCapabilitiesWithPostAuctionUpdates, but setting the
// sellerCapabilities per-buyer instead of for all buyers.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RequiredSellerCapabilitiesWithPerBuyerCapabilities) {}

// Like RequiredSellerCapabilitiesWithPerBuyerCapabilities, but the per-seller
// sellerCapabilities initially don't match the seller origin, so both interest
// groups are removed from the auction.
IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    RequiredSellerCapabilitiesWithPerBuyerCapabilitiesNoMatch) {}

// Only some of the requiredSellerCapabilities are present, so the interest
// group is still removed from the auction.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RequiredSellerCapabilitiesPartialMatch) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionPrivacySandboxDisabled) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionDisabledInterestGroup) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, RunAdAuctionWithWinner) {}

// Runs auction just like test InterestGroupBrowserTest.RunAdAuctionWithWinner,
// but runs with the ads specified with sizes info.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionWithSizeWithWinner) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, ForceReload) {}

// Runs an auction just like InterestGroupBrowserTest.RunAdAuctionWithWinner,
// but where the render size is specified only in the interest group, not the
// bid. When size is only specified in one place, the ads are considered
// matching (as long as their urls are the same), but the auction proceeds as if
// no size information was specified.
IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    RunAdAuctionWithSizeForInterestGroupWithWinnerNoMacroSubstitution) {}

// Runs an auction just like InterestGroupBrowserTest.RunAdAuctionWithWinner,
// but where the render size is specified only in the bid, not the interest
// group. When size is only specified in one place, the ads are considered
// matching (as long as their urls are the same), but the auction proceeds as if
// no size information was specified.
IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    RunAdAuctionWithSizeForBidWithWinnerNoMacroSubstitution) {}

// Runs auction just like test InterestGroupBrowserTest.RunAdAuctionWithWinner,
// but runs with the ads specified with sizes info. The ad url contains size
// macros, which should be substituted with the size from the winning bid.
// The size macros use the {%...%} format.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionWithSizeWithWinnerMacroSubstitution) {}

// Same as RunAdAuctionWithSizeWithWinnerMacroSubstitution, except the size
// macros use the ${...} format.
IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    RunAdAuctionWithSizeWithWinnerMacroSubstitutionAlternateFormat) {}

class DeprecatedRenderURLReplacementsDisabledWithCookieDeprecationBrowserTest
    : public InterestGroupBrowserTest {};

// If both DeprecatedRenderURLReplacements and cookie deprecation trial are on,
// we turn DeprecatedRenderURLReplacements off, so it won't affect the study.
IN_PROC_BROWSER_TEST_F(
    DeprecatedRenderURLReplacementsDisabledWithCookieDeprecationBrowserTest,
    RenderURLReplacementsHaveNoEffect) {}

// If Cookie Deprecation Facilitated Testing is going on, it would by default
// disable deprecatedRenderURLReplacements. However if
// kAllowFledgeDeprecatedRenderURLReplacementsWithCookieDeprecationFacilitatedTesting
// is enabled, that should override the default and allow for
// deprecatedRenderURLReplacements to be enabled alongside the facilitated
// testing.
class DeprecatedRenderURLReplacementsEnabledWithCookieDeprecationBrowserTest
    : public InterestGroupBrowserTest {};

IN_PROC_BROWSER_TEST_F(
    DeprecatedRenderURLReplacementsEnabledWithCookieDeprecationBrowserTest,
    RunAdAuctionWithWinnerWithRenderURLReplacements) {}

class DeprecatedRenderURLReplacementsDisabledTest
    : public InterestGroupBrowserTest {};

IN_PROC_BROWSER_TEST_F(DeprecatedRenderURLReplacementsDisabledTest,
                       FeatureDetection) {}

// Run a single ad auction and pass deprecatedRenderURLReplacements, and make
// sure they do not have an effect since it is disabled.
IN_PROC_BROWSER_TEST_F(DeprecatedRenderURLReplacementsDisabledTest,
                       RunAdAuctionWithRenderURLReplacementsHasNoEffect) {}

class DeprecatedRenderURLReplacementsEnabledTest
    : public InterestGroupBrowserTest {};

IN_PROC_BROWSER_TEST_F(DeprecatedRenderURLReplacementsEnabledTest,
                       FeatureDetection) {}

// Run a single ad auction with a winner and ensure the render url replacements
// occur even if only one of the specified replacements is a match.
IN_PROC_BROWSER_TEST_F(DeprecatedRenderURLReplacementsEnabledTest,
                       RunAdAuctionWithWinnerWithPartialRenderURLReplacements) {}

// Run a single ad auction with a winner and ensure the render url replacements
// occur.
IN_PROC_BROWSER_TEST_F(DeprecatedRenderURLReplacementsEnabledTest,
                       RunAdAuctionWithWinnerWithRenderURLReplacements) {}

// Run a single ad auction and ensure it fails when passed badly formatted
// replacements.
IN_PROC_BROWSER_TEST_F(DeprecatedRenderURLReplacementsEnabledTest,
                       RunAdAuctionFailsWithBadRenderURLReplacements) {}

// Run a multi-seller auction with a single component seller with a winner and
// ensure it fails when passed badly formatted replacements.
IN_PROC_BROWSER_TEST_F(
    DeprecatedRenderURLReplacementsEnabledTest,
    SingleComponentAuctionFailsWithBadRenderURLReplacements) {}

// Run a multi-seller auction with a single component seller with a winner and
// ensure the render url replacements occur.
IN_PROC_BROWSER_TEST_F(
    DeprecatedRenderURLReplacementsEnabledTest,
    SingleComponentAuctionWithWinnerWithRenderURLReplacements) {}

// Run a multi-seller auction with a single component seller and ensure
// non-matching render url replacements do not affect the winner.
IN_PROC_BROWSER_TEST_F(
    DeprecatedRenderURLReplacementsEnabledTest,
    SingleComponentAdAuctionWithWinnerNotAffectedByRenderURLReplacements) {}

// Run a multi-seller auction with a single component seller and ensure the
// render url replacements in the loser do not affect the winner.
IN_PROC_BROWSER_TEST_F(
    DeprecatedRenderURLReplacementsEnabledTest,
    SingleComponentAdAuctionWithWinnerWithRenderURLReplacements) {}

// Run a multi-seller auction with multiple component auctions and ensure the
// render url replacements in the loser does not affect the winner.
IN_PROC_BROWSER_TEST_F(
    DeprecatedRenderURLReplacementsEnabledTest,
    MultipleComponentAuctionsWithWinnerNotAffectedByOtherComponentAuctionsURLReplacements) {}

// Run a multi-seller auction with multiple component auctions and ensure the
// render url replacements do not occur if they create an invalid URL.
IN_PROC_BROWSER_TEST_F(
    DeprecatedRenderURLReplacementsEnabledTest,
    MultipleComponentAuctionsWithWinnerNotReplacedWithBadURLReplacementsWithinHostname) {}

// Run a multi-seller auction with multiple component auctions and ensure the
// render url replacements occur within the hostname.
IN_PROC_BROWSER_TEST_F(
    DeprecatedRenderURLReplacementsEnabledTest,
    MultipleComponentAuctionsWithWinnerWithURLReplacementsWithinHostname) {}

// Run a multi-seller auction with multiple component auctions and ensure that
// we can chain together replacements from deprecatedRenderURLReplacements with
// replacements in deprecatedReplaceInURN.
IN_PROC_BROWSER_TEST_F(DeprecatedRenderURLReplacementsEnabledTest,
                       MultipleComponentAuctionsWithChainingReplacements) {}

// Run a multi-seller auction with multiple component auctions, and ensure an
// error is thrown when any of the component auctions pass badly formatted
// replacements.
IN_PROC_BROWSER_TEST_F(
    DeprecatedRenderURLReplacementsEnabledTest,
    MultipleComponentAuctionsFailsWhenAnyComponentAuctionHasBadURLReplacements) {}

// Run a multi-seller auction and ensure it fails, if we pass
// 'deprecatedRenderURLReplacements' within the top level config, when there is
// a component auction.
IN_PROC_BROWSER_TEST_F(
    DeprecatedRenderURLReplacementsEnabledTest,
    RunComponentAdAuctionFailsWithRenderURLReplacementsInTopLevelAuctionConfig) {}
// This tests for when a replacement is done within
// deprecatedRenderURLReplacements, that the URL created after is a valid one,
// because it would crash otherwise.
IN_PROC_BROWSER_TEST_F(DeprecatedRenderURLReplacementsEnabledTest,
                       ReplacementWithInvalidURLReplacement) {}

// This tests that replacements can be made within the hostname and in the path
// together.
IN_PROC_BROWSER_TEST_F(DeprecatedRenderURLReplacementsEnabledTest,
                       ReplacementWithinHostnameAndPath) {}

// This tests that replacements can be made within the hostname and the path,
// specifically that by adding a '/' within the replacements will still keep it
// valid.
IN_PROC_BROWSER_TEST_F(DeprecatedRenderURLReplacementsEnabledTest,
                       ReplacementWithinHostnameAndPathWithoutSlashSeperator) {}

// This tests for when a replacement is done within
// deprecatedRenderURLReplacements, that another can be done
// properly with deprecatedReplaceInURN.
IN_PROC_BROWSER_TEST_F(DeprecatedRenderURLReplacementsEnabledTest,
                       ChainingReplacements) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       PercentsInRenderURLHostnameThrowsTypeError) {}

// When trying to replace a render URL with deprecatedReplaceInURN, if the new
// URL is invalid, the URL will remain unchanged.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionWithWinnerInvalidReplacedURNDoesNotChange) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionWithWinnerReplacedURN) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       ReplaceURLFailsOnBadReplacementInput) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       ReplaceURLFailsOnMalformedURN) {}

IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    RunAdAuctionPerBuyerSignalsAndPerBuyerTimeoutsOriginNotInBuyers) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, RunAdAuctionCancel) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, RunAdAuctionCancelLate) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, RunAdAuctionCancelBefore) {}

// Runs an auction where the bidding function uses a WASM helper.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, RunAdAuctionWithBidderWasm) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionWithDebugReporting) {}

// All bidders' genereteBid() failed so no bid was made, thus no render url.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionWithDebugReportingNoBid) {}

// This test reproduces the crash reported in crbug.com/1451572.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, RunAdAuctionRepro1451572) {}

// Test that the FLEDGE properly handles detached documents.
IN_PROC_BROWSER_TEST_F(InterestGroupFencedFrameBrowserTest,
                       DetachedDocumentDoesNotCrash) {}

// Can't do zero-argument leave of interest groups from http://localhost, even
// though it's a "secure context" (since it's potentially trustworthy).
IN_PROC_BROWSER_TEST_F(InterestGroupFencedFrameBrowserTest,
                       CantLeaveZeroArgHttpLocalhost) {}

// Runs auction just like test InterestGroupBrowserTest.RunAdAuctionWithWinner,
// but runs with fenced frames enabled and expects to receive a URN URL to be
// used. After the auction, loads the URL in a fenced frame, and expects the
// correct URL is loaded.
IN_PROC_BROWSER_TEST_F(InterestGroupFencedFrameBrowserTest,
                       RunAdAuctionWithWinner) {}

// Runs auction just like test
// InterestGroupBrowserTest.RunAdAuctionWithSizeWithWinner, but load the winning
// ad in a fenced frame and verify the ad size.
IN_PROC_BROWSER_TEST_F(InterestGroupFencedFrameBrowserTest,
                       RunAdAuctionWithSizeWithWinner) {}

IN_PROC_BROWSER_TEST_F(InterestGroupFencedFrameBrowserTest,
                       RunAdAuctionWithAdComponentWithSize) {}

IN_PROC_BROWSER_TEST_F(InterestGroupFencedFrameBrowserTest,
                       RunAdAuctionWithWinnerReplacedURN) {}

// Test that `LeaveAdInterestGroup()` cannot be invoked without arguments in
// regular iframes. An error message should be shown.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       ArgumentsRequiredForLeaveGroupInRegularIframe) {}

// Test that `LeaveAdInterestGroup()` works in urn iframe that is same origin to
// the interset group owner.
IN_PROC_BROWSER_TEST_F(InterestGroupFencedFrameBrowserTest,
                       SameOriginUrnIframeLeaveGroupSucceed) {}

// Test that `LeaveAdInterestGroup()` fails in urn iframe that is cross origin
// to the interset group owner.
IN_PROC_BROWSER_TEST_F(InterestGroupFencedFrameBrowserTest,
                       CrossOriginUrnIframeLeaveGroupFail) {}

// Load the ad in an urn iframe. Test that `LeaveAdInterestGroup()` works from
// a nested regular iframe that is same origin to the interset group owner.
IN_PROC_BROWSER_TEST_F(InterestGroupFencedFrameBrowserTest,
                       LeaveGroupFromSameOriginNestedIframeSucceed) {}

// Load the ad in an urn iframe. Test that `LeaveAdInterestGroup()` fails from
// a nested regular iframe that is cross origin to the interset group owner.
IN_PROC_BROWSER_TEST_F(InterestGroupFencedFrameBrowserTest,
                       LeaveGroupFromCrossOriginNestedIframeFail) {}

// Runs two ad auctions with fenced frames enabled. Both auctions should
// succeed and are then loaded in separate fenced frames. Both auctions try to
// leave the interest group, but only the one whose ad matches the joining
// origin should succeed.
IN_PROC_BROWSER_TEST_F(InterestGroupFencedFrameBrowserTest,
                       RunTwoAdAuctionWithWinnerLeaveGroup) {}

// Runs ad auction with fenced frames enabled. The auction should succeed and
// be loaded in a fenced frame. The displayed ad leaves the interest group
// from a nested iframe.
IN_PROC_BROWSER_TEST_F(InterestGroupFencedFrameBrowserTest,
                       RunAdAuctionWithWinnerNestedLeaveGroup) {}

// Runs ad auction with fenced frames enabled. The auction should succeed and
// be loaded in a fenced frame. Then the fenced frame content performs a
// cross-origin navigation on itself, and the new document loads an iframe that
// is same-origin to the interest group. We leave the interest group from the
// iframe, and it should succeed.
IN_PROC_BROWSER_TEST_F(
    InterestGroupFencedFrameBrowserTest,
    RunAdAuctionWithWinnerLeaveGroupAfterRendererInitiatedNavigation) {}

// Creates a Fenced Frame and then tries to use the leaveAdInterestGroup API.
// Leaving the interest group should silently fail.
IN_PROC_BROWSER_TEST_F(InterestGroupFencedFrameBrowserTest,
                       LeaveAdInterestGroupNoAuction) {}

// Use different origins for publisher, bidder, and seller, and make sure
// everything works as expected.
IN_PROC_BROWSER_TEST_F(InterestGroupFencedFrameBrowserTest, CrossOrigin) {}

// Test that ad_components in an iframe ad are requested.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionWinnerWithComponents) {}

// Make sure correct topFrameHostname is passed in. Check auctions from top
// frames, and iframes of various depth.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, TopFrameHostname) {}

// Test running auctions in cross-site iframes, and loading the winner into a
// nested fenced frame.
IN_PROC_BROWSER_TEST_F(InterestGroupFencedFrameBrowserTest, Iframe) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionWithWinnerManyInterestGroups) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, RunAdAuctionAllGroupsLimited) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, RunAdAuctionOneGroupLimited) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionOneGroupHighLimit) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionGroupLimitRandomized) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, RunAdAuctionMultipleAuctions) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, ReportingMultipleAuctions) {}

// Adding an interest group and then immediately running the ad auction, without
// waiting in between, should always work because although adding the interest
// group is async (and intentionally without completion notification), it should
// complete before the auction runs.
//
// On regression, this test will likely only fail with very low frequency.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       AddInterestGroupRunAuctionWithWinnerWithoutWaiting) {}

// The winning ad's render url is invalid (invalid url or has http scheme).
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, RunAdAuctionWithInvalidAdUrl) {}

// Test that when there are no ad components, an array of ad components is still
// available, and they're all mapped to about:blank.
IN_PROC_BROWSER_TEST_F(InterestGroupFencedFrameBrowserTest, NoAdComponents) {}

// Test with an ad component. Run an auction with an ad component, load the ad
// in a fenced frame, and the ad component in a nested fenced frame. Fully
// exercise navigator.adAuctionComponents() on the main ad's fenced frame.
IN_PROC_BROWSER_TEST_F(InterestGroupFencedFrameBrowserTest, AdComponents) {}

// Checked that navigator.adAuctionComponents() from an ad auction with
// components aren't leaked to other frames. In particular, check that they
// aren't provided to:
// * The main frame. It will throw an exception.
// * The fenced frame the ad component is loaded in, though it will have a list
//   of URNs that map to about:blank.
// * The ad fenced frame itself, after a renderer-initiated navigation.
IN_PROC_BROWSER_TEST_F(InterestGroupFencedFrameBrowserTest,
                       AdComponentsNotLeaked) {}

// Test navigating multiple fenced frames to the same render URL from a single
// auction, when the winning bid included ad components. All fenced frames
// navigated to the URL should get ad component URLs from the winning bid.
IN_PROC_BROWSER_TEST_F(InterestGroupFencedFrameBrowserTest,
                       AdComponentsMainAdLoadedInMultipleFrames) {}

// Test with multiple ad components. Also checks that ad component metadata is
// passed in correctly.
IN_PROC_BROWSER_TEST_F(InterestGroupFencedFrameBrowserTest,
                       MultipleAdComponents) {}

// These end-to-end tests validate that information from navigator-exposed APIs
// is correctly passed to worklets.

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       BuyerWorkletThrowsFailsAuction) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, ComponentAuction) {}

// Test the case of a component argument in the case a bidder refuses to
// participate in component auctions.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       ComponentAuctionBidderRefuses) {}

// Test the case of a component argument in the case the top-level seller
// refuses to participate in component auctions.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       ComponentAuctionTopLevelSellerRefuses) {}

// Test the case of a component argument in the case a component seller refuses
// to participate in component auctions.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       ComponentAuctionComponentSellerRefuses) {}

class InterestGroupWorkletValidationBrowserTest
    : public InterestGroupBrowserTest,
      public testing::WithParamInterface<bool> {};

// Use bidder and seller worklet files that validate their arguments all have
// the expected values.
IN_PROC_BROWSER_TEST_P(InterestGroupWorkletValidationBrowserTest,
                       ValidateWorkletParameters) {}

INSTANTIATE_TEST_SUITE_P();

// Same as above test, but leaves out the extra bidder and uses the older
// version 1 bidding signals format.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       ValidateWorkletParametersWithBiddingSignalsV1) {}

class InterestGroupComponentWorkletValidationBrowserTest
    : public InterestGroupBrowserTest,
      public testing::WithParamInterface<std::tuple<bool, bool>> {};

// Use bidder and seller worklet files that validate their arguments all have
// the expected values, in the case of an auction with one component auction.
IN_PROC_BROWSER_TEST_P(InterestGroupComponentWorkletValidationBrowserTest,
                       ComponentAuctionValidateWorkletParameters) {}

INSTANTIATE_TEST_SUITE_P();

// TODO(crbug.com/40266734): Remove this test once old names are no longer
// supported.
// Same as ComponentAuctionValidateWorkletParameters, but using deprecated names
// like decisionLogicUrl.
IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    ComponentAuctionValidateWorkletParametersOldRunAdAuctionNames) {}

// TODO(crbug.com/40266734): Remove this test once old names are no longer
// supported.
// Same as ComponentAuctionValidateWorkletParameters, but using deprecated names
// like decisionLogicUrl and new names like decisionLogicURL together, using the
// same values for each.
IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    ComponentAuctionValidateWorkletParametersOldRunAdAuctionNamesAndNewNames) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       SellerWorkletThrowsFailsAuction) {}

// JSON fields of joinAdInterestGroup() and runAdAuction() should support
// non-object types, like numbers.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       JoinInterestGroupNonObjectJSONFields) {}

// Test for auctionSignals, perBuyerSignals, and sellerSignals being passed to
// runAdAuction as promises.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, PromiseSignals) {}

// Test for abort before promises resolved.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, PromiseAborted) {}

// Test for auctionSignals, perBuyerSignals, directFromSellerSignals, and
// sellerSignals being passed to runAdAuction as promises... which resolve to
// nothing.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, PromiseSignalsNothing) {}

// Test for perBuyerTimeouts and perBuyerCumulativeTimeouts being passed to
// runAdAuction as promises.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       PromiseBuyerTimeoutsAndCumulativeBuyerTimeouts) {}

// Make sure that qutting with a live auction doesn't crash.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, QuitWithRunningAuction) {}

// These tests validate the `updateURL` and navigator.updateAdInterestGroups()
// functionality.

// The server JSON updates a number of updatable fields.
//
// The join and update events should be reported to devtools.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, UpdateAndReportToDevtools) {}

// The server JSON updates a number of updatable fields, using the deprecated
// `dailyUpdateUrl` field.
//
// TODO(crbug.com/40258629): Remove once support for `dailyUpdateUrl` is
// removed.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, DeprecatedDailyUpdateUrl) {}

// The server JSON updates a number of updatable fields, using the deprecated
// `dailyUpdateUrl` field, and the `updateURL` field. Both have the same value.
// This is what consumers are expected to due during migration from one name to
// the other, so best to make sure it works.
//
// TODO(crbug.com/40258629): Remove once support for `dailyUpdateUrl` is
// removed.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       UpdateUrlAndDeprecatedDailyUpdateUrl) {}

// Updates can proceed even if the page that started the update isn't running
// anymore.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       UpdateAndNavigateAwayStillCompletes) {}

// Bidders' generateBid() scripts that run forever should timeout. They will not
// affect other bidders or fail the auction.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionWithCustomPerBuyerTimeouts) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionWithCustomSellerTimeout) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionWithExperimentGroupId) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionWithLargeExperimentGroupId) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionWithPerBuyerExperimentGroupId) {}

// Test that the active multi-bid limit is properly passed all the way through
// to the bidder worklet's browserSignals.
IN_PROC_BROWSER_TEST_F(InterestGroupMultiBidBrowserTest,
                       RunAdAuctionWithPerBuyerMultiBidLimit) {}

// If both multi-bid and cookie deprecation trial are on, we turn multibid off,
// so access to its configuration does not happen.
IN_PROC_BROWSER_TEST_F(InterestGroupMultiBidAndCookieDeprecationBrowserTest,
                       RunAdAuctionWithPerBuyerMultiBidLimit) {}

// Validate that createAdRequest is available and be successfully called as part
// of PARAKEET.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, CreateAdRequestWorks) {}

// Validate that finalizeAd is available and be successfully called as part of
// PARAKEET.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, FinalizeAdWorks) {}

// The bidder worklet is served from a private network, everything else from a
// public network. The auction should fail.
IN_PROC_BROWSER_TEST_F(InterestGroupPrivateNetworkBrowserTest,
                       BidderOnPrivateNetwork) {}

IN_PROC_BROWSER_TEST_F(InterestGroupPrivateNetworkBrowserTest,
                       SellerOnPrivateNetwork) {}

// Have the auction and worklets server from public IPs, but send reports to a
// private network. The reports should be blocked.
IN_PROC_BROWSER_TEST_F(InterestGroupPrivateNetworkBrowserTest,
                       ReportToPrivateNetwork) {}

// Have all requests for an auction served from a public network, and all
// reports send there as well. The auction should succeed, and all reports
// should be sent.
IN_PROC_BROWSER_TEST_F(InterestGroupPrivateNetworkBrowserTest,
                       ReportToPublicNetwork) {}

// Make sure that the IPAddressSpace of the frame that triggers the update is
// respected for the update request. Does this by adding an interest group,
// trying to update it from a public page, and expecting the request to be
// blocked, and then adding another interest group and updating it from a
// private page, which should succeed. Have to use two interest groups to avoid
// the delay between updates.
IN_PROC_BROWSER_TEST_F(InterestGroupPrivateNetworkBrowserTest,
                       UpdatePublicVsPrivateNetwork) {}

// Create three interest groups, each belonging to different origins. Update one
// on a private network, but delay its server response. Update the second on a
// public network (thus expecting the request to be blocked). Update the final
// interest group on a private interest group -- it should be updated after the
// first two. After the server responds to the first update request, all updates
// should proceed -- the first should succeed, and the second should be blocked
// since the page is on a public network, and the third should succeed.
IN_PROC_BROWSER_TEST_F(InterestGroupPrivateNetworkBrowserTest,
                       PrivateNetProtectionsApplyToSubsequentUpdates) {}

// Join interest groups with local (private) update URLs, and run auctions from
// both a a main frame loaded with public address space, and with a private
// address space. The auctions trigger updates the interest groups, but only the
// frame using a private address space successfully updates the IG, since frames
// from public address spaces are blocked from making requests to servers with
// private addresses.
//
// Different interest groups (with different origins) are used for the public
// and private auction, to avoid running into update rate limits.
IN_PROC_BROWSER_TEST_F(InterestGroupPrivateNetworkBrowserTest,
                       PrivateNetProtectionsApplyToPostAuctionUpdates) {}

// Interest group APIs succeeded (i.e., feature join-ad-interest-group is
// enabled by Permissions Policy), and runAdAuction succeeded (i.e., feature
// run-ad-auction is enabled by Permissions Policy) in all contexts, because
// the kAdInterestGroupAPIRestrictedPolicyByDefault runtime flag is disabled by
// default and in that case the default value for those features are
// EnableForAll.
//
// This test both makes sure that's the case, and that a warning is displayed
// exactly when calls would fail if the default Permissions Policies were
// changed to EnableForSelf.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       FeaturesEnabledForAllByPermissionsPolicy) {}

// Features join-ad-interest-group and run-ad-auction can be disabled by HTTP
// headers, and they cannot be enabled again by container policy in that case.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, FeaturesDisabledByHttpHeader) {}

// Features join-ad-interest-group and run-ad-auction can be disabled by
// container policy.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       FeaturesDisabledByContainerPolicy) {}

// Interest group APIs succeeded (i.e., feature join-ad-interest-group is
// enabled by Permissions Policy), and runAdAuction succeeded (i.e., feature
// run-ad-auction is enabled by Permissions Policy) in
// (1) same-origin frames by default,
// (2) cross-origin iframes that enable those features in container policy
//     (iframe "allow" attribute).
// (3) cross-origin iframes that enables those features inside parent
//     cross-origin iframes that also enables those features.
IN_PROC_BROWSER_TEST_F(InterestGroupRestrictedPermissionsPolicyBrowserTest,
                       EnabledByPermissionsPolicy) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       LotsOfInterestGroupsEpsilonTimeout) {}

// Interest group APIs throw NotAllowedError (i.e., feature
// join-ad-interest-group is disabled by Permissions Policy), and runAdAuction
// throws NotAllowedError (i.e, feature run-ad-auction is disabled by
// Permissions Policy) in
// (1) same-origin iframes that disabled the features using allow attribute,
// (2) cross-origin iframes that don't enable those features in container policy
//     (iframe "allow" attribute).
// (3) iframes that enables those features inside parent cross-origin iframes
//     that don't enable those features.
IN_PROC_BROWSER_TEST_F(InterestGroupRestrictedPermissionsPolicyBrowserTest,
                       DisabledByContainerPolicy) {}

// Features join-ad-interest-group and run-ad-auction can be enabled/disabled
// separately.
IN_PROC_BROWSER_TEST_F(InterestGroupRestrictedPermissionsPolicyBrowserTest,
                       EnableOneOfInterestGroupAPIsAndAuctionAPIForIframe) {}

// Features join-ad-interest-group and run-ad-auction can be disabled by HTTP
// headers, and they cannot be enabled again by container policy in that case.
IN_PROC_BROWSER_TEST_F(InterestGroupRestrictedPermissionsPolicyBrowserTest,
                       DisabledByHttpHeader) {}

// navigator.deprecatedURNToURL returns null for an invalid URN.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, DeprecatedURNToURLInvalidURN) {}

// Tests navigator.deprecatedURNToURL for a valid URN. Covers both the cases
// where sendReports is false and true. Both are done in the same test because
// there's no way to wait until reports aren't sent, so first run a case that
// doesn't send reports, then run a case that does, and finally make sure that
// reports were only sent for the first case.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, DeprecatedURNToURLValidURN) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, ExecutionModeCompatibility) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, ExecutionModeGroupByOrigin) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       SharedStorageWriteFromGenerateBid) {}

enum FetchMethod {};

class InterestGroupBrowserAdAuctionHeadersTest
    : public InterestGroupBrowserTest {};

class InterestGroupBrowserAdAuctionHeadersAllMethodsAndOriginsTest
    : public InterestGroupBrowserAdAuctionHeadersTest,
      public ::testing::WithParamInterface<std::tuple<FetchMethod, bool>> {};

IN_PROC_BROWSER_TEST_P(
    InterestGroupBrowserAdAuctionHeadersAllMethodsAndOriginsTest,
    AdAuctionHeadersEligible_HasNoResponseHeaders) {}

IN_PROC_BROWSER_TEST_P(
    InterestGroupBrowserAdAuctionHeadersAllMethodsAndOriginsTest,
    AdAuctionHeadersEligible_HasAdAuctionResultResponseHeader) {}

IN_PROC_BROWSER_TEST_P(
    InterestGroupBrowserAdAuctionHeadersAllMethodsAndOriginsTest,
    AdAuctionHeadersEligible_HasAdAuctionSignalsResponseHeader) {}

IN_PROC_BROWSER_TEST_P(
    InterestGroupBrowserAdAuctionHeadersAllMethodsAndOriginsTest,
    AdAuctionHeadersEligible_HasAdAuctionAdditionalBidResponseHeader) {}

IN_PROC_BROWSER_TEST_P(
    InterestGroupBrowserAdAuctionHeadersAllMethodsAndOriginsTest,
    AdAuctionHeadersEligible_HasAllResponseHeaders) {}

// On site a.test, test fetch request that gets redirected. Only the initial
// request is expected to have the ad auction request header "?1"; its response
// headers are ignored. The redirect request doesn't retain the ad auction
// request header, and so its response headers are also ignored.
IN_PROC_BROWSER_TEST_P(
    InterestGroupBrowserAdAuctionHeadersAllMethodsAndOriginsTest,
    RedirectOnSameSite_AdAuctionHeadersNotEligible) {}

// On site a.test, test fetch request that gets redirected. Only the initial
// request is expected to have the ad auction request header "?1"; its response
// headers are ignored. The redirect request doesn't retain the ad auction
// request header, and so its response headers are also ignored. In the
// cross-origin test, the main site a.test makes a request to b.test, which
// redirects to c.test.
IN_PROC_BROWSER_TEST_P(
    InterestGroupBrowserAdAuctionHeadersAllMethodsAndOriginsTest,
    RedirectOnCrossSite_AdAuctionHeadersNotEligible) {}

IN_PROC_BROWSER_TEST_P(
    InterestGroupBrowserAdAuctionHeadersAllMethodsAndOriginsTest,
    NoAdAuctionRequestHeader_AdAuctionHeadersNotEligible) {}

INSTANTIATE_TEST_SUITE_P();

class InterestGroupBrowserAdAuctionHeadersAllMethodsTest
    : public InterestGroupBrowserAdAuctionHeadersTest,
      public ::testing::WithParamInterface<FetchMethod> {};

IN_PROC_BROWSER_TEST_P(
    InterestGroupBrowserAdAuctionHeadersAllMethodsTest,
    FetchNonAllowlistedCrossOrigin_HasAllResponseHeaders_AdAuctionHeadersNotEligible) {}

INSTANTIATE_TEST_SUITE_P();

// Runs an ad auction similar to the one in
// InterestGroupFencedFrameBrowserTest.RunAdAuctionWithWinner but also registers
// an ad beacon that is sent by the render URL.
IN_PROC_BROWSER_TEST_F(InterestGroupFencedFrameBrowserTest,
                       RunAdAuctionWithWinnerRegisterAdBeaconBuyer) {}

// Runs auction like Just like
// InterestGroupFencedFrameBrowserTest.RunAdAuctionWithWinner but also registers
// an ad beacon that is sent by the render URL. The ad beacon will not be sent
// out because the origin the beacon is being sent to (b.test) is not enrolled.
IN_PROC_BROWSER_TEST_F(InterestGroupFencedFrameBrowserTest,
                       RunAdAuctionWithWinnerRegisterUnenrolledAdBeaconBuyer) {}

// Runs an ad auction similar to the one in
// InterestGroupFencedFrameBrowserTest.RunAdAuctionWithWinner but also registers
// ad macros. The destination URL's ${} template is substituted with the ad
// macro's value if there is one, otherwise unsubstituted. A report is sent to
// the new destination URL.
IN_PROC_BROWSER_TEST_F(InterestGroupFencedFrameBrowserTest,
                       RunAdAuctionWithWinnerRegisterAdMacro) {}

// Runs an auction similar to
// InterestGroupFencedFrameBrowserTest.RunAdAuctionWithWinner, but also triggers
// sending a *private aggregation* event using `window.fence.reportEvent`.
IN_PROC_BROWSER_TEST_F(InterestGroupFencedFrameBrowserTest,
                       RunAdAuctionWithWinnerRegisterPrivateAggregationBuyer) {}

// Before M120: Leaving the interest group an ad component is not supported.
// M120 and afterwards: Leaving the group from an ad component that is same
// origin to interest group owner should succeed.
IN_PROC_BROWSER_TEST_F(InterestGroupFencedFrameBrowserTest,
                       SameOriginAdComponentsLeaveSucceed) {}

// Leaving the group from a site that is cross origin to interest group owner
// should always fail, regardless of whether this is an ad component or not.
IN_PROC_BROWSER_TEST_F(InterestGroupFencedFrameBrowserTest,
                       CrossOriginAdComponentsLeaveFail) {}

class InterestGroupAuctionLimitBrowserTest : public InterestGroupBrowserTest {};

// TODO(crbug.com/40817393): Investigate why this is failing on
// android-pie-x86-rel.
#if BUILDFLAG(IS_ANDROID)
#define MAYBE_NavigatingWithBfcachePreservesAuctionLimits
#else
#define MAYBE_NavigatingWithBfcachePreservesAuctionLimits
#endif  // BUILDFLAG(IS_ANDROID)

// Perform an auction, navigate the top-level frame, then navigate it back.
// Perform 2 more auctions. The second of those two should fail, because 2
// auctions have already been performed on the page -- one before the top level
// bfcached navigations, and one after.
//
// That is, the auction limit count is preserved due to bfcache.
IN_PROC_BROWSER_TEST_F(InterestGroupAuctionLimitBrowserTest,
                       MAYBE_NavigatingWithBfcachePreservesAuctionLimits) {}

// Create a page with a cross-origin iframe. Run an auction in the main frame,
// then run 2 auctions in the cross-origin iframe. The last auction should fail
// due to encontering the auction limit, since the limit is stored per-page (top
// level frame), not per frame.
IN_PROC_BROWSER_TEST_F(InterestGroupAuctionLimitBrowserTest,
                       AuctionLimitSharedWithCrossOriginFrameOnPage) {}

// forDebuggingOnly.reportAdAuctionLoss() and
// forDebuggingOnly.reportAdAuctionWin() APIs will be disabled (available but do
// nothing) when feature kBiddingAndScoringDebugReportingAPI is disabled.
class InterestGroupBiddingAndScoringDebugReportingAPIDisabledBrowserTest
    : public InterestGroupBrowserTest {};

IN_PROC_BROWSER_TEST_F(
    InterestGroupBiddingAndScoringDebugReportingAPIDisabledBrowserTest,
    RunAdAuctionWithDebugReporting) {}

// Test event-level reporting of ad component fenced frame. This test class is
// parameterized so that it tests the following scenarios, for an ad auction
// that results in a winning ad and a winning ad component.
// 1. Ad in fenced frame, ad component in a nested fenced frame.
// 2. Ad in fenced frame, ad component in a nested iframe.
// 3. Ad in iframe, ad component in a nested fenced frame.
// 4. Ad in iframe, ad component in a nested iframe.
// TODO(crbug.com/40060657): Once urn iframes are no longer supported, this test
// should only test scenario 1.
class InterestGroupAdComponentAutomaticBeaconBrowserTest
    : public InterestGroupFencedFrameBrowserTest,
      public testing::WithParamInterface<std::tuple<bool, bool>> {};

// Test window.fence.reportEvent from an ad component frame is disallowed:
// 1. Run an auction with an ad component.
// 2. Load the ad in a top-level frame.
// 3. Load the ad component in the nested frame.
// 4. Invoke window.fence.reportEvent from the nested ad component frame.
// 5. Expect reportEvent to fail because it is not allowed from an ad component.
// For an ad component, only reserved.top_navigation beacon is allowed.
IN_PROC_BROWSER_TEST_P(InterestGroupAdComponentAutomaticBeaconBrowserTest,
                       AdComponentReportEventNotAllowed) {}

// Test window.fence.reportEvent from an iframe nested under an ad component
// frame is also disallowed:
// 1. Run an auction with an ad component.
// 2. Load the ad in a top-level frame.
// 3. Load the ad component in the nested frame.
// 4. Navigate the iframe nested under the ad component frame.
// 5. Invoke window.fence.reportEvent from the nested iframe under the ad
// component frame.
// 6. Expect reportEvent to fail because it is not allowed from an iframe nested
// under an ad component frame.
// For such a frame, only reserved.top_navigation beacon is allowed.
IN_PROC_BROWSER_TEST_P(InterestGroupAdComponentAutomaticBeaconBrowserTest,
                       ReportEventNotAllowedInNestedIframeUnderAdComponent) {}

// Test automatic beacons from an ad component frames nested in the main ad
// frame:
// 1. Run an auction with an ad component.
// 2. Load the ad in a top-level frame.
// 3. Load the ad component in the nested frame.
// 4. Register the automatic beacon data.
// 5. Navigate to a same-origin url.
// 6. The automatic beacon from ad component is sent successfully.
IN_PROC_BROWSER_TEST_P(InterestGroupAdComponentAutomaticBeaconBrowserTest,
                       AdComponentSameOriginNavigation) {}

// Test automatic beacons from an ad component frames nested in the main ad
// frame:
// 1. Run an auction with an ad component.
// 2. Load the ad in a top-level frame.
// 3. Load the ad component in the nested frame.
// 4. Register the automatic beacon data.
// 5. Navigate to a cross-origin url.
// 6. The automatic beacon from ad component is sent successfully.
IN_PROC_BROWSER_TEST_P(InterestGroupAdComponentAutomaticBeaconBrowserTest,
                       AdComponentCrossOriginNavigation) {}

// Just like `AdComponentCrossOriginNavigation`, but with BackForwardCache
// disabled.
IN_PROC_BROWSER_TEST_P(InterestGroupAdComponentAutomaticBeaconBrowserTest,
                       AdComponentBFCacheDisabled) {}

// No beacon is sent if `setReportEventDataForAutomaticBeacons` is not invoked
// to register automatic beacon data in ad component.
IN_PROC_BROWSER_TEST_P(InterestGroupAdComponentAutomaticBeaconBrowserTest,
                       AdComponentNoBeaconDataRegistered) {}

// Set the event data to an empty string. The beacon should be sent.
IN_PROC_BROWSER_TEST_P(InterestGroupAdComponentAutomaticBeaconBrowserTest,
                       AdComponentEmptyEventData) {}

// No beacon is sent if the navigation is without user activation.
IN_PROC_BROWSER_TEST_P(InterestGroupAdComponentAutomaticBeaconBrowserTest,
                       AdComponentNoUserActivation) {}

// Call `setReportEventDataForAutomaticBeacons` without `eventData` field. The
// beacon should be sent with empty event data.
IN_PROC_BROWSER_TEST_P(InterestGroupAdComponentAutomaticBeaconBrowserTest,
                       AdComponentNoEventData) {}

INSTANTIATE_TEST_SUITE_P();

class InterestGroupBiddingAndAuctionServerDisabledBrowserTest
    : public InterestGroupBrowserTest {};

IN_PROC_BROWSER_TEST_F(
    InterestGroupBiddingAndAuctionServerDisabledBrowserTest,
    FetchSameOrigin_AdAuctionHeadersEligible_HasBothAdAuctionResultAndSignalsResponseHeader) {}

class BiddingAndAuctionServerAPIsOriginTrialBrowserTest
    : public ContentBrowserTest {};

IN_PROC_BROWSER_TEST_F(BiddingAndAuctionServerAPIsOriginTrialBrowserTest,
                       RightOTFeatureEnabled) {}

class InterestGroupBiddingAndAuctionServerBrowserTest
    : public InterestGroupBrowserTest {};

IN_PROC_BROWSER_TEST_F(InterestGroupBiddingAndAuctionServerBrowserTest,
                       TestEmpty) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBiddingAndAuctionServerBrowserTest,
                       TestInvalidSeller) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBiddingAndAuctionServerBrowserTest,
                       TestInvalidBuyer) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBiddingAndAuctionServerBrowserTest,
                       TestMissingBuyerSize) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBiddingAndAuctionServerBrowserTest,
                       TestInvalidComputedSize) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBiddingAndAuctionServerBrowserTest,
                       Preconnects) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBiddingAndAuctionServerBrowserTest,
                       UsesRequestSize) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBiddingAndAuctionServerBrowserTest,
                       UsesImplicitRequestSize) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBiddingAndAuctionServerBrowserTest,
                       TestInvalidCoordinator) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBiddingAndAuctionServerBrowserTest,
                       ChecksPermissionPolicyWarning) {}

// Check that the renderer doesn't crash if we don't have a decision logic URL.
IN_PROC_BROWSER_TEST_F(InterestGroupBiddingAndAuctionServerBrowserTest,
                       DecisionLogicURLNotRequired) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBiddingAndAuctionServerBrowserTest,
                       DecisionLogicURLRequiredForComponent) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBiddingAndAuctionServerBrowserTest,
                       DecisionLogicURLNotRequiredForServerComponent) {}

// TODO(crbug.com/40927353): Re-enable this test
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, AuctionNonceIsValid) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       AuctionNonceOnComponentIsValid) {}

// TODO(crbug.com/40275797): When negative targeting is fully
// implemented, we can directly observe that the auction or component auction
// that specified the invalid nonce isn't eligible to participate in the
// auction. Until then, we use the error emitted by the AuctionNonceManager to
// infer that it caught the invalid nonce.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       AuctionNonceNotFromCreateAuctionNonce) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       AuctionNonceOnComponentNotFromCreateAuctionNonce) {}

class InterestGroupKAnonmityEnforcedBrowserTest
    : public InterestGroupBrowserTest {};

IN_PROC_BROWSER_TEST_F(InterestGroupKAnonmityEnforcedBrowserTest,
                       DeprecatedKAnonEnforced) {}

class InterestGroupKAnonmityNotEnforcedBrowserTest
    : public InterestGroupBrowserTest {};

IN_PROC_BROWSER_TEST_F(InterestGroupKAnonmityNotEnforcedBrowserTest,
                       DeprecatedKAnonNotEnforced) {}

class InterestGroupKAnonmityEnforceAnonymityExposureDisabledTest
    : public InterestGroupBrowserTest {};

IN_PROC_BROWSER_TEST_F(
    InterestGroupKAnonmityEnforceAnonymityExposureDisabledTest,
    EnforceAnonymityExposureDisabled) {}

class InterestGroupBiddingAndAuctionServerRestrictedPermissionsPolicyBrowserTest
    : public InterestGroupBiddingAndAuctionServerBrowserTest {};

IN_PROC_BROWSER_TEST_F(
    InterestGroupBiddingAndAuctionServerRestrictedPermissionsPolicyBrowserTest,
    ChecksPermissionPolicyEnforce) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionWithAdditionalBid) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionWithAdditionalBidNoRegularBids) {}

// Two additional bids, second one of which wins.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionWithWinningAdditionalBidFromTwo) {}

// Two additional bids, the lower one of which wins since the upper one is
// disabled by negative targeting.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionWithWinningAdditionalBidFromTwoWithNT) {}

// If additional bid's script doesn't have necessary CORS permissions, it can
// still win, but the reporting worklet won't happen.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionWithWinningAdditionalBidNoCors) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionWithWrongCurrencyAdditionalBid) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionWithBrokenAdditionalBid) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionWithNoIGsAndEmptyAdditionalBids) {}

// Basic negative IG test: one negative IG specified in the additional bid,
// and it's present on the user's device, so it suppresses the additional bid.
IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    AdditionalBidWithOneValidAndPresentNegativeIGDoesNotBid) {}

// Same as AdditionalBidWithOneValidAndPresentNegativeIGDoesNotBid,
// but with IG bid and additional bid from different buyers.
IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    AdditionalBidFromDifferentBuyerAndOnePresentAndValidNegativeIGDoesNotBid) {}

// Additional bid buyers must be specified in interestGroupBuyers for the bid
// to participate in the auction.
IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    AdditionalBidWithBuyerNotIncludedInInterestGroupBuyersDoesNotBid) {}

// One negative IG specified in the additional bid, but it's not present on the
// user's device, so the additional bid participates in the auction and wins.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       AdditionalBidWithOneNotPresentNegativeIGSoDoesBid) {}

// Two negative IGs are specified in the additional bid, one is present
// on the user's device, the other is not, but because multiple negative IGs
// are interpreted as "suppress if any of these are present", the additional bid
// is suppressed.
IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    AdditionalBidWithMultipleNegativeIGsAndEvenOnePresentSoDoesNotBid) {}

// Like above, two negative IGs are specified in the additional bid, but this
// time both are present, giving it two reasons to suppress the additional bid.
IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    AdditionalBidWithMultipleNegativeIGsAndMultiplePresentSoStillDoesNotBid) {}

// Again, two negative IGs are specified in the additional bid, but this time,
// neither is present on the user's device, and so the additional bid
// participates in the auction and wins.
IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    AdditionalBidWithMultipleNegativeIGsButNeitherPresentSoDoesBid) {}

// An error scenario: One negative IG specified in the additional bid, but the
// signature associated with the key of that InterestGroup is invalid. (The
// signature is present, but can't be validated against the key specified.)
// As such, the negative IG is ignored, and so the bid participates in the
// auction and wins.
IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    AdditionalBidWithAPresentNegativeIGWithABadSignatureSoDoesBid) {}

// An error scenario: One negative IG specified in the additional bid, but the
// IG specifies a key for which there is no signature present on the signed
// additional bid. (A valid signature is present, but not one that can be used
// to validate that particular negative IG.) As such, the negative IG is
// ignored, and so the bid participates in the auction and wins.
IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    AdditionalBidWithAPresentNegativeIGWithNoMatchingSignagtureSoDoesBid) {}

// An error scenario: the additional bid specifies multiple negative IGs, both
// present. One has a bad signature, but the other is valid. Since only one
// valid negative IG is needed to suppress an additional bid, it's suppressed.
IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    AdditionalBidWithMultipleNegativeIGsOneValidAndOneBadSignatureSoDoesNotBid) {}

// An error scenario: the additional bid specifies multiple negative IGs, both
// present. This time, both have bad signatures. With all negative IGs ignored,
// the additional bid participates in the auction and wins.
IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    AdditionalBidWithMultipleNegativeIGsWithBadSignatureOnAllDoesBid) {}

// Two negative IGs, one with a joining origin that does match that identified
// in the additional bid, and one that does not. The negative targeting code
// ignores the negative IG with the bad joining origin, but still suppresses
// the additional bid because of the presence and validity of the other negative
// IG.
IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    AdditionalBidWithMultipleNegativeIGsOneWithWrongJoiningOriginDoesNotBid) {}

// Two negative IGs, both with a joining origins that do match that identified
// in the additional bid. The negative targeting code thus ignores both negative
// IGs, and the additional bid participates in the auction and wins.
IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    AdditionalBidWithMultipleNegativeIGsAllWithWrongJoiningOriginDoesBid) {}

// No additional bids is also fine. The additional bid always participates.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       AdditionalBidWithNoNegativeIGSAlwaysBids) {}

// If the additional bid is missing a topLevelSeller in a component auction, it
// does not bid.
IN_PROC_BROWSER_TEST_F(
    InterestGroupBrowserTest,
    AdditionalBidOnComponentAuctionMissingTopLevelSellerDoesNotBid) {}

// Here, the additional bid is on a component auction, and has no negative IG,
// so it does bid and win.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       AdditionalBidOnComponentAuctionWithNoNegativeIGDoesBid) {}

// Test to make sure that Promises configuration fields that are checked early
// on don't actually end up running their handlers if a later config check
// fails.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest,
                       RunAdAuctionPromiseSideEffects) {}

// Tests the order of events observed by the InterestGroupObserver. Those events
// are ultimately displayed in devtools, so want to provide them in a consistent
// order.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, NotificationOrder) {}

// Make sure we don't crash when cross-frame promise resolution tries to notify
// an auction in a detached frame.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, DetachedFramePromiseResolve) {}

IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, FeatureDetection) {}

// Worklet handling of zero seller timeout.
// See https://crbug.com/325302199
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, ZeroSellerTimeout) {}

// Worklet handling of zero buyer timeout. This actually seems to have worked
// correctly for a very long time.
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, ZeroBuyerTimeout) {}

// Cumulative timeout with lots of IGs while tracing is on,
// see https://crbug.com/336342803
IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTest, RunAdAuctionTraceTimeout) {}

class AuctionConfigReportingTimeoutEnabledTest
    : public InterestGroupBrowserTest {};

IN_PROC_BROWSER_TEST_F(AuctionConfigReportingTimeoutEnabledTest,
                       ReportingTimeoutPassedToWorklets) {}

IN_PROC_BROWSER_TEST_F(AuctionConfigReportingTimeoutEnabledTest,
                       ReportResultTimedOutWithCustomReportingTimeout) {}

IN_PROC_BROWSER_TEST_F(AuctionConfigReportingTimeoutEnabledTest,
                       ReportingTimeoutTopLevelNotAffectComponentAuction) {}

// Worklet handling of zero reporting timeout.
IN_PROC_BROWSER_TEST_F(AuctionConfigReportingTimeoutEnabledTest,
                       ZeroReportingTimeout) {}

IN_PROC_BROWSER_TEST_F(AuctionConfigReportingTimeoutEnabledTest,
                       ZeroComponentReportingTimeout) {}class AuctionConfigReportingTimeoutDisabledTest
    : public InterestGroupBrowserTest {}IN_PROC_BROWSER_TEST_F(AuctionConfigReportingTimeoutDisabledTest,
                       FeatureDetection) {}IN_PROC_BROWSER_TEST_F(AuctionConfigReportingTimeoutDisabledTest,
                       ReportResultTimedOutWithDefaultTimeout) {}IN_PROC_BROWSER_TEST_F(AuctionConfigReportingTimeoutDisabledTest,
                       ConfigReportingTimeoutIgnored) {}class InterestGroupBFCacheBrowserTest : public InterestGroupBrowserTest {}IN_PROC_BROWSER_TEST_F(
    InterestGroupBFCacheBrowserTest,
    CrossDocumentNavigationShouldNotResetAuctionInitiatorPageInBFCache) {}class InterestGroupAdComponentLimitBrowserTest
    : public InterestGroupBrowserTest {}IN_PROC_BROWSER_TEST_F(InterestGroupAdComponentLimitBrowserTest,
                       FeatureDetection) {}class InterestGroupOOPIFBrowserTest : public InterestGroupBrowserTest {}IN_PROC_BROWSER_TEST_F(InterestGroupOOPIFBrowserTest,
                       PageImplChangeDirectFromSellerSignals) {}class InterestGroupCrossOriginTrustedSignalsBrowserTest
    : public InterestGroupBrowserTest {}void InterestGroupCrossOriginTrustedSignalsBrowserTest::
    TestTrustedSellerSignals(bool expect_success,
                             bool add_cors_header,
                             bool add_script_header,
                             bool attest_signals_origin) {}void InterestGroupCrossOriginTrustedSignalsBrowserTest::
    TestTrustedBidderSignals(bool expect_success,
                             bool add_cors_header,
                             bool attest_signals_origin) {}IN_PROC_BROWSER_TEST_F(InterestGroupCrossOriginTrustedSignalsBrowserTest,
                       SellerSignalsPermitted) {}IN_PROC_BROWSER_TEST_F(InterestGroupCrossOriginTrustedSignalsBrowserTest,
                       SellerSignalsNoCors) {}IN_PROC_BROWSER_TEST_F(InterestGroupCrossOriginTrustedSignalsBrowserTest,
                       SellerSignalsNoScriptHeader) {}IN_PROC_BROWSER_TEST_F(InterestGroupCrossOriginTrustedSignalsBrowserTest,
                       SellerSignalsNoAttestation) {}IN_PROC_BROWSER_TEST_F(InterestGroupCrossOriginTrustedSignalsBrowserTest,
                       FeatureDetection) {}IN_PROC_BROWSER_TEST_F(InterestGroupCrossOriginTrustedSignalsBrowserTest,
                       BidderSignalsCors) {}IN_PROC_BROWSER_TEST_F(InterestGroupCrossOriginTrustedSignalsBrowserTest,
                       BidderSignalsNoCors) {}IN_PROC_BROWSER_TEST_F(InterestGroupCrossOriginTrustedSignalsBrowserTest,
                       BidderSignalsNoAttestation) {}class RealTimeReportingEnabledTest : public InterestGroupBrowserTest {}IN_PROC_BROWSER_TEST_F(RealTimeReportingEnabledTest, RealTimeReporting) {}IN_PROC_BROWSER_TEST_F(RealTimeReportingEnabledTest,
                       RealTimeReportingSellerDoesNotCallAPI) {}IN_PROC_BROWSER_TEST_F(RealTimeReportingEnabledTest,
                       RealTimeReportingBuyerDoesNotCallAPI) {}IN_PROC_BROWSER_TEST_F(RealTimeReportingEnabledTest,
                       RealTimeReportingRateLimitIsPerPagePerReportOrigin) {}IN_PROC_BROWSER_TEST_F(RealTimeReportingEnabledTest, FeatureDetection) {}class RealTimeReportingAndCookieDeprecationEnabledTest
    : public InterestGroupBrowserTest {}IN_PROC_BROWSER_TEST_F(RealTimeReportingAndCookieDeprecationEnabledTest,
                       RealTimeReporting) {}IN_PROC_BROWSER_TEST_F(RealTimeReportingAndCookieDeprecationEnabledTest,
                       FeatureDetection) {}class RealTimeReportingDisabledTest : public InterestGroupBrowserTest {}IN_PROC_BROWSER_TEST_F(RealTimeReportingDisabledTest, FeatureDetection) {}class InterestGroupPreconnectOwnerAndSignalsOriginsTest
    : public InterestGroupBrowserTest {}IN_PROC_BROWSER_TEST_F(InterestGroupPreconnectOwnerAndSignalsOriginsTest,
                       PreconnectsToOwnerAndSignalsOrigins) {}