#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "chrome/browser/resource_coordinator/tab_memory_metrics_reporter.h"
#include <memory>
#include "base/memory/raw_ptr.h"
#include "base/task/sequenced_task_runner.h"
#include "base/test/simple_test_tick_clock.h"
#include "base/test/test_mock_time_task_runner.h"
#include "base/timer/timer.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/test_web_contents_factory.h"
#include "content/public/test/web_contents_tester.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
WebContents;
namespace resource_coordinator {
_;
StrictMock;
LoadingState;
class TestTabMemoryMetricsReporter : public TabMemoryMetricsReporter { … };
class TabMemoryMetricsReporterTest : public testing::Test { … };
TEST_F(TabMemoryMetricsReporterTest, StartTrackingWithUnloaded) { … }
TEST_F(TabMemoryMetricsReporterTest, StartTrackingWithLoading) { … }
TEST_F(TabMemoryMetricsReporterTest, StartTrackingWithLoaded) { … }
TEST_F(TabMemoryMetricsReporterTest, OnLoadingStateChangeWithUnloaded) { … }
TEST_F(TabMemoryMetricsReporterTest, OnLoadingStateChangeWithLoading) { … }
TEST_F(TabMemoryMetricsReporterTest, OnLoadingStateChangeWithLoaded) { … }
TEST_F(TabMemoryMetricsReporterTest, OnStopTracking) { … }
TEST_F(TabMemoryMetricsReporterTest, TrackingThreeWithLoaded) { … }
TEST_F(TabMemoryMetricsReporterTest, EmitMemoryDumpAfterOneMinute) { … }
TEST_F(TabMemoryMetricsReporterTest, EmitMemoryDumpAfterFiveMinutes) { … }
TEST_F(TabMemoryMetricsReporterTest, EmitMemoryDumpAfterTenMinutes) { … }
TEST_F(TabMemoryMetricsReporterTest, EmitMemoryDumpAfterFifteenMinutes) { … }
TEST_F(TabMemoryMetricsReporterTest, EmitMemoryDumpSkipFiveMinutes) { … }
TEST_F(TabMemoryMetricsReporterTest, EmitMemoryDumpSkipTenMinutes) { … }
TEST_F(TabMemoryMetricsReporterTest, EmitMemoryDumpSkipFifteenMinutes) { … }
TEST_F(TabMemoryMetricsReporterTest, SecondContentComeAfter9_5Minutes) { … }
TEST_F(TabMemoryMetricsReporterTest, EmitMemoryDumpForDiscardedContent) { … }
}