chromium/components/user_education/common/new_badge_controller_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/user_education/common/new_badge_controller.h"

#include "base/feature_list.h"
#include "base/memory/raw_ptr.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/simple_test_clock.h"
#include "base/time/time.h"
#include "components/user_education/common/feature_promo_data.h"
#include "components/user_education/common/feature_promo_registry.h"
#include "components/user_education/common/feature_promo_storage_service.h"
#include "components/user_education/common/new_badge_policy.h"
#include "components/user_education/common/new_badge_specification.h"
#include "components/user_education/common/user_education_features.h"
#include "components/user_education/test/test_feature_promo_storage_service.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace user_education {

namespace {

BASE_FEATURE();
BASE_FEATURE();

// Mock for testing `NewBadgeController` without a live `NewBadgePolicy`.
class MockNewBadgePolicy : public NewBadgePolicy {};

// A `NewBadgePolicy` that allows direct setting of the parameters.
class TestNewBadgePolicy : public NewBadgePolicy {};

}  // namespace

class NewBadgeControllerTest : public testing::Test {};

TEST_F(NewBadgeControllerTest, MaybeShowNewBadgeCallsPolicyReturnsTrue) {}

TEST_F(NewBadgeControllerTest, MaybeShowNewBadgeCallsPolicyReturnsFalse) {}

TEST_F(NewBadgeControllerTest, NewBadgesDisabledForTesting) {}

TEST_F(NewBadgeControllerTest, NotifyFeatureUsed) {}

TEST_F(NewBadgeControllerTest, NotifyFeatureUsedIfValidIsValid) {}

TEST_F(NewBadgeControllerTest, NotifyFeatureUsedIfValidNotRegistered) {}

TEST_F(NewBadgeControllerTest, NotifyFeatureUsedIfValidNotEnabled) {}

TEST_F(NewBadgeControllerTest, NotifyFeatureUsedDoesNotRecord) {}

TEST_F(NewBadgeControllerTest, DoesNotShowIfFeatureDisabled) {}

TEST_F(NewBadgeControllerTest, DoesNotShowIfFeatureEnabledDuringGracePeriod) {}

TEST_F(NewBadgeControllerTest, ShowsUntilMaxCount) {}

TEST_F(NewBadgeControllerTest, ShowsUntilMaxUsed) {}

TEST_F(NewBadgeControllerTest, WindowBlocksBadge) {}

}  // namespace user_education