#include "components/performance_manager/public/user_tuning/tab_revisit_tracker.h"
#include <memory>
#include "base/test/metrics/histogram_tester.h"
#include "base/time/time.h"
#include "components/performance_manager/public/decorators/page_live_state_decorator.h"
#include "components/performance_manager/public/graph/graph.h"
#include "components/performance_manager/public/graph/page_node.h"
#include "components/performance_manager/test_support/graph_test_harness.h"
#include "components/performance_manager/test_support/mock_graphs.h"
#include "components/ukm/test_ukm_recorder.h"
#include "services/metrics/public/cpp/ukm_builders.h"
namespace performance_manager {
constexpr int64_t kActiveState = …;
constexpr int64_t kBackgroundState = …;
constexpr int64_t kClosedState = …;
constexpr ukm::SourceId kValidSourceId = …;
class TabRevisitTrackerTest : public GraphTestHarness { … };
TEST_F(TabRevisitTrackerTest, StartsBackgroundedThenRevisited) { … }
TEST_F(TabRevisitTrackerTest, CloseInBackgroundRecordsToCloseHistogram) { … }
TEST_F(TabRevisitTrackerTest, CloseWhileActiveDoesntRecordClose) { … }
TEST_F(TabRevisitTrackerTest, TestSwitchToDiscardedTab) { … }
}