chromium/components/tpcd/metadata/browser/manager_unittest.cc

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

#include "components/tpcd/metadata/browser/manager.h"

#include <cstdint>
#include <memory>
#include <string>

#include "base/run_loop.h"
#include "base/strings/strcat.h"
#include "base/test/bind.h"
#include "base/test/gtest_util.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "build/build_config.h"
#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings_enums.mojom-shared.h"
#include "components/prefs/testing_pref_service.h"
#include "components/tpcd/metadata/browser/parser.h"
#include "components/tpcd/metadata/browser/prefs.h"
#include "components/tpcd/metadata/browser/test_support.h"
#include "components/tpcd/metadata/common/proto/metadata.pb.h"
#include "net/base/features.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace tpcd::metadata {

namespace {

class TestTpcdManagerDelegate : public Manager::Delegate {};

}  // namespace

class ManagerTest : public testing::Test,
                    public testing::WithParamInterface<
                        /*kTpcdMetadataGrants*/ bool> {};

INSTANTIATE_TEST_SUITE_P();

TEST_P(ManagerTest, OnMetadataReady) {}

TEST_P(ManagerTest, IsAllowed) {}

TEST_P(ManagerTest, FireSyncCallback) {}

class ManagerCohortsTest : public testing::Test,
                           public testing::WithParamInterface<
                               /*IsTpcdMetadataStagedRollbackEnabled:*/ bool> {};

INSTANTIATE_TEST_SUITE_P();

TEST_P(ManagerCohortsTest, DTRP_0Percent) {}

TEST_P(ManagerCohortsTest, DTRP_100Percent) {}

TEST_P(ManagerCohortsTest, DTRP_GE_Rand) {}

TEST_P(ManagerCohortsTest, DTRP_LT_Rand) {}

TEST_P(ManagerCohortsTest, MetadataCohortDistributionUma) {}

class ManagerPrefsTest : public testing::Test {};

TEST_F(ManagerPrefsTest, PersistedCohorts) {}

}  // namespace tpcd::metadata