#include "chrome/browser/performance_manager/policies/background_tab_loading_policy.h"
#include <map>
#include <memory>
#include <vector>
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "chrome/browser/performance_manager/mechanisms/page_loader.h"
#include "components/performance_manager/graph/graph_impl.h"
#include "components/performance_manager/graph/page_node_impl.h"
#include "components/performance_manager/public/persistence/site_data/site_data_reader.h"
#include "components/performance_manager/test_support/graph_test_harness.h"
#include "components/performance_manager/test_support/persistence/test_site_data_reader.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace performance_manager {
namespace policies {
PageNodeData;
namespace {
class LenientMockPageLoader
: public performance_manager::mechanism::PageLoader { … };
MockPageLoader;
class MockBackgroundTabLoadingPolicy : public BackgroundTabLoadingPolicy { … };
}
class BackgroundTabLoadingPolicyTest : public GraphTestHarness { … };
TEST_F(BackgroundTabLoadingPolicyTest,
ScheduleLoadForRestoredTabsWithoutNotificationPermission) { … }
TEST_F(BackgroundTabLoadingPolicyTest,
ScheduleLoadForRestoredTabsWithNotificationPermission) { … }
TEST_F(BackgroundTabLoadingPolicyTest, AllLoadingSlotsUsed) { … }
TEST_F(BackgroundTabLoadingPolicyTest, LoadingStateLoadedBusy) { … }
TEST_F(BackgroundTabLoadingPolicyTest, ShouldLoad_MaxTabsToRestore) { … }
TEST_F(BackgroundTabLoadingPolicyTest, ShouldLoad_MinTabsToRestore) { … }
TEST_F(BackgroundTabLoadingPolicyTest, ShouldLoad_FreeMemory) { … }
TEST_F(BackgroundTabLoadingPolicyTest, ShouldLoad_OldTab) { … }
TEST_F(BackgroundTabLoadingPolicyTest, RemoveTabWithNotificationPermission) { … }
TEST_F(BackgroundTabLoadingPolicyTest, ScoreAndScheduleTabLoad) { … }
TEST_F(BackgroundTabLoadingPolicyTest, OnMemoryPressure) { … }
}
}