#include "content/browser/interest_group/bidding_and_auction_serializer.h"
#include "base/strings/stringprintf.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/time/time.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/interest_group/test_interest_group_builder.h"
namespace content {
namespace {
const size_t kEncryptionOverhead = …;
constexpr char kOriginStringA[] = …;
constexpr char kOriginStringB[] = …;
constexpr char kOriginStringC[] = …;
constexpr char kOriginStringD[] = …;
const size_t kBidderOverhead = …;
StorageInterestGroup MakeInterestGroup(blink::InterestGroup interest_group) { … }
scoped_refptr<StorageInterestGroups> CreateInterestGroups(url::Origin owner) { … }
class BiddingAndAuctionSerializerTest : public testing::Test { … };
TEST_F(BiddingAndAuctionSerializerTest, SerializeWithDefaultConfig) { … }
TEST_F(BiddingAndAuctionSerializerTest, SerializeWithLargeRequestSize) { … }
TEST_F(BiddingAndAuctionSerializerTest, SerializeWithSmallRequestSize) { … }
TEST_F(BiddingAndAuctionSerializerTest, SerializeWithTooSmallRequestSize) { … }
TEST_F(BiddingAndAuctionSerializerTest, SerializeWithPerOwnerSize) { … }
TEST_F(BiddingAndAuctionSerializerTest,
SerializeWithPerOwnerSizeBiggerThanRequestSize) { … }
TEST_F(BiddingAndAuctionSerializerTest, SerializeWithPerOwnerSizeExpands) { … }
TEST_F(BiddingAndAuctionSerializerTest, SerializeWithPerOwnerSizeShrinks) { … }
TEST_F(BiddingAndAuctionSerializerTest, SerializeWithFixedSizeGroups) { … }
TEST_F(BiddingAndAuctionSerializerTest, SerializeWithNoGroupsSetBuyersFixed) { … }
TEST_F(BiddingAndAuctionSerializerTest,
SerializeWithNoGroupsSetBuyersProportional) { … }
class TargetSizeEstimatorTest : public testing::Test { … };
TEST_F(TargetSizeEstimatorTest, TotalSizeExceedsSizeT) { … }
TEST_F(TargetSizeEstimatorTest, LargeSizeBeforeGroups) { … }
TEST_F(TargetSizeEstimatorTest, FixedSizeGroups) { … }
TEST_F(TargetSizeEstimatorTest, FixedSizeGroupsShrink) { … }
TEST_F(TargetSizeEstimatorTest, EqualWorstCase) { … }
TEST_F(TargetSizeEstimatorTest, ProportionalWorstCase) { … }
}
}