chromium/chrome/browser/resource_coordinator/session_restore_policy_unittest.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/resource_coordinator/session_restore_policy.h"

#include <algorithm>
#include <vector>

#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/rand_util.h"
#include "base/run_loop.h"
#include "base/test/bind.h"
#include "base/test/simple_test_tick_clock.h"
#include "build/build_config.h"
#if !BUILDFLAG(IS_ANDROID)
#include "chrome/browser/performance_manager/test_support/site_data_utils.h"
#endif
#include "chrome/browser/resource_coordinator/tab_helper.h"
#include "chrome/browser/resource_coordinator/tab_manager_features.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "components/performance_manager/persistence/site_data/site_data_impl.h"
#include "components/performance_manager/persistence/site_data/site_data_writer.h"
#include "components/performance_manager/public/decorators/site_data_recorder.h"
#include "components/performance_manager/public/performance_manager.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/mock_permission_controller.h"
#include "content/public/test/web_contents_tester.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace resource_coordinator {

namespace {

// Delegate that exposes testing seams for testing SessionRestorePolicy.
class TestDelegate : public SessionRestorePolicy::Delegate {};

class LenientTabScoreChangeMock {};
TabScoreChangeMock;

// Exposes testing functions on SessionRestorePolicy.
class TestSessionRestorePolicy : public SessionRestorePolicy {};

}  // namespace

class SessionRestorePolicyTest : public ChromeRenderViewHostTestHarness {};

TEST_F(SessionRestorePolicyTest, CalculateSimultaneousTabLoads) {}

TEST_F(SessionRestorePolicyTest, ShouldLoadFeatureEnabled) {}

TEST_F(SessionRestorePolicyTest, ShouldLoadFeatureDisabled) {}

TEST_F(SessionRestorePolicyTest, ShouldLoadBackgroundData) {}

TEST_F(SessionRestorePolicyTest, NotificationPermissionSetUsedInBgBit) {}

TEST_F(SessionRestorePolicyTest, MultipleAllTabsDoneCallbacks) {}

TEST_F(SessionRestorePolicyTest, CalculateAgeScore) {}

TEST_F(SessionRestorePolicyTest, ScoreTab) {}

TEST_F(SessionRestorePolicyTest, RescoringSendsNotification) {}

#if !BUILDFLAG(IS_ANDROID)
TEST_F(SessionRestorePolicyTest, FeatureUsageSetUsedInBgBit) {}

TEST_F(SessionRestorePolicyTest, UnknownUsageSetUsedInBgBit) {}
#endif

}  // namespace resource_coordinator