#include "components/memory_pressure/unnecessary_discard_monitor.h"
#include <memory>
#include "base/functional/callback.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace memory_pressure {
class UnnecessaryDiscardMonitorTest : public testing::Test { … };
TEST_F(UnnecessaryDiscardMonitorTest, TestNoEventsReportsNothing) { … }
TEST_F(UnnecessaryDiscardMonitorTest, TestReclaimTargetAgeIsReported) { … }
TEST_F(UnnecessaryDiscardMonitorTest, TestNoUnnecessaryDiscardsIsReported) { … }
TEST_F(UnnecessaryDiscardMonitorTest, TestSingleUnnecessaryDiscardIsReported) { … }
TEST_F(UnnecessaryDiscardMonitorTest,
TestMultipleUnnecessaryDiscardsAreReported) { … }
TEST_F(UnnecessaryDiscardMonitorTest,
TestIncreasingReclaimTargetIsNotReportedAsUnnecessary) { … }
TEST_F(UnnecessaryDiscardMonitorTest,
TestIncreasingReclaimTargetWithUnnecessaryDiscard) { … }
TEST_F(UnnecessaryDiscardMonitorTest,
TestEveryReclaimEventReportsZeroUnnecessaryKills) { … }
TEST_F(UnnecessaryDiscardMonitorTest, TestTwoPreceedingReclaimTargets) { … }
}