#include "content/browser/interest_group/auction_process_manager.h"
#include <list>
#include <memory>
#include <optional>
#include <string>
#include <vector>
#include "base/check.h"
#include "base/functional/callback.h"
#include "base/notreached.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "base/test/bind.h"
#include "base/test/scoped_command_line.h"
#include "base/test/scoped_feature_list.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/common/features.h"
#include "content/public/browser/site_instance.h"
#include "content/public/browser/site_isolation_mode.h"
#include "content/public/browser/site_isolation_policy.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_features.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/mock_render_process_host.h"
#include "content/public/test/test_browser_context.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-forward.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/seller_worklet.mojom.h"
#include "content/test/test_content_browser_client.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/receiver_set.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
#include "url/origin.h"
namespace content {
namespace {
const size_t kMaxSellerProcesses = …;
const size_t kMaxBidderProcesses = …;
class TestAuctionProcessManager
: public AuctionProcessManager,
public auction_worklet::mojom::AuctionWorkletService { … };
class AuctionProcessManagerTest
: public testing::TestWithParam<AuctionProcessManager::WorkletType> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(AuctionProcessManagerTest, Basic) { … }
TEST_P(AuctionProcessManagerTest, MultipleRequestsForDifferentProcesses) { … }
TEST_P(AuctionProcessManagerTest, MultipleRequestsForSameProcess) { … }
TEST_P(AuctionProcessManagerTest, LimitExceeded) { … }
TEST_P(AuctionProcessManagerTest, ProcessSharing) { … }
TEST_P(AuctionProcessManagerTest, DestroyHandlesWithPendingRequests) { … }
TEST_P(AuctionProcessManagerTest, ProcessCrash) { … }
TEST_P(AuctionProcessManagerTest, DisconnectBeforeDelete) { … }
TEST_P(AuctionProcessManagerTest, ProcessDeleteBeforeHandle) { … }
TEST_F(AuctionProcessManagerTest, PidLookup) { … }
TEST_F(AuctionProcessManagerTest, PidLookupAlreadyRunning) { … }
class PartialSiteIsolationContentBrowserClient
: public TestContentBrowserClient { … };
class InRendererAuctionProcessManagerTestBase : public ::testing::Test { … };
class InRendererAuctionProcessManagerTest
: public InRendererAuctionProcessManagerTestBase { … };
class InRendererAuctionProcessManagerTest_NoOriginKeyedProcessesByDefault
: public InRendererAuctionProcessManagerTestBase { … };
TEST_F(InRendererAuctionProcessManagerTest_NoOriginKeyedProcessesByDefault,
AndroidLike) { … }
TEST_F(InRendererAuctionProcessManagerTest, DesktopLike) { … }
TEST_F(InRendererAuctionProcessManagerTest_NoOriginKeyedProcessesByDefault,
PolicyChange) { … }
}
}