chromium/content/browser/renderer_host/back_forward_cache_impl_unittest.cc

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

#include "content/browser/renderer_host/back_forward_cache_impl.h"

#include "base/test/scoped_feature_list.h"
#include "content/test/test_render_frame_host.h"
#include "content/test/test_render_view_host.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/scheduler/web_scheduler_tracked_feature.h"

namespace content {

class BackForwardCacheImplTest : public RenderViewHostImplTestHarness {};

TEST_F(BackForwardCacheImplTest, CrossOriginReachableFrameCount) {}

TEST_F(BackForwardCacheImplTest, CrossOriginAllMasked) {}

class BackForwardCacheImplTestExposeCrossOrigin
    : public BackForwardCacheImplTest {};

TEST_F(BackForwardCacheImplTestExposeCrossOrigin, FirstCrossOriginReachable) {}

TEST_F(BackForwardCacheImplTestExposeCrossOrigin, SecondCrossOriginReachable) {}

// Covers BackForwardCache's cache size-related values used in Stable.
// See docs/back_forward_cache_size.md for more details.
class BackForwardCacheActiveSizeTest : public ::testing::Test {};

TEST_F(BackForwardCacheActiveSizeTest, ActiveCacheSize) {}

// Covers overwriting BackForwardCache's cache size-related values.
// When "cache_size" or "foreground_cache_size" presents in both
// `kBackForwardCacheSize` and `features::kBackForwardCache`, the former should
// take precedence.
class BackForwardCacheOverwriteSizeTest : public ::testing::Test {};

TEST_F(BackForwardCacheOverwriteSizeTest, OverwrittenCacheSize) {}

// Covers BackForwardCache's default cache size-related values.
// Note that these tests don't cover the values configured from Finch.
class BackForwardCacheDefaultSizeTest : public ::testing::Test {};

TEST_F(BackForwardCacheDefaultSizeTest, DefaultCacheSize) {}

}  // namespace content