chromium/content/browser/attribution_reporting/attribution_aggregatable_report_golden_unittest.cc

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

#include <stdint.h>

#include <optional>
#include <string>
#include <string_view>
#include <utility>
#include <vector>

#include "base/base64.h"
#include "base/base_paths.h"
#include "base/check.h"
#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/functional/function_ref.h"
#include "base/path_service.h"
#include "base/run_loop.h"
#include "base/strings/string_util.h"
#include "base/test/bind.h"
#include "base/test/gmock_expected_support.h"
#include "base/test/values_test_util.h"
#include "base/time/time.h"
#include "components/aggregation_service/aggregation_coordinator_utils.h"
#include "components/attribution_reporting/aggregatable_filtering_id_max_bytes.h"
#include "components/attribution_reporting/source_registration_time_config.mojom.h"
#include "components/attribution_reporting/suitable_origin.h"
#include "content/browser/aggregation_service/aggregatable_report.h"
#include "content/browser/aggregation_service/aggregation_service.h"
#include "content/browser/aggregation_service/aggregation_service_features.h"
#include "content/browser/aggregation_service/aggregation_service_impl.h"
#include "content/browser/aggregation_service/aggregation_service_test_utils.h"
#include "content/browser/aggregation_service/public_key.h"
#include "content/browser/attribution_reporting/aggregatable_attribution_utils.h"
#include "content/browser/attribution_reporting/aggregatable_debug_report.h"
#include "content/browser/attribution_reporting/attribution_test_utils.h"
#include "content/browser/storage_partition_impl.h"
#include "content/public/common/content_paths.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/test_browser_context.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/abseil-cpp/absl/numeric/int128.h"
#include "third_party/abseil-cpp/absl/types/variant.h"
#include "third_party/blink/public/mojom/aggregation_service/aggregatable_report.mojom.h"
#include "third_party/boringssl/src/include/openssl/hpke.h"
#include "url/gurl.h"
#include "url/origin.h"

namespace content {
namespace {

SuitableOrigin;
AggregatableReportHistogramContribution;

constexpr char kKeyAggregationServicePayloads[] =;

std::string ReadStringFromFile(const base::FilePath& file, bool trim = false) {}

base::Value ParseJsonFromFile(const base::FilePath& file) {}

// See
// //content/test/data/attribution_reporting/aggregatable_report_goldens/README.md.
class AggregatableReportGoldenLatestVersionTest : public testing::Test {};

class AttributionAggregatableReportGoldenLatestVersionTest
    : public AggregatableReportGoldenLatestVersionTest {};

TEST_F(AttributionAggregatableReportGoldenLatestVersionTest,
       VerifyGoldenReport) {}

class AggregatableDebugReportGoldenLatestVersionTest
    : public AggregatableReportGoldenLatestVersionTest {};

TEST_F(AggregatableDebugReportGoldenLatestVersionTest, VerifyGoldenReport) {}

// Returns the legacy versions of attribution and debug aggregatable reports.
std::vector<base::FilePath> GetLegacyVersions() {}

// Verifies that legacy versions are properly labeled/stored. Note that there
// is an implicit requirement that "version" is located in the "shared_info"
// field in the report.
class AttributionAndDebugAggregatableReportGoldenLegacyVersionTest
    : public ::testing::TestWithParam<base::FilePath> {};

TEST_P(AttributionAndDebugAggregatableReportGoldenLegacyVersionTest,
       HasExpectedVersion) {}

INSTANTIATE_TEST_SUITE_P();

}  // namespace
}  // namespace content