#include "components/user_education/common/feature_promo_session_manager.h"
#include <memory>
#include <optional>
#include "base/functional/callback_forward.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.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_idle_observer.h"
#include "components/user_education/common/feature_promo_idle_policy.h"
#include "components/user_education/test/feature_promo_session_mocks.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"
#include "ui/base/interaction/expect_call_in_scope.h"
namespace user_education {
class FeaturePromoSessionManagerTest : public testing::Test { … };
TEST_F(FeaturePromoSessionManagerTest, CreateVanillaSessionManager) { … }
TEST_F(FeaturePromoSessionManagerTest, CheckIdlePolicyDefaults) { … }
TEST_F(FeaturePromoSessionManagerTest, CheckCallbackNoInitialSession) { … }
TEST_F(FeaturePromoSessionManagerTest, CheckCallbackWithInitialSession) { … }
TEST_F(FeaturePromoSessionManagerTest, CheckCallbackCalledOnNewSession) { … }
class FeaturePromoSessionManagerWithMockManagerTest
: public FeaturePromoSessionManagerTest { … };
class FeaturePromoSessionManagerWithMockPolicyTest
: public FeaturePromoSessionManagerWithMockManagerTest { … };
TEST_F(FeaturePromoSessionManagerWithMockPolicyTest,
StartJustAfterLastActive_NoNewSession) { … }
TEST_F(FeaturePromoSessionManagerWithMockPolicyTest,
StartWellAfterLastActive_NewSession) { … }
TEST_F(FeaturePromoSessionManagerWithMockPolicyTest,
StartApplicationInactive_NoNewSession) { … }
TEST_F(FeaturePromoSessionManagerWithMockPolicyTest, SystemInactiveNoUpdate) { … }
TEST_F(FeaturePromoSessionManagerWithMockPolicyTest, NoNewSession) { … }
TEST_F(FeaturePromoSessionManagerWithMockPolicyTest, NewSession) { … }
class FeaturePromoIdlePolicyTest
: public FeaturePromoSessionManagerWithMockManagerTest { … };
TEST_F(FeaturePromoIdlePolicyTest, InitApplicationNotActive) { … }
TEST_F(FeaturePromoIdlePolicyTest, InitApplicationActiveNoNewSession) { … }
TEST_F(FeaturePromoIdlePolicyTest, InitApplicationActiveNewSession) { … }
TEST_F(FeaturePromoIdlePolicyTest,
StateUpdatedActiveNoNewSessionDueToMinimumSessionLength) { … }
TEST_F(FeaturePromoIdlePolicyTest, StateUpdatedActiveNewSession) { … }
TEST_F(FeaturePromoIdlePolicyTest, StateUpdatedInactiveNoNewSession) { … }
TEST_F(FeaturePromoIdlePolicyTest,
StateUpdatedInsideThenOutsideMinimumSession_NewSession) { … }
TEST_F(FeaturePromoIdlePolicyTest,
StateUpdatedInsideThenOutsideMinimumSession_NoNewSession) { … }
TEST_F(FeaturePromoIdlePolicyTest, ReturnFromLockedNewSession) { … }
TEST_F(FeaturePromoIdlePolicyTest, ReturnFromLockedNoNewSession) { … }
TEST_F(FeaturePromoIdlePolicyTest, MaybeUpdateSessionStateNoNewSession) { … }
TEST_F(FeaturePromoIdlePolicyTest, MaybeUpdateSessionStateNewSession) { … }
}