#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(…);
class MockNewBadgePolicy : public NewBadgePolicy { … };
class TestNewBadgePolicy : public NewBadgePolicy { … };
}
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) { … }
}