#include "chrome/browser/user_education/recent_session_tracker.h"
#include <memory>
#include <optional>
#include <vector>
#include "base/callback_list.h"
#include "base/memory/raw_ref.h"
#include "base/test/bind.h"
#include "base/test/simple_test_clock.h"
#include "base/time/time.h"
#include "chrome/browser/user_education/browser_feature_promo_storage_service.h"
#include "components/user_education/common/feature_promo_data.h"
#include "components/user_education/common/feature_promo_session_manager.h"
#include "components/user_education/common/feature_promo_storage_service.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 {
class FakeSessionManager
: protected user_education::FeaturePromoSessionManager { … };
class TestBrowserStorageService
: public user_education::test::TestFeaturePromoStorageService,
public RecentSessionDataStorageService { … };
base::Time Days(double d) { … }
}
class RecentSessionTrackerTest : public testing::Test { … };
TEST_F(RecentSessionTrackerTest, NoNewSession) { … }
TEST_F(RecentSessionTrackerTest, NewSessionBeforeInit) { … }
TEST_F(RecentSessionTrackerTest, NewSessionAfterInit) { … }
TEST_F(RecentSessionTrackerTest, OldSessionsRollOff) { … }
TEST_F(RecentSessionTrackerTest, TooManySessionsRollOff) { … }
TEST_F(RecentSessionTrackerTest, ClockSetBackElidesValues) { … }
TEST_F(RecentSessionTrackerTest, EnabledForTheFirstTime) { … }