#include "content/public/test/back_forward_cache_util.h"
#include <map>
#include <set>
#include "base/containers/contains.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_number_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "content/browser/renderer_host/back_forward_cache_impl.h"
#include "content/common/features.h"
#include "content/public/browser/global_routing_id.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_features.h"
namespace content {
namespace {
std::vector<base::test::FeatureRefAndParams>
GetDefaultEnabledBackForwardCacheFeaturesAndParams(
const bool ignore_outstanding_network_request) { … }
std::vector<base::test::FeatureRefAndParams> Merge(
const std::vector<base::test::FeatureRefAndParams>&
default_features_and_params,
const std::vector<base::test::FeatureRefAndParams>&
additional_features_and_params) { … }
}
class BackForwardCacheDisabledTester::Impl
: public BackForwardCacheTestDelegate { … };
BackForwardCacheDisabledTester::BackForwardCacheDisabledTester()
: … { … }
BackForwardCacheDisabledTester::~BackForwardCacheDisabledTester() { … }
bool BackForwardCacheDisabledTester::IsDisabledForFrameWithReason(
int process_id,
int frame_routing_id,
BackForwardCache::DisabledReason reason) { … }
void DisableBackForwardCacheForTesting(
WebContents* web_contents,
BackForwardCache::DisableForTestingReason reason) { … }
std::vector<base::test::FeatureRefAndParams>
GetDefaultEnabledBackForwardCacheFeaturesForTesting(
const bool ignore_outstanding_network_request) { … }
std::vector<base::test::FeatureRefAndParams>
GetDefaultEnabledBackForwardCacheFeaturesForTesting(
const std::vector<base::test::FeatureRefAndParams>&
additional_features_and_params,
const bool ignore_outstanding_network_request) { … }
std::vector<base::test::FeatureRefAndParams>
GetDefaultEnabledBackForwardCacheFeaturesForTesting(
const std::vector<base::test::FeatureRefAndParams>&
additional_features_and_params,
const size_t cache_size,
const size_t foreground_cache_size,
const bool ignore_outstanding_network_request) { … }
std::vector<base::test::FeatureRefAndParams>
GetBasicBackForwardCacheFeatureForTesting() { … }
std::vector<base::test::FeatureRefAndParams>
GetBasicBackForwardCacheFeatureForTesting(
const std::vector<base::test::FeatureRefAndParams>&
additional_features_and_params) { … }
std::vector<base::test::FeatureRef>
GetDefaultDisabledBackForwardCacheFeaturesForTesting() { … }
std::vector<base::test::FeatureRef>
GetDefaultDisabledBackForwardCacheFeaturesForTesting(
const std::vector<base::test::FeatureRef>& additional_features) { … }
void InitBackForwardCacheFeature(base::test::ScopedFeatureList* feature_list,
bool enable_back_forward_cache) { … }
}