#include "components/site_engagement/content/site_engagement_score.h"
#include <optional>
#include <utility>
#include "base/test/simple_test_clock.h"
#include "base/time/time.h"
#include "base/values.h"
#include "components/site_engagement/core/mojom/site_engagement_details.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace site_engagement {
namespace {
const int kLessAccumulationsThanNeededToMaxDailyEngagement = …;
const int kMoreAccumulationsThanNeededToMaxDailyEngagement = …;
const int kMoreAccumulationsThanNeededToMaxTotalEngagement = …;
const int kLessDaysThanNeededToMaxTotalEngagement = …;
const int kMoreDaysThanNeededToMaxTotalEngagement = …;
const int kLessPeriodsThanNeededToDecayMaxScore = …;
const int kMorePeriodsThanNeededToDecayMaxScore = …;
const double kMaxRoundingDeviation = …;
base::Time GetReferenceTime() { … }
}
class SiteEngagementScoreTest : public testing::Test { … };
TEST_F(SiteEngagementScoreTest, AccumulateOnSameDay) { … }
TEST_F(SiteEngagementScoreTest, AccumulateOnTwoDays) { … }
TEST_F(SiteEngagementScoreTest, AccumulateALotOnManyDays) { … }
TEST_F(SiteEngagementScoreTest, AccumulateALittleOnManyDays) { … }
TEST_F(SiteEngagementScoreTest, ScoresDecayOverTime) { … }
TEST_F(SiteEngagementScoreTest, DecaysAppliedBeforeAdd) { … }
TEST_F(SiteEngagementScoreTest, GoBackInTime) { … }
TEST_F(SiteEngagementScoreTest, EmptyDictionary) { … }
TEST_F(SiteEngagementScoreTest, PartiallyEmptyDictionary) { … }
TEST_F(SiteEngagementScoreTest, PopulatedDictionary) { … }
TEST_F(SiteEngagementScoreTest, FirstDailyEngagementBonus) { … }
TEST_F(SiteEngagementScoreTest, Reset) { … }
TEST_F(SiteEngagementScoreTest, ProportionalDecay) { … }
TEST_F(SiteEngagementScoreTest, GetDetails) { … }
}