#include "components/feature_engagement/internal/once_condition_validator.h"
#include <string>
#include "base/feature_list.h"
#include "components/feature_engagement/internal/editable_configuration.h"
#include "components/feature_engagement/internal/event_model.h"
#include "components/feature_engagement/internal/never_availability_model.h"
#include "components/feature_engagement/internal/noop_display_lock_controller.h"
#include "components/feature_engagement/internal/proto/feature_event.pb.h"
#include "components/feature_engagement/internal/test/test_time_provider.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace feature_engagement {
namespace {
BASE_FEATURE(…);
BASE_FEATURE(…);
FeatureConfig kValidFeatureConfig;
FeatureConfig kInvalidFeatureConfig;
class OnceTestEventModel : public EventModel { … };
class OnceConditionValidatorTest : public ::testing::Test { … };
}
TEST_F(OnceConditionValidatorTest, EnabledFeatureShouldTriggerOnce) { … }
TEST_F(OnceConditionValidatorTest,
BothEnabledAndDisabledFeaturesShouldTrigger) { … }
TEST_F(OnceConditionValidatorTest, StillTriggerWhenAllFeaturesDisabled) { … }
TEST_F(OnceConditionValidatorTest, OnlyTriggerWhenModelIsReady) { … }
TEST_F(OnceConditionValidatorTest, OnlyTriggerIfNothingElseIsShowing) { … }
TEST_F(OnceConditionValidatorTest,
AlsoTriggerWhenSomethingElseIsShowingForTesting) { … }
TEST_F(OnceConditionValidatorTest, PriorityNotificationBlocksOtherIPHs) { … }
TEST_F(OnceConditionValidatorTest, DoNotTriggerForInvalidConfig) { … }
TEST_F(OnceConditionValidatorTest,
EnabledFeatureShouldTriggerAgainAfterSessionReset) { … }
}