#include "components/attribution_reporting/filters.h"
#include <stddef.h>
#include <optional>
#include <string>
#include <utility>
#include <vector>
#include "base/check_op.h"
#include "base/strings/string_number_conversions.h"
#include "base/test/gmock_expected_support.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/values_test_util.h"
#include "base/time/time.h"
#include "base/types/optional_util.h"
#include "base/values.h"
#include "components/attribution_reporting/constants.h"
#include "components/attribution_reporting/source_registration_error.mojom.h"
#include "components/attribution_reporting/source_type.mojom.h"
#include "components/attribution_reporting/test_utils.h"
#include "components/attribution_reporting/trigger_registration_error.mojom.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace attribution_reporting {
namespace {
SourceRegistrationError;
SourceType;
TriggerRegistrationError;
ValueIs;
ElementsAre;
Pair;
Property;
FilterValues CreateFilterValues(size_t n) { … }
base::Value MakeFilterValuesWithKeys(size_t n) { … }
base::Value MakeFilterValuesWithKeyLength(size_t n) { … }
base::Value MakeFilterValuesWithValues(size_t n) { … }
base::Value MakeFilterValuesWithValueLength(size_t n) { … }
const base::Time kSourceTime = …;
const base::Time kTriggerTime = …;
const struct { … } kParseTestCases[] = …;
const struct { … } kSizeTestCases[] = …;
TEST(FilterDataTest, Create_ProhibitsSourceTypeFilter) { … }
TEST(FiltersTest, FromJSON_AllowsSourceTypeFilter) { … }
TEST(FilterDataTest, Create_LimitsFilterCount) { … }
TEST(FilterDataTest, FromJSON) { … }
TEST(FilterDataTest, FromJSON_RecordsMetrics) { … }
TEST(FiltersTest, FromJSON) { … }
TEST(FiltersTest, FromJSON_list) { … }
TEST(FilterDataTest, ToJson) { … }
TEST(FiltersTest, ToJson) { … }
TEST(FilterDataTest, EmptyOrMissingAttributionFilters) { … }
TEST(FilterDataTest, AttributionFilterDataMatch) { … }
TEST(FilterDataTest, AttributionFilterDataMatch_Disjunction) { … }
TEST(FilterDataTest, NegatedAttributionFilterDataMatch) { … }
TEST(FilterDataTest, AttributionFilterDataMatch_SourceType) { … }
TEST(FilterDataTest, AttributionFilterDataMatch_LookbackWindow) { … }
TEST(FilterDataTest,
AttributionFilterDataMatch_SourceTimeGreaterThanTriggerTime) { … }
}
}