chromium/content/browser/interest_group/auction_runner_unittest.cc

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

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

#include <stdint.h>

#include <functional>
#include <limits>
#include <map>
#include <memory>
#include <optional>
#include <string>
#include <string_view>
#include <utility>
#include <vector>

#include "base/base64.h"
#include "base/check.h"
#include "base/containers/contains.h"
#include "base/feature_list.h"
#include "base/functional/callback_helpers.h"
#include "base/json/json_writer.h"
#include "base/location.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/notreached.h"
#include "base/process/process.h"
#include "base/run_loop.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/test/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "base/uuid.h"
#include "build/build_config.h"
#include "components/cbor/values.h"
#include "components/cbor/writer.h"
#include "components/ukm/test_ukm_recorder.h"
#include "content/browser/aggregation_service/aggregation_service_features.h"
#include "content/browser/fenced_frame/fenced_frame_reporter.h"
#include "content/browser/interest_group/ad_auction_page_data.h"
#include "content/browser/interest_group/additional_bids_test_util.h"
#include "content/browser/interest_group/auction_metrics_recorder.h"
#include "content/browser/interest_group/auction_nonce_manager.h"
#include "content/browser/interest_group/auction_process_manager.h"
#include "content/browser/interest_group/auction_runner.h"
#include "content/browser/interest_group/auction_worklet_manager.h"
#include "content/browser/interest_group/debuggable_auction_worklet.h"
#include "content/browser/interest_group/debuggable_auction_worklet_tracker.h"
#include "content/browser/interest_group/interest_group_auction.h"
#include "content/browser/interest_group/interest_group_k_anonymity_manager.h"
#include "content/browser/interest_group/interest_group_manager_impl.h"
#include "content/browser/interest_group/interest_group_storage.h"
#include "content/browser/interest_group/mock_auction_process_manager.h"
#include "content/browser/interest_group/test_interest_group_manager_impl.h"
#include "content/browser/interest_group/test_interest_group_private_aggregation_manager.h"
#include "content/browser/renderer_host/render_frame_host_impl.h"
#include "content/public/browser/auction_result.h"
#include "content/public/browser/page.h"
#include "content/public/browser/site_instance.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/test_renderer_host.h"
#include "content/public/test/test_utils.h"
#include "content/services/auction_worklet/auction_v8_helper.h"
#include "content/services/auction_worklet/auction_worklet_service_impl.h"
#include "content/services/auction_worklet/public/cpp/real_time_reporting.h"
#include "content/services/auction_worklet/public/mojom/auction_shared_storage_host.mojom.h"
#include "content/services/auction_worklet/public/mojom/auction_worklet_service.mojom.h"
#include "content/services/auction_worklet/public/mojom/bidder_worklet.mojom.h"
#include "content/services/auction_worklet/public/mojom/private_aggregation_request.mojom.h"
#include "content/services/auction_worklet/public/mojom/real_time_reporting.mojom.h"
#include "content/services/auction_worklet/public/mojom/seller_worklet.mojom.h"
#include "content/services/auction_worklet/worklet_devtools_debug_test_util.h"
#include "content/services/auction_worklet/worklet_test_util.h"
#include "content/test/test_content_browser_client.h"
#include "crypto/sha2.h"
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "mojo/public/cpp/bindings/pending_associated_remote.h"
#include "mojo/public/cpp/system/functions.h"
#include "net/http/http_status_code.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/metrics/public/cpp/ukm_builders.h"
#include "services/metrics/public/cpp/ukm_source_id.h"
#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
#include "services/network/public/mojom/client_security_state.mojom.h"
#include "services/network/test/test_url_loader_factory.h"
#include "testing/gmock/include/gmock/gmock-matchers.h"
#include "testing/gtest/include/gtest/gtest.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_auction_currencies.h"
#include "third_party/blink/public/common/interest_group/interest_group.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-shared.h"
#include "third_party/blink/public/mojom/fenced_frame/fenced_frame.mojom-shared.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 "third_party/zlib/google/compression_utils.h"

TestDevToolsAgentClient;
HasSubstr;

namespace content {
class ProcessHandleTestPeer {};

namespace {

InterestGroupKey;
PostAuctionSignals;
ReportingDestination;
PrivateAggregationRequests;
RealTimeReportingType;
RealTimeReportingContributions;

// Same as the key in ad_auction_service_impl_unittest.cc.
// Randomly generated using EVP_HPKE_KEY_generate.
const uint8_t kTestPublicKey[] =;

// ED25519 key pairs used to test additional bids.
const char kBase64PublicKey1[] =;

const uint8_t kPrivateKey1[] =;

const char kBase64PublicKey2[] =;

const uint8_t kPrivateKey2[] =;

std::string kBidder1Name{};
const std::string kBidder1NameAlt{};
const char kBidder1DebugLossReportUrl[] =;
const char kBidder1DebugWinReportUrl[] =;
const char kBidder2DebugLossReportUrl[] =;
const char kBidder2DebugWinReportUrl[] =;

const char kBidderDebugLossReportBaseUrl[] =;
const char kBidderDebugWinReportBaseUrl[] =;
const char kSellerDebugLossReportBaseUrl[] =;
const char kSellerDebugWinReportBaseUrl[] =;

// Trusted bidding signals typically used for bidder1 and bidder2.
const char kBidder1SignalsJson[] =;
const char kBidder2SignalsJson[] =;

const char kPostAuctionSignalsPlaceholder[] =;

const char kTopLevelPostAuctionSignalsPlaceholder[] =;

const auction_worklet::mojom::PrivateAggregationRequestPtr
    kExpectedGenerateBidPrivateAggregationRequest =;

const auction_worklet::mojom::PrivateAggregationRequestPtr
    kExpectedKAnonFailureGenerateBidPrivateAggregationRequest =;

const auction_worklet::mojom::PrivateAggregationRequestPtr
    kExpectedReportWinPrivateAggregationRequest =;

const auction_worklet::mojom::PrivateAggregationRequestPtr
    kExpectedScoreAdPrivateAggregationRequest =;

const auction_worklet::mojom::PrivateAggregationRequestPtr
    kExpectedReportResultPrivateAggregationRequest =;

// Helper to avoid excess boilerplate.
template <typename... Ts>
auto ElementsAreRequests(Ts&... requests) {}

// Helper to avoid excess boilerplate.
template <typename... Ts>
auto ElementsAreContributions(Ts&... contributions) {}

// 0 `num_component_urls` means no component URLs, as opposed to an empty list
// (which isn't tested at this layer).
std::string MakeBidScript(const url::Origin& seller,
                          const std::string& bid,
                          const std::string& render_url,
                          int num_ad_components,
                          const url::Origin& interest_group_owner,
                          const std::string& interest_group_name,
                          bool has_signals = false,
                          const std::string& signal_key = "",
                          const std::string& signal_val = "",
                          bool report_post_auction_signals = false,
                          const std::string& debug_loss_report_url = "",
                          const std::string& debug_win_report_url = "",
                          bool report_reject_reason = false) {}

// This can be appended to the standard script to override the function.
constexpr char kReportWinNoUrl[] =;

constexpr char kSimpleReportWin[] =;

// A bid script that returns either `bid` or nothing depending on whether all
// incoming ads got filtered. If the interestGroup has components, the ad URL
// with /1 and /2 generated will be returned as components in the bid. Records
// privateAggregation events for "reserved.loss" to enable checking for kanon
// failure reporting.
std::string MakeFilteringBidScript(int bid) {}

// A bid script that always bids the same value + URL. If bid_currency is not
// an empty string, it will be returned, too.
std::string MakeConstBidScript(int bid,
                               const std::string& url,
                               const std::string& bid_currency = "USD") {}

// This can be appended to the standard script to override the function.
constexpr char kReportWinExpectNullAuctionSignals[] =;

constexpr char kMinimumDecisionScript[] =;

std::string MakeDecisionScript(
    const GURL& decision_logic_url,
    std::optional<GURL> send_report_url = std::nullopt,
    bool bid_from_component_auction_wins = false,
    bool report_post_auction_signals = false,
    const std::string& debug_loss_report_url = "",
    const std::string& debug_win_report_url = "",
    bool report_top_level_post_auction_signals = false) {}

std::string MakeAuctionScript(bool report_post_auction_signals = false,
                              const GURL& decision_logic_url = GURL(
                                  "https://adstuff.publisher1.com/auction.js"),
                              const std::string& debug_loss_report_url = "",
                              const std::string& debug_win_report_url = "") {}

std::string MakeAuctionScriptNoReportUrl(
    const GURL& decision_logic_url =
        GURL("https://adstuff.publisher1.com/auction.js"),
    bool report_post_auction_signals = false,
    const std::string& debug_loss_report_url = "",
    const std::string& debug_win_report_url = "") {}

const char kBasicReportResult[] =;

std::string MakeAuctionScriptReject2(
    const std::string& reject_reason = "not-available") {}

std::string MakeAuctionScriptReject1And2(
    const std::string& debug_loss_report_url = "",
    const std::string& debug_win_report_url = "") {}

// Treats interest group name as bid. Interest group name needs to be
// convertible to a valid number in order to use this script.
std::string MakeBidScriptSupportsTie() {}

// Score is 3 if bid is 3 or 4, otherwise score is 1.
std::string MakeAuctionScriptSupportsTie() {}

// Report generateBid()'s browserSignals.forDebuggingOnlyInCooldownOrLockout.
std::string MakeBidScriptWithForDebuggingOnlyInCooldownOrLockout() {}

// Report scoreAd()'s browserSignals.forDebuggingOnlyInCooldownOrLockout.
std::string MakeAuctionScriptWithForDebuggingOnlyInCooldownOrLockout() {}

std::string MakeBidScriptWithRealTimeReporting(int bid) {}

const char kDecisionScriptWithRealTimeReporting[] =;

// Represents an entry in trusted bidding signal's `perInterestGroupData` field.
struct BiddingSignalsPerInterestGroupData {};

// Creates a trusted bidding signals response body with the provided data.
std::string MakeBiddingSignalsWithPerInterestGroupData(
    std::vector<BiddingSignalsPerInterestGroupData> per_interest_group_data) {}

// Returns a report URL with given parameters for reportWin(), with post auction
// signals included in the URL
const GURL ReportWinUrl(
    double bid,
    const std::optional<blink::AdCurrency>& bid_currency,
    double highest_scoring_other_bid,
    const std::optional<blink::AdCurrency>& highest_scoring_other_bid_currency,
    bool made_highest_scoring_other_bid,
    const std::string& url = "https://buyer-reporting.example.com/") {}

// Returns a report URL with given parameters for forDebuggingOnly win/loss
// report APIs, with post auction signals included in the URL.
const GURL DebugReportUrl(
    const std::string& url,
    const PostAuctionSignals& signals,
    std::optional<double> bid = std::nullopt,
    std::optional<std::string> reject_reason = std::nullopt) {}

// Returns a report URL for component auction seller with given parameters for
// forDebuggingOnly win/loss report APIs, with post auction signals from both
// component auction and top level auction included in the URL. When no
// `top_level_signals` is needed, just use function DebugReportUrl().
const GURL ComponentSellerDebugReportUrl(
    const std::string& url,
    const PostAuctionSignals& signals,
    const PostAuctionSignals& top_level_signals,
    double bid) {}

// Builds a PrivateAggregationRequest with histogram contribution using given
// `bucket` and `value`.
const auction_worklet::mojom::PrivateAggregationRequestPtr
BuildPrivateAggregationRequest(
    absl::uint128 bucket,
    int value,
    blink::mojom::DebugModeDetailsPtr debug_mode_details = nullptr,
    std::optional<uint64_t> filtering_id = std::nullopt) {}

auction_worklet::mojom::EventTypePtr Reserved(
    auction_worklet::mojom::ReservedEventType reserved_event_type) {}

auction_worklet::mojom::EventTypePtr NonReserved(
    const std::string& event_type) {}

const auction_worklet::mojom::PrivateAggregationRequestPtr
BuildPrivateAggregationForEventRequest(
    absl::uint128 bucket,
    int value,
    auction_worklet::mojom::EventTypePtr event_type,
    std::optional<uint64_t> filtering_id = std::nullopt) {}

auction_worklet::mojom::PrivateAggregationRequestPtr
BuildPrivateAggregationForBaseValue(
    absl::uint128 bucket,
    auction_worklet::mojom::BaseValue base_value,
    auction_worklet::mojom::EventTypePtr event_type,
    std::optional<uint64_t> filtering_id = std::nullopt) {}

// Builds a RealTimeReportingContribution with given `bucket` and
// `priority_weight`.
const auction_worklet::mojom::RealTimeReportingContributionPtr
BuildRealTimeContribution(int32_t bucket, double priority_weight) {}

// Marks `ad` in `group` k-anonymous, double-checking that its url is `url`.
void AuthorizeKAnonAd(const blink::InterestGroup::Ad& ad,
                      const char* url,
                      StorageInterestGroup& group) {}

void AuthorizeKAnonReporting(const blink::InterestGroup::Ad& ad,
                             const char* url,
                             StorageInterestGroup& group,
                             base::optional_ref<const std::string>
                                 selected_buyer_and_seller_reporting_id) {}

void AuthorizeKAnonAdComponent(const blink::InterestGroup::Ad& ad,
                               const char* url,
                               StorageInterestGroup& group) {}

quiche::ObliviousHttpRequest::Context
CreateBiddingAndAuctionEncryptionContext() {}

class SameProcessAuctionProcessManager : public AuctionProcessManager {};

MATCHER_P2(HasMetricWithValue, key, matcher, "") {}

MATCHER_P(HasMetric, key, "") {}

MATCHER_P(DoesNotHaveMetric, key, "") {}

MATCHER_P2(OnlyHasMetricIf, key, condition, "") {}

MATCHER_P2(HasMetricWithValueOrNotIfNullOpt, key, matcher, "") {}

class EventReportingAttestationBrowserClient : public TestContentBrowserClient {};

class AuctionRunnerTest : public RenderViewHostTestHarness,
                          public AuctionWorkletManager::Delegate,
                          public DebuggableAuctionWorkletTracker::Observer {};

// Runs an auction with an empty buyers field.
TEST_F(AuctionRunnerTest, NullBuyers) {}

// Runs a component auction with all buyers fields null.
TEST_F(AuctionRunnerTest, ComponentAuctionNullBuyers) {}

// Runs an auction with an empty buyers field.
TEST_F(AuctionRunnerTest, EmptyBuyers) {}

// Runs a component auction with all buyers fields empty.
TEST_F(AuctionRunnerTest, ComponentAuctionEmptyBuyers) {}

// Runs the standard auction, but without adding any interest groups to the
// manager.
TEST_F(AuctionRunnerTest, NoInterestGroups) {}

// Runs a component auction, but without adding any interest groups to the
// manager.
TEST_F(AuctionRunnerTest, ComponentAuctionNoInterestGroups) {}

// Runs an standard auction, but with an interest group that does not list any
// ads.
TEST_F(AuctionRunnerTest, OneInterestGroupNoAds) {}

// Runs an auction with one component that has a buyer with an interest group,
// but that group has no ads.
TEST_F(AuctionRunnerTest, ComponentAuctionOneInterestGroupNoAds) {}

// Runs an standard auction, but with an interest group that does not list a
// bidding script.
TEST_F(AuctionRunnerTest, OneInterestGroupNoBidScript) {}

// Runs the standard auction, but with only adding one of the two standard
// interest groups to the manager.
TEST_F(AuctionRunnerTest, OneInterestGroup) {}

// An auction specifying buyer and seller experiment IDs.
TEST_F(AuctionRunnerTest, ExperimentId) {}

// An auction specifying a per-buyer experiment ID as well as fallback all-buyer
// experiment id.
TEST_F(AuctionRunnerTest, ExperimentIdPerBuyer) {}

// An auction with two successful bids.
TEST_F(AuctionRunnerTest, Basic) {}

TEST_F(AuctionRunnerTest, BasicCurrencyCheck) {}

TEST_F(AuctionRunnerTest, BasicCurrencyRedact) {}

TEST_F(AuctionRunnerTest, BasicCurrencyRedact2) {}

TEST_F(AuctionRunnerTest, BasicDebug) {}

TEST_F(AuctionRunnerTest, WorkletServiceGetNextSellerWorkletThreadIndex) {}

TEST_F(AuctionRunnerTest, BidderThreadPoolExpanded) {}

// Regression test for crbug.com/349067504: partial reset of the per-process
// bidder thread pool, with subsequent reuse of the reset entry. Expect
// successful execution.
//
// Steps:
// 1. Start Worklet Service 1, load a Bidder Worklet (requesting 2 threads).
// 2. Start Worklet Service 2, load a Bidder Worklet (requesting 1 thread).
// 3. Destroy Worklet Service 1.
// 4. Start Worklet Service 3, load a Bidder Worklet (requesting 2 threads).
TEST_F(AuctionRunnerTest, BidderThreadPoolPartiallyResetAndSubsequentlyReused) {}

TEST_F(AuctionRunnerTest, PauseBidder) {}

TEST_F(AuctionRunnerTest, PauseSeller) {}

// A component auction with two successful bids from different components.
TEST_F(AuctionRunnerTest, ComponentAuction) {}

// Test of a component auction where top-level seller and intermediate one use
// different currencies.
TEST_F(AuctionRunnerTest, ComponentAuctionMixedCurrency) {}

// Test of a component auction where top-level seller and intermediate one use
// different currencies, with two components.
TEST_F(AuctionRunnerTest, ComponentAuctionMixedCurrency2) {}

// Test of currency handling in a component auction where bid is passed
// straight through by the component seller.
TEST_F(AuctionRunnerTest, ComponentAuctionCurrencyPassThrough) {}

// Test of currency handling in a component auction where bid is passed
// straight through by the component seller --- verifying it's checked against
// sellerCurrency of the component auction.
TEST_F(AuctionRunnerTest, ComponentAuctionCurrencyPassThroughCheck) {}

// Test a component auction where the top level seller rejects all bids. This
// should fail with kAllBidsRejected instead of kNoBids.
TEST_F(AuctionRunnerTest, ComponentAuctionTopSellerRejectsBids) {}

// Test case where the two components have the same buyer, which makes different
// bids for both auctions.
//
// This tests that parameters are separated, that bid counts are updated
// correctly, and how histograms are updated in these cases.
TEST_F(AuctionRunnerTest, ComponentAuctionSharedBuyer) {}

// Test case where a single component auction accepts one bid and rejects
// another. This is a regression test for https://crbug.com/1321941, where a
// rejected bid from a component auction would be treated as a security error,
// and result in bidding in the component auction being aborted, and all
// previous bids being thrown out.
TEST_F(AuctionRunnerTest, ComponentAuctionAcceptsBidRejectsBid) {}

// A component auction with one component that has two buyers. In this auction,
// the top-level auction would score kBidder2 higher (since it bids more), but
// kBidder1 wins this auction, because the component auctions use a different
// scoring function, which favors kBidder1's lower bid.
TEST_F(AuctionRunnerTest, ComponentAuctionOneComponentTwoBidders) {}

// Test the case a top-level seller returns no signals in its reportResult
// method. The default scripts return signals, so only need to individually test
// the no-value case.
TEST_F(AuctionRunnerTest, ComponentAuctionNoTopLevelReportResultSignals) {}

TEST_F(AuctionRunnerTest, ComponentAuctionModifiesBid) {}

// An auction in which the seller origin is not allowed to use the interest
// group API.
TEST_F(AuctionRunnerTest, DisallowedSeller) {}

// A component auction in which the component seller is disallowed, and the
// top-level seller has no buyers.
TEST_F(AuctionRunnerTest, DisallowedComponentAuctionSeller) {}

// A component auction in which the one component seller is disallowed, but the
// other is not.
TEST_F(AuctionRunnerTest, DisallowedComponentAuctionOneSeller) {}

// An auction in which the buyer origins are not allowed to use the interest
// group API.
TEST_F(AuctionRunnerTest, DisallowedBuyers) {}

// Run the standard auction, but disallow one bidder from participating.
TEST_F(AuctionRunnerTest, DisallowedSingleBuyer) {}

// A component auction in which all buyers are disallowed.
TEST_F(AuctionRunnerTest, DisallowedComponentAuctionBuyers) {}

// A component auction in which a single buyer is disallowed.
TEST_F(AuctionRunnerTest, DisallowedComponentAuctionSingleBuyer) {}

// Disallow bidders as sellers and disallow seller as bidder. Auction should
// still succeed.
TEST_F(AuctionRunnerTest, DisallowedAsOtherParticipant) {}

// An auction where one bid is successful, another's script 404s.
TEST_F(AuctionRunnerTest, OneBidOne404) {}

// An auction where one component seller fails to load, but the other loads, so
// the auction succeeds.
TEST_F(AuctionRunnerTest, ComponentAuctionOneSeller404) {}

// An auction where one bid is successful, another's script does not provide a
// bidding function.
TEST_F(AuctionRunnerTest, OneBidOneNotMade) {}

// An auction where no bidding scripts load successfully.
TEST_F(AuctionRunnerTest, NoBids) {}

// An auction where none of the bidding scripts has a valid bidding function.
TEST_F(AuctionRunnerTest, NoBidMadeByScript) {}

// An auction where the seller script doesn't have a scoring function.
TEST_F(AuctionRunnerTest, SellerRejectsAll) {}

// An auction where seller rejects one bid when scoring.
TEST_F(AuctionRunnerTest, SellerRejectsOne) {}

// An auction where the seller script fails to load.
TEST_F(AuctionRunnerTest, NoSellerScript) {}

// An auction where bidders don't request trusted bidding signals.
TEST_F(AuctionRunnerTest, NoTrustedBiddingSignals) {}

// An auction where trusted bidding signals are requested, but the fetch 404s.
TEST_F(AuctionRunnerTest, TrustedBiddingSignals404) {}

// A successful auction where seller reporting worklet doesn't set a URL.
TEST_F(AuctionRunnerTest, NoReportResultUrl) {}

// A successful auction where bidder reporting worklet doesn't set a URL.
TEST_F(AuctionRunnerTest, NoReportWinUrl) {}

// A successful auction where neither reporting worklets sets a URL.
TEST_F(AuctionRunnerTest, NeitherReportUrl) {}

// Test the case where the seller worklet provides no signals for the winner,
// since it has no reportResult() method. The winning bidder's reportWin()
// function should be passed null as `sellerSignals`, and should still be able
// to send a report.
TEST_F(AuctionRunnerTest, NoReportResult) {}

TEST_F(AuctionRunnerTest, TrustedScoringSignals) {}

// Test that shows we reliably wait for promises to resolve even if nothing
// participates in the IG.
TEST_F(AuctionRunnerTest, PromiseCheckNoBidders) {}

// An auction that passes auctionSignals via promises. This makes sure to
// order worklet process creation before promise delivery (compare to
// PromiseAuctionSignalsDeliveredBeforeWorklet).
TEST_F(AuctionRunnerTest, PromiseAuctionSignals) {}

// Checks case where auction signals promises resolves before the bidder worklet
// process is ready.
TEST_F(AuctionRunnerTest, PromiseAuctionSignalsDeliveredBeforeWorklet) {}

// An auction that passes sellerSignals and auctionSignals via promises.
TEST_F(AuctionRunnerTest, PromiseSignals) {}

// An auction that passes sellerSignals and auctionSignals via promises.
// Empty values are provided, which causes the validation scripts to complain.
TEST_F(AuctionRunnerTest, PromiseSignals2) {}

// An auction that passes perBuyerSignals, perBuyerTimeouts,
// perBuyerCumulativeTimeouts, and perBuyerCurrencies via promises.
TEST_F(AuctionRunnerTest, PromiseSignals3) {}

// An auction that passes perBuyerSignals and perBuyerTimeouts via promises.
// Empty values are provided, which causes the validation scripts to complain.
TEST_F(AuctionRunnerTest, PromiseSignals4) {}

// An auction that passes empty additionalBids via a promise (in that headers
// are never observed carrying them).
TEST_F(AuctionRunnerTest, PromiseSignalsAdditionalBids) {}

// Runs an auction that passes auctionSignals via a promise, and makes sure that
// URL fetches begin, and worklet processes are launched, before the promise is
// resolved.
TEST_F(AuctionRunnerTest, PromiseSignalsParallelism) {}

TEST_F(AuctionRunnerTest, PromiseSignalsResolveAfterAbort) {}

TEST_F(AuctionRunnerTest, PromiseSignalsComponentAuction) {}

// Test what happens when a network error on seller JS happens in a component
// auction (kComponentSeller2 below) that had no bids but potential additional
// bids, with promise coming in after the error.
//
// See https://crbug.com/1488417
TEST_F(AuctionRunnerTest, PromiseAndNetworkErrors) {}

// Test what happens when a component auction has a network error on bidder
// JS (kBidder2Url), then seller JS (kComponentSeller2Url), then a promise
// coming in.
//
// See https://crbug.com/1488417
TEST_F(AuctionRunnerTest, PromiseAndNetworkErrors2) {}

// Test what happens when a component auction has a network error on bidder
// JS, then seller JS, then a promise for header-based direct from seller
// sigmals coming in --- in particular we should not be spending time
// parsing those signals since the component auction already failed
// (so there should be no error to the fact that the value for the slot is
//  actually missing).
//
// See https://crbug.com/1488417
TEST_F(AuctionRunnerTest, PromiseAndNetworkErrors3) {}

// Coverage of what happens when promises come in for a component auction that
// got dropped at the database load stage, due to not having anything to bid,
// including that it still gets error-checked.
TEST_F(AuctionRunnerTest, PromiseSignalsComponentAuctionRejected) {}

// Make sure the scoring portion of the auction waits to have promises resolved.
// Checking at bidding time is not enough since a top-level auction can receive
// bids to score from component auctions, and those complete their configuration
// independently.
TEST_F(AuctionRunnerTest, PromiseSignalsSellerDependency) {}

TEST_F(AuctionRunnerTest, PromiseSignalsBadAuctionId) {}

TEST_F(AuctionRunnerTest, PromiseSignalsBadAuctionId2) {}

TEST_F(AuctionRunnerTest, PromiseSignalsBadAuctionId3) {}

TEST_F(AuctionRunnerTest, PromiseSignalsBadAuctionId4) {}

TEST_F(AuctionRunnerTest, PromiseSignalsBadAuctionId5) {}

TEST_F(AuctionRunnerTest, PromiseSignalsBadAuctionId6) {}

TEST_F(AuctionRunnerTest, PromiseSignalsBadAuctionIdAdditionalBids) {}

// An auction where the winning additional bid claims to be from an IG the user
// is already in.
TEST_F(AuctionRunnerTest, AdditionalBidAliasesInterestGroup) {}

// An auction where the winning additional bid claims to be from an IG the user
// is not in.
TEST_F(AuctionRunnerTest, AdditionalBidDistinctFromInterestGroup) {}

class AuctionRunnerDfssAdSlotTest : public AuctionRunnerTest {};

TEST_F(AuctionRunnerDfssAdSlotTest,
       PromiseSignalsBadAuctionIdDirectFromSellerSignalsHeaderAdSlot) {}

TEST_F(AuctionRunnerTest, PromiseInvalidDirectFromSellerSignals) {}

// An auction that passes directFromSellerSignalsHeaderAdSlot via a promise.
TEST_F(AuctionRunnerDfssAdSlotTest,
       PromiseDirectFromSellerSignalsHeaderAdSlot) {}

// An auction that passes nullopt directFromSellerSignalsHeaderAdSlot via a
// promise.
TEST_F(AuctionRunnerDfssAdSlotTest,
       PromiseNulloptDirectFromSellerSignalsHeaderAdSlot) {}

// An auction that passes directFromSellerSignalsHeaderAdSlot via a promise.
// JSON parsing completes before other promises resolve.
TEST_F(AuctionRunnerDfssAdSlotTest,
       PromiseDirectFromSellerSignalsHeaderAdSlotResolvesBeforePromises) {}

// An auction that passes directFromSellerSignalsHeaderAdSlot via a promise --
// encountered errors are reported.
TEST_F(AuctionRunnerDfssAdSlotTest,
       PromiseDirectFromSellerSignalsHeaderAdSlotReportsErrors) {}

// Trying to update auctionSignals which wasn't originally passed in as a
// promise.
TEST_F(AuctionRunnerTest, PromiseSignalsUpdateNonPromise) {}

// Trying to update auctionSignals twice.
TEST_F(AuctionRunnerTest, PromiseSignalsUpdateNonPromise2) {}

// Trying to update sellerSignals which wasn't originally passed in as a
// promise.
TEST_F(AuctionRunnerTest, PromiseSignalsUpdateNonPromise3) {}

// Trying to update sellerSignals twice.
TEST_F(AuctionRunnerTest, PromiseSignalsUpdateNonPromise4) {}

// Trying to update perBuyerSignals twice.
TEST_F(AuctionRunnerTest, PromiseSignalsUpdateNonPromise5) {}

// Trying to update buyer timeouts twice.
TEST_F(AuctionRunnerTest, PromiseSignalsUpdateNonPromise6) {}

// Trying to update buyer cumulative timeouts twice.
TEST_F(AuctionRunnerTest, PromiseSignalsUpdateNonPromise7) {}

// Trying to update direct from seller signals twice.
TEST_F(AuctionRunnerTest, PromiseSignalsUpdateNonPromise8) {}

// Server response was not passed in, but promise response called.
TEST_F(AuctionRunnerTest, PromiseServerResponseUpdateNonPromise) {}

// Server response passed in, but promise response called twice.
TEST_F(AuctionRunnerTest, PromiseServerResponseResolveTwice) {}

// Trying to update perBuyerCurrencies twice.
TEST_F(AuctionRunnerTest, PromiseSignalsUpdateNonPromise9) {}

// Trying to update additionalBids twice.
TEST_F(AuctionRunnerTest, PromiseSignalsUpdateNonPromiseAdditionalBids) {}

// Trying to update directFromSellerSignalsHeaderAdSlot twice.
TEST_F(AuctionRunnerDfssAdSlotTest,
       PromiseSignalsUpdateNonPromiseDirectFromSellerSignalsHeaderAdSlot) {}

class AuctionRunnerDfssAdSlotDisabledTest : public AuctionRunnerTest {};

// Trying to pass directFromSellerSignalsHeaderAdSlot when the
// directFromSellerSignalsHeaderAdSlot feature is off.
TEST_F(AuctionRunnerDfssAdSlotDisabledTest,
       PromiseDirectFromSellerSignalsHeaderAdSlotFeatureOff) {}

// Test the case where the ProcessManager initially prevents creating worklets,
// due to being at its process limit.
TEST_F(AuctionRunnerTest, ProcessManagerBlocksWorkletCreation) {}

// Tests ComponentAuctions and their interactions with the ProcessManager
// delaying worklet creation.
TEST_F(AuctionRunnerTest, ComponentAuctionProcessManagerBlocksWorkletCreation) {}

// Test a seller worklet load failure while waiting on bidder worklet processes
// to be allocated. Most of the tests for global seller worklet failures at a
// particular phase use seller crashes instead of load errors (see SellerCrash
// test), but this case is simplest to test with a seller load error.
TEST_F(AuctionRunnerTest, SellerLoadErrorWhileWaitingForBidders) {}

// Tests ComponentAuction where a component seller worklet has a load error with
// a hanging bidder worklet request. The auction runs when the process manager
// only has 1 bidder and 1 seller slot, so this test makes sure that in this
// case the bidder and seller processes are freed up, so they don't potentially
// cause deadlock preventing the auction from completing.
TEST_F(AuctionRunnerTest,
       ComponentAuctionSellerWorkletLoadErrorWithPendingBidderLoad) {}

// Test to make sure SendPendingSignalsRequests is called on a seller worklet
// if the worklet becomes available only after everything is queued.
TEST_F(AuctionRunnerTest, LateSellerWorkletSendPendingSignalsRequestsCalled) {}

// Test the case where two interest groups use the same BidderWorklet, with a
// trusted bidding signals URL. The requests should be batched. This test
// basically makes sure that SendPendingSignalsRequests() is only invoked on the
// BidderWorklet after both GenerateBid() calls have been invoked.
TEST_F(AuctionRunnerTest, ReusedBidderWorkletBatchesSignalsRequests) {}

TEST_F(AuctionRunnerTest, AllBiddersCrashBeforeBidding) {}

// Test the case a single bidder worklet crashes before bidding. The auction
// should continue, without that bidder's bid.
TEST_F(AuctionRunnerTest, BidderCrashBeforeBidding) {}

// Should not have any debugging win/loss report URLs after auction when feature
// kBiddingAndScoringDebugReportingAPI is not enabled.
TEST_F(AuctionRunnerTest, ForDebuggingOnlyReportingWithDebugFeatureDisabled) {}

// If the seller crashes before all bids are scored, the auction fails. Seller
// load failures look the same to auctions, so this test also covers load
// failures in the same places. Note that a seller worklet load error while
// waiting for bidder worklet processes is covered in another test, and looks
// exactly like a crash at the same point to the AuctionRunner.
TEST_F(AuctionRunnerTest, SellerCrash) {}

TEST_F(AuctionRunnerTest, ComponentAuctionAllBiddersCrashBeforeBidding) {}

// Test the case that one component has both bidders, one of which crashes, to
// make sure a single bidder crash doesn't result in the component auction
// failing.
TEST_F(AuctionRunnerTest, ComponentAuctionOneBidderCrashesBeforeBidding) {}

// Test the case that all component sellers crash.
TEST_F(AuctionRunnerTest, ComponentAuctionComponentSellersAllCrash) {}

// Test cases where a component seller returns an invalid
// ComponentAuctionModifiedBidParams.
TEST_F(AuctionRunnerTest, ComponentAuctionComponentSellerBadBidParams) {}

// Test cases where a top-level seller returns an
// ComponentAuctionModifiedBidParams, which should result in failing the
// auction.
TEST_F(AuctionRunnerTest, TopLevelSellerBadBidParams) {}

TEST_F(AuctionRunnerTest, NullAdComponents) {}

// Test that the limit of kMaxAdComponents ad components per bid is enforced.
TEST_F(AuctionRunnerTest, AdComponentsLimit) {}

// Test cases where a bad bid is received over Mojo. Bad bids should be rejected
// in the Mojo process, so these are treated as security errors.
TEST_F(AuctionRunnerTest, BadBid) {}

// Testcase for mojo errors in ScoreAd result's bid_in_seller_currency; note
// that problems with ComponentAuctionModifiedBidParams are covered in
// *BadBidParams* tests and those with debug URLs in
// ForDebuggingOnlyReportingSellerBadUrls.
TEST_F(AuctionRunnerTest, BadScoreAdBidInSellerCurrency) {}

// Invalid scoreAd() scores are rejected as bad messages.
TEST_F(AuctionRunnerTest, BadScoreAdScore) {}

// Check that BidderWorklets that don't make a bid are destroyed immediately.
TEST_F(AuctionRunnerTest, DestroyBidderWorkletWithoutBid) {}

// Check that the winner of ties is randomized. Mock out bidders so can make
// sure that which bidder wins isn't changed just due to script execution order
// changing.
TEST_F(AuctionRunnerTest, Tie) {}

// Test worklets completing in an order different from the one in which they're
// invoked.
TEST_F(AuctionRunnerTest, WorkletOrder) {}

// Check that the top bid and `highestScoringOtherBid` are randomized in a 3-way
// tie for the highest bid.
TEST_F(AuctionRunnerTest, ThreeWayTie) {}

// Test the case where there's one IG with two groups, a size limit of 1, and
// the highest priority group has no bid script. The lower priority group should
// get a chance to bid, rather than being filtered out.
TEST_F(AuctionRunnerTest, SizeLimitHighestPriorityGroupHasNoBidScript) {}

TEST_F(AuctionRunnerTest, ExecutionModeGroupByOrigin) {}

// With a scaling factor of 1.0, and with 9 interest groups, one thread will be
// requested for the bidder worklet.
TEST_F(AuctionRunnerTest, SmallInterestGroupsCount_OneBidderThreadRequested) {}

// with a scaling factor of 1.0, and with 10 interest groups, two threads will
// be requested for the bidder worklet.
TEST_F(AuctionRunnerTest, LargeInterestGroupsCount_TwoBidderThreadsRequested) {}

// Test the case where the only bidder times out due to the
// perBuyerCumulativeTimeouts.
TEST_F(AuctionRunnerTest, PerBuyerCumulativeTimeouts) {}

// Test the case where the perBuyerCumulativeTimeout expires during the
// scoreAd() call. The bid should not be timed out.
TEST_F(AuctionRunnerTest,
       PerBuyerCumulativeTimeoutsTimeoutPassesDuringScoreAd) {}

// Test the case where a pending promise delays the start of the
// perBuyerCumulativeTimeout, but generating a bid still times out since
// perBuyerCumulativeTimeout passes after promise resolution.
TEST_F(AuctionRunnerTest,
       PerBuyerCumulativeTimeoutsPromiseDelaysTimeoutButStillTimesOut) {}

// Test the case where a pending promise delays the start of the
// perBuyerCumulativeTimeout, and a bid is ultimately generated successfully
// because of the delayed promise resolution.
TEST_F(AuctionRunnerTest,
       PerBuyerCumulativeTimeoutsPromiseDelaysTimeoutAndNoTimeout) {}

// Test that the cumulative timeout only starts once a process is assigned.
TEST_F(AuctionRunnerTest, PerBuyerCumulativeTimeoutsWaitForProcess) {}

// Test the case where the only bidder times out due to the
// perBuyerCumulativeTimeout's "*" field.
TEST_F(AuctionRunnerTest, PerBuyerCumulativeTimeoutsAllBuyersTimeout) {}

// Auction with only one interest group participating. The priority calculated
// using its priority vector is negative, so it should be filtered out, and
// there should be no winner.
TEST_F(AuctionRunnerTest, PriorityVectorFiltersOnlyGroup) {}

// Check that when the priority vector calculation results in a zero priority,
// the interest group is not filtered.
TEST_F(AuctionRunnerTest, PriorityVectorZeroPriorityNotFiltered) {}

// Check that both empty and null priority signals vectors are ignored.
TEST_F(AuctionRunnerTest, EmptyPriorityVector) {}

// Run an auction where there are two interest groups with the same owner, and a
// limit of one interest group per buyer. One group has a higher base priority,
// but the other group has a higher priority after the priority vector is taken
// into account, so should be the only bidder to participate in the auction.
TEST_F(AuctionRunnerTest, PriorityVector) {}

// Auction with only one interest group participating. The priority calculated
// using the priority vector fetch in bidding signals is negative, so it should
// be filtered out after the bidding signals fetch, and there should be no
// winner.
TEST_F(AuctionRunnerTest,
       TrustedBiddingSignalsPriorityVectorOnlyGroupFiltered) {}

// Auction with only one interest group participating. The priority calculated
// using the priority vector fetch in bidding signals is zero, so it should
// not be filtered out.
TEST_F(AuctionRunnerTest,
       TrustedBiddingSignalsPriorityVectorOnlyGroupNotFiltered) {}

// Auction with two interest groups participating, both with the same owner. The
// priority calculated using the priority vector fetch in bidding signals is
// negative for both groups. The group limit is 1 and
// `enable_bidding_signals_prioritization` is set to true for one of the groups,
// so the auction should be set up to filter only after all priority vectors
// have been received, but then they eliminates both interest groups.
TEST_F(AuctionRunnerTest,
       TrustedBiddingSignalsPriorityVectorBothGroupsFiltered) {}

// Auction with two interest groups participating, both with the same owner.
// The priority calculated using the priority vector fetch in bidding signals is
// negative for the first group to receive trusted signals (which is group 2).
// The group limit is 1 and `enable_bidding_signals_prioritization` is set to
// true for one of the groups, so the auction should be set up to filter only
// after all priority vectors have been received.
//
// The two interest groups use different trusted signals URLs, so the order the
// responses are received in can be controlled.
TEST_F(AuctionRunnerTest,
       TrustedBiddingSignalsPriorityVectorFirstGroupFiltered) {}

// Auction with two interest groups participating, both with the same owner.
// The priority calculated using the priority vector fetch in bidding signals is
// negative for the second group to receive trusted signals (which is group 2).
// The group limit is 1 and `enable_bidding_signals_prioritization` is set to
// true for one of the groups, so the auction should be set up to filter only
// after all priority vectors have been received.
//
// The two interest groups use different trusted signals URLs, so the order the
// responses are received in can be controlled.
TEST_F(AuctionRunnerTest,
       TrustedBiddingSignalsPriorityVectorSecondGroupFiltered) {}

// Auction with two interest groups participating, both with the same owner.
// The priority calculated using the priority vector fetch in bidding signals is
// negative for both groups. The group limit is 1 and
// `enable_bidding_signals_prioritization` is set to true for one of the groups,
// so the auction should be set up to filter only after all priority vectors
// have been received.
//
// In this test, the group with the lower priority is removed when enforcing the
// per-bidder size limit. The other interest group goes on to win the auction.
TEST_F(AuctionRunnerTest,
       TrustedBiddingSignalsPriorityVectorSizeLimitFiltersOneGroup) {}

// Auction with two interest groups participating, both with the same owner.
// The priority calculated using the priority vector fetch in bidding signals is
// negative for both groups. The group limit is 1 and
// `enable_bidding_signals_prioritization` is set to true for one of the groups,
// so the auction should be set up to filter only after all priority vectors
// have been received.
//
// In this test, neither group is filtered due to having a negative priority,
// however, the group that would otherwise bid higher is filtered out due to the
// per buyer interest group limit.
TEST_F(AuctionRunnerTest, TrustedBiddingSignalsPriorityVectorNoGroupFiltered) {}

// Test that `basePriority` works as expected. Interest groups have one priority
// order with base priorities, another with the priority vectors that are part
// of the interest groups, and then the priority vectors downloaded as signals
// echo the base priority values, which should be the order that takes effect,
// when one group has `enable_bidding_signals_prioritization` set to true.
TEST_F(AuctionRunnerTest, TrustedBiddingSignalsPriorityVectorBasePriority) {}

// Test that `firstDotProductPriority` works as expected. Interest groups have
// one priority order with base priorities, another with the priority vectors
// that are part of the interest groups, and then the priority vectors
// downloaded as signals echo the values of the previous priority vector dot
// product, which should be the order that takes effect, when one group has
// `enable_bidding_signals_prioritization` set to true.
TEST_F(AuctionRunnerTest,
       TrustedBiddingSignalsPriorityVectorFirstDotProductPriority) {}

// Test that when no priority vector is received, the result of the first
// priority calculation using the interest group's priority vector is used, if
// available, and if not, the base priority is used.
TEST_F(AuctionRunnerTest,
       TrustedBiddingSignalsPriorityVectorNotreceivedMixPrioritySources) {}

// Auction with two interest groups participating, both with the same owner.
// `enable_bidding_signals_prioritization` is set to true and the size limit is
// one, so the worklets wait until all other worklets have received signals
// before proceeding. However, the worklets' Javascript fails to load before any
// signals are received, which should safely fail the auction. This follows the
// same path as if the worklet crashed, so no need to test crashing combined
// with `enable_bidding_signals_prioritization`.
TEST_F(AuctionRunnerTest,
       TrustedBiddingSignalsPriorityVectorSharedScriptLoadErrorAfterSignals) {}

// Auction with two interest groups participating, both with the same owner.
// `enable_bidding_signals_prioritization` is set to true and the size limit is
// one, so the worklets wait until all other worklets have received signals
// before proceeding. However, the worklet's Javascript fails to load after
// signals are received, which should safely fail the auction. This follows the
// same path as if the worklet crashed, so no need to test crashing combined
// with `enable_bidding_signals_prioritization`.
TEST_F(AuctionRunnerTest,
       TrustedBiddingSignalsPriorityVectorSharedScriptLoadErrorBeforeSignals) {}

TEST_F(AuctionRunnerTest, SetPrioritySignalsOverride) {}

// If there's no valid bid, setPrioritySignalsOverride() should still be
// respected.
TEST_F(AuctionRunnerTest, SetPrioritySignalsOverrideNoBid) {}

TEST_F(AuctionRunnerTest, Abort) {}

// Testing what happens when Abort() is called after auction is done.
TEST_F(AuctionRunnerTest, AbortLate) {}

// Test the critical path latency computation for GenerateBid dependencies.
TEST_F(
    AuctionRunnerTest,
    CriticalPathIsComputedFromDependencyLatenciesPassedToGenerateBidCallback) {}

// Test the critical path latency computation for ScoreAd dependencies.
TEST_F(AuctionRunnerTest,
       CriticalPathIsComputedFromDependencyLatenciesPassedToScoreAdCallback) {}

// Test the phase metrics for the WorkletCreation phase.
TEST_F(AuctionRunnerTest, VerifyWorkletCreationPhaseMetrics) {}

// Test the phase metrics for GenerateBid and ScoreAd phases.
TEST_F(AuctionRunnerTest, VerifyGenerateBidAndScoreAdPhaseMetrics) {}

// An auction with two successful bids. contributeToHistogram() and
// contributeToHistogramOnEvent() are both called in all of generateBid(),
// scoreAd(), reportWin() and reportResult().
TEST_F(AuctionRunnerTest, PrivateAggregationRequestForEventContributionEvents) {}

// Base values in contribution's bucket.
TEST_F(AuctionRunnerTest,
       PrivateAggregationRequestForEventContributionBucketBaseValue) {}

// Similar to `PrivateAggregationRequestForEventContributionBucketBaseValue()`
// above, but no bid is rejected.
TEST_F(AuctionRunnerTest,
       PrivateAggregationRequestForEventContributionTwoBidsNotRejected) {}

// Similar to PrivateAggregationRequestForEventContributionBucketBaseValue,
// but with contribution's value field as object.
TEST_F(AuctionRunnerTest,
       PrivateAggregationRequestForEventContributionValueBaseValue) {}

TEST_F(AuctionRunnerTest,
       PrivateAggregationRequestForEventContributionScaleAndOffset) {}

TEST_F(AuctionRunnerTest, PrivateAggregationRequestForEventFilteringId) {}

TEST_F(AuctionRunnerTest,
       PrivateAggregationReportGenerateBidInvalidReservedEventType) {}

TEST_F(AuctionRunnerTest, PrivateAggregationTimeMetrics) {}

TEST_F(AuctionRunnerTest, ComponentAuctionPrivateAggregationTimeMetrics) {}

TEST_F(AuctionRunnerTest,
       PrivateAggregationBuyersReportTrustedSignalsFetchLatency) {}

TEST_F(AuctionRunnerTest, PrivateAggregationBuyersReportBiddingDuration) {}

TEST_F(AuctionRunnerTest,
       PrivateAggregationBuyersReportAllSellersCapabilities) {}

TEST_F(AuctionRunnerTest,
       PrivateAggregationBuyersReportDifferentDurationScaleAndOffset) {}

TEST_F(AuctionRunnerTest, PrivateAggregationBuyersReportNegativeScale) {}

TEST_F(AuctionRunnerTest,
       PrivateAggregationBuyersReportBucketOverflowDoesntCrash) {}

TEST_F(AuctionRunnerTest, PrivateAggregationBuyersNotAuthorized) {}

TEST_F(AuctionRunnerTest, PrivateAggregationBuyersNoReportBuyerKeys) {}

TEST_F(AuctionRunnerTest, PrivateAggregationBuyersNoReportBuyers) {}

TEST_F(AuctionRunnerTest,
       PrivateAggregationBuyersReportBuyersDoesntMatchCapabilities) {}

TEST_F(AuctionRunnerTest, PrivateAggregationBuyersReportMultipleBidders) {}

TEST_F(AuctionRunnerTest,
       PrivateAggregationBuyersReportMultipleBiddersIncompleteBuyerKeys) {}

TEST_F(AuctionRunnerTest,
       PrivateAggregationBuyersMultipleBiddersSameOwnerTrustedSignalsLatency) {}

TEST_F(AuctionRunnerTest,
       PrivateAggregationBuyersMultipleBiddersSameOwnerBiddingLatency) {}

TEST_F(AuctionRunnerTest, PrivateAggregationBuyersMultipleStats) {}

TEST_F(AuctionRunnerTest, PrivateAggregationBuyersReportBidCount) {}

TEST_F(AuctionRunnerTest, PrivateAggregationBuyersReportInterestGroupCount) {}

// Reported InterestGroupCount is unaffected by the group limit.
TEST_F(AuctionRunnerTest,
       PrivateAggregationBuyersInterestGroupCountUnconstrainedByLimits) {}

TEST_F(AuctionRunnerTest, PrivateAggregationBuyersReportDebugModeEnabled) {}

TEST_F(AuctionRunnerTest,
       PrivateAggregationBuyersReportDebugModeMultipleReporters) {}

TEST_F(AuctionRunnerTest,
       PrivateAggregationBuyersReportDebugModeIgnoredWhenFeatureDisabled) {}

TEST_F(AuctionRunnerTest, RealTimeReportingBuyerBadContribution) {}

TEST_F(AuctionRunnerTest, RealTimeReportingSellerBadContribution) {}

TEST_F(AuctionRunnerTest, RealTimeReportingAllOptedIn) {}

TEST_F(AuctionRunnerTest, RealTimeReportingPartialOptedIn) {}

// Real time contributions of the same origin are grouped together, no matter
// what role it was.
TEST_F(AuctionRunnerTest, RealTimeReportingComponentAuctionSharedBuyer) {}

// One origin can opt-in in some component auctions, and not opt-in in others.
// Only contributions from opted-in auctions will be collected.
TEST_F(AuctionRunnerTest,
       RealTimeReportingComponentAuctionSameOriginPartialOptedIn) {}

// Real time reporting contributions are still collected when auction fails
// (e.g., all bids rejected).
TEST_F(AuctionRunnerTest, RealTimeReportingFailAuctionAllBidsRejected) {}

// Similar to NoSellerScript, but tests real time reporting contribution for
// this error.
TEST_F(AuctionRunnerTest, RealTimeReportingSellerScriptLoadFailed) {}

// An auction with different types of real time reporting contributions.
TEST_F(AuctionRunnerTest, RealTimeReportingMixedContributions) {}

// Similar to RealTimeReportingMixedContributions, but no origin opted in for
// real time reporting. There should be no real time reporting contributions,
// including those from API calls or platform contributions.
TEST_F(AuctionRunnerTest, RealTimeReportingMixedContributionsNoOptIn) {}

// Similar to RealTimeReportingMixedContributions, but with feature
// kFledgeRealTimeReporting disabled. There should be no real time reporting
// contributions, including those from API calls or platform contributions.
TEST_F(AuctionRunnerTest, RealTimeReportingMixedContributionsFeatureDisabled) {}

class RoundingTest : public AuctionRunnerTest,
                     public ::testing::WithParamInterface<size_t> {};

class BidRoundingTest : public RoundingTest {};

class ScoreRoundingTest : public RoundingTest {};

class CostRoundingTest : public RoundingTest {};

TEST_P(CostRoundingTest, AdCostPassed) {}

TEST_P(CostRoundingTest, AdCostRounded) {}

TEST_P(CostRoundingTest, AdCostExponentTruncated) {}

INSTANTIATE_TEST_SUITE_P();

TEST_F(AuctionRunnerTest, ModelingSignalsPassed) {}

TEST_F(AuctionRunnerTest, ModelingSignalsNotPresent) {}

TEST_F(AuctionRunnerTest, JoinCountPassedToReportWin) {}

TEST_F(AuctionRunnerTest, RecencyPassedReportWin) {}

TEST_F(AuctionRunnerTest, RecencyPassedGenerateBid) {}

class AuctionRunnerPassRecencyToGenerateBidDisabledTest
    : public AuctionRunnerTest {};

TEST_F(AuctionRunnerPassRecencyToGenerateBidDisabledTest, NotPassed) {}

TEST_P(BidRoundingTest, BidRounded) {}

TEST_P(BidRoundingTest, HighestScoringOtherBidRounded) {}

INSTANTIATE_TEST_SUITE_P();

TEST_P(ScoreRoundingTest, ScoreRounded) {}

INSTANTIATE_TEST_SUITE_P();

// Enable and test forDebuggingOnly.reportAdAuctionLoss() and
// forDebuggingOnly.reportAdAuctionWin() APIs.
// IMPORTANT: These tests do a better job of covering second-highest-scoring
// bid ties and other such tricky cases than elsewhere[1], so if the
// forDebuggingOnly functionality is removed they should be adjusted to only
// look at `report_urls` rather than entirely removed.
//
// [1] And are therefore the only place for some currency testcases.
class AuctionRunnerBiddingAndScoringDebugReportingAPIEnabledTest
    : public AuctionRunnerTest,
      public ::testing::WithParamInterface<bool> {};

TEST_P(AuctionRunnerBiddingAndScoringDebugReportingAPIEnabledTest,
       ForDebuggingOnlyReporting) {}

// Post auction signals should only be reported through report URL's query
// string. Placeholder ${} in a debugging report URL's other parts such as path
// will be kept as it is without being replaced with actual signal.
TEST_P(AuctionRunnerBiddingAndScoringDebugReportingAPIEnabledTest,
       PostAuctionSignalsInQueryStringOnly) {}

// When there are multiple bids getting the highest score, then highest scoring
// other bid will be one of them which didn't win the bid.
TEST_P(AuctionRunnerBiddingAndScoringDebugReportingAPIEnabledTest,
       ForDebuggingOnlyReportingMultipleTopBids) {}

// This is used to test post auction signals when an auction where bidders are
// from the same interest group owner. All winning bid and highest scoring other
// bids come from the same interest group owner.
TEST_P(AuctionRunnerBiddingAndScoringDebugReportingAPIEnabledTest,
       ForDebuggingOnlyReportingSameOwnerBidders) {}

// Multiple bids from different interest group owners get the second highest
// score, then `${madeHighestScoringOtherBid}` is always false.
TEST_P(AuctionRunnerBiddingAndScoringDebugReportingAPIEnabledTest,
       ForDebuggingOnlyReportingHighestScoringOtherBidFromDifferentOwners) {}

// Should send loss report to seller and bidders when auction fails due to
// AllBidsRejected.
TEST_P(AuctionRunnerBiddingAndScoringDebugReportingAPIEnabledTest,
       ForDebuggingOnlyReportingAuctionFailAllBidsRejected) {}

// Test win/loss reporting in a component auction with two components with one
// bidder each.
TEST_P(AuctionRunnerBiddingAndScoringDebugReportingAPIEnabledTest,
       ForDebuggingOnlyReportingComponentAuctionTwoComponents) {}

// Test debug loss reporting in an auction with no winner. Component bidder 1 is
// rejected by component seller, and component bidder 2 is rejected by top-level
// seller. Component bidders get component auction's reject reason but not the
// top-level auction's.
TEST_P(AuctionRunnerBiddingAndScoringDebugReportingAPIEnabledTest,
       ForDebuggingOnlyReportingComponentAuctionNoWinner) {}

// Test win/loss reporting in a component auction with one component with two
// bidders.
TEST_P(AuctionRunnerBiddingAndScoringDebugReportingAPIEnabledTest,
       ForDebuggingOnlyReportingComponentAuctionOneComponent) {}

// Loss report URLs should be dropped when the seller worklet fails to load.
TEST_P(AuctionRunnerBiddingAndScoringDebugReportingAPIEnabledTest,
       ForDebuggingOnlyReportingSellerWorkletFailToLoad) {}

TEST_P(AuctionRunnerBiddingAndScoringDebugReportingAPIEnabledTest,
       ForDebuggingOnlyReportingBidderBadUrls) {}

TEST_P(AuctionRunnerBiddingAndScoringDebugReportingAPIEnabledTest,
       ForDebuggingOnlyReportingSellerBadUrls) {}

TEST_P(AuctionRunnerBiddingAndScoringDebugReportingAPIEnabledTest,
       ForDebuggingOnlyReportingGoodAndBadUrl) {}

// This tests the component auction state machine in the case of a large
// component auction. It uses the debug reporting API just to make sure all
// scripts were run to completion. The main thing this test serves to do is to
// validate the component auction state machinery works (Waits for all bids to
// be generated/scored, doesn't abort them early, doesn't wait for extra bids).
TEST_P(AuctionRunnerBiddingAndScoringDebugReportingAPIEnabledTest,
       LargeComponentAuction) {}

// Reject reason returned by scoreAd() for a rejected bid can be reported to the
// bidder through its debug loss report URL.
TEST_P(AuctionRunnerBiddingAndScoringDebugReportingAPIEnabledTest,
       RejectedBidGetsRejectReason) {}

// Reject reason returned by scoreAd() for a bid whose score is positive is
// ignored and will not be reported to the bidder.
TEST_P(AuctionRunnerBiddingAndScoringDebugReportingAPIEnabledTest,
       RejectReasonIgnoredForPositiveBid) {}

// Only bidders' debug loss report URLs support macro ${rejectReason}.
// Bidders' debug win report URLs and sellers' debug loss/win report URLs does
// not.
TEST_P(AuctionRunnerBiddingAndScoringDebugReportingAPIEnabledTest,
       RejectReasonInBidderDebugLossReportOnly) {}

// When scoreAd() does not return a reject reason, report it as "not-available"
// in bidder's loss report URL as default.
TEST_P(AuctionRunnerBiddingAndScoringDebugReportingAPIEnabledTest,
       SellerNotReturningRejectReason) {}

INSTANTIATE_TEST_SUITE_P();

TEST_F(AuctionRunnerTest, InvalidReportingIds) {}

// ScoreAd conditionally receives reporting ids based on the presence of
// selectedBuyerAndSellerReportingId.
TEST_F(AuctionRunnerTest, VerifyReportingIdsInScoreAd) {}

// Enable kBiddingAndScoringDebugReportingAPI, and kFledgeSampleDebugReports.
// kFledgeEnableFilteringDebugReportStartingFrom is set to non-zero to enable
// filtering debug reports, but set to a very short time delta (100 ms since
// windows epoch) to guarantee lockout and cooldowns are after it and are not
// ignored.
class AuctionRunnerSampleDebugReportsEnabledTest : public AuctionRunnerTest {};

TEST_F(AuctionRunnerSampleDebugReportsEnabledTest,
       BrowserSignalForDebuggingOnlyInCooldownOrLockout) {}

TEST_F(AuctionRunnerSampleDebugReportsEnabledTest,
       DropDebugReportsIfInLockout) {}

TEST_F(AuctionRunnerSampleDebugReportsEnabledTest,
       DropDebugReportsIfInCooldown) {}

// Sellers are under cooldown, and the bidder is not. Tests both
// browserSignals.forDebuggingOnlyInCooldownOrLockout, and the sampling
// algorithm for multi-level auctions.
TEST_F(AuctionRunnerSampleDebugReportsEnabledTest,
       ComponentAuctionSamplingAndDoFilterDebugReports) {}

// Cooldowns and lockout should be updated during auction, so that if one debug
// report is sent, other debug reports should all be dropped since the client
// should be in lockout after that, even though the DB is not updated yet.
TEST_F(AuctionRunnerSampleDebugReportsEnabledTest,
       CooldownOrLockoutShouldBeUpdatedDuringAuction) {}

// Similar to `CooldownOrLockoutShouldBeUpdatedDuringAuction()`, except cooldown
// and lockout lengths are set to zero. Should not set cooldowns or lockout in
// this case.
TEST_F(AuctionRunnerSampleDebugReportsEnabledTest,
       NoCooldownOrLockoutWhenLengthIsZero) {}

// When kFledgeEnableFilteringDebugReportStartingFrom is set to a future time,
// later than lockout's collect time and current auction's run time, no debug
// reports should be dropped.
TEST_F(AuctionRunnerSampleDebugReportsEnabledTest,
       EnableFilteringInFutureTime) {}

// Similar to `AuctionRunnerSampleDebugReportsEnabledTest`, but disabling
// filtering debug reports by setting
// kFledgeEnableFilteringDebugReportStartingFrom to 0 ms.
class AuctionRunnerFilterDebugReportsDisabledTest : public AuctionRunnerTest {};

TEST_F(AuctionRunnerFilterDebugReportsDisabledTest,
       NoDebugReportsDroppedWhenDoFilterDisabled) {}

TEST_F(AuctionRunnerFilterDebugReportsDisabledTest,
       SampleDebugReportsWhenDoFilterDisabled) {}

// Disable private aggregation API.
class AuctionRunnerPrivateAggregationAPIDisabledTest
    : public AuctionRunnerTest {};

TEST_F(AuctionRunnerPrivateAggregationAPIDisabledTest, ReportsNotSent) {}

class AuctionRunnerKAnonTest : public AuctionRunnerTest,
                               public ::testing::WithParamInterface<
                                   auction_worklet::mojom::KAnonymityBidMode> {};

TEST_P(AuctionRunnerKAnonTest, SingleNonKAnon) {}

TEST_P(AuctionRunnerKAnonTest, SingleKAnon) {}TEST_P(AuctionRunnerKAnonTest, ComponentURLs) {}TEST_P(AuctionRunnerKAnonTest, Basic) {}TEST_P(AuctionRunnerKAnonTest, KAnonHigher) {}TEST_P(AuctionRunnerKAnonTest, DifferentBids) {}TEST_P(AuctionRunnerKAnonTest, MultiBid) {}TEST_P(AuctionRunnerKAnonTest, FailureHandling) {}TEST_P(AuctionRunnerKAnonTest, MojoValidation) {}TEST_P(AuctionRunnerKAnonTest, ReportingId) {}TEST_P(AuctionRunnerKAnonTest, SelectedReportingIdMustBeKAnonForReporting) {}TEST_P(AuctionRunnerKAnonTest, AdditionalBidBuyerReporting) {}TEST_P(AuctionRunnerKAnonTest, CookieDeprecationFacilitatedTestingExcluded) {}INSTANTIATE_TEST_SUITE_P()TEST_F(AuctionRunnerTest, ServerResponseLogsErrors) {}TEST_F(AuctionRunnerTest, MatchedReportingIdsInServerResponse) {}TEST_F(AuctionRunnerTest, TrustedBiddingSignalsAdSlotParamGrouping) {}TEST_F(AuctionRunnerTest, TrustedBiddingSignalsAdSlotParamGroupingNoSizes) {}TEST_F(AuctionRunnerTest, TrustedBiddingSignalsJointBatchedRequests) {}TEST_F(AuctionRunnerTest, TrustedBiddingSignalsSplitBatchedRequests) {}TEST_F(AuctionRunnerTest, TrustedScoringSignalsJointBatchedRequests) {}TEST_F(AuctionRunnerTest, TrustedScoringSignalsSplitBatchedRequests) {}