#include "content/browser/attribution_reporting/aggregatable_debug_rate_limit_table.h"
#include <optional>
#include <string>
#include <string_view>
#include <vector>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "components/attribution_reporting/suitable_origin.h"
#include "content/browser/attribution_reporting/aggregatable_debug_report.h"
#include "content/browser/attribution_reporting/test/configurable_storage_delegate.h"
#include "net/base/schemeful_site.h"
#include "sql/database.h"
#include "sql/statement.h"
#include "sql/statement_id.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/storage_key/storage_key.h"
#include "third_party/blink/public/mojom/aggregation_service/aggregatable_report.mojom.h"
namespace content {
namespace {
SuitableOrigin;
Field;
IsEmpty;
SizeIs;
UnorderedElementsAre;
struct RateLimitData { … };
AggregatableDebugReport CreateAggregatableDebugReport(
const std::string& context_site,
std::string_view reporting_origin,
base::Time time,
int consumed_budget) { … }
class AggregatableDebugRateLimitTableTest : public testing::Test { … };
TEST_F(AggregatableDebugRateLimitTableTest, AddRateLimit) { … }
TEST_F(AggregatableDebugRateLimitTableTest,
AllowedForRateLimitPerContextReportingSite) { … }
TEST_F(AggregatableDebugRateLimitTableTest, AllowedForRateLimitPerContextSite) { … }
TEST_F(AggregatableDebugRateLimitTableTest, AllowedForRateLimit_Overflow) { … }
TEST_F(AggregatableDebugRateLimitTableTest, ClearAllDataAllTime) { … }
TEST_F(AggregatableDebugRateLimitTableTest, ClearAllDataInRange) { … }
TEST_F(AggregatableDebugRateLimitTableTest, ClearDataForOriginsInRange) { … }
TEST_F(AggregatableDebugRateLimitTableTest, DeleteExpiredRows) { … }
}
}