#include <atomic>
#include "base/path_service.h"
#include "base/strings/pattern.h"
#include "base/strings/stringprintf.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "build/build_config.h"
#include "content/browser/renderer_host/back_forward_cache_disable.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/common/renderer.mojom.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/common/content_paths.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/public/test/resource_load_observer.h"
#include "content/shell/browser/shell.h"
#include "content/test/content_browser_test_utils_internal.h"
#include "net/base/features.h"
#include "net/base/network_isolation_key.h"
#include "net/dns/mock_host_resolver.h"
#include "net/test/embedded_test_server/default_handlers.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "net/test/embedded_test_server/http_request.h"
#include "net/test/embedded_test_server/http_response.h"
#include "net/test/scoped_mutually_exclusive_feature_list.h"
#include "services/network/public/mojom/network_context.mojom.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/frame/fullscreen.mojom.h"
#include "url/gurl.h"
namespace content {
namespace {
class SplitCacheContentBrowserTest : public ContentBrowserTest { … };
enum class SplitCacheTestCase { … };
const struct { … } kTestCaseToFeatureMapping[] = …;
class SplitCacheContentBrowserTestEnabled
: public SplitCacheContentBrowserTest,
public testing::WithParamInterface<SplitCacheTestCase> { … };
INSTANTIATE_TEST_SUITE_P(…);
class SplitCacheContentBrowserTestPlzDedicatedWorker
: public SplitCacheContentBrowserTest,
public ::testing::WithParamInterface<bool> { … };
class SplitCacheContentBrowserTestDisabled
: public SplitCacheContentBrowserTest { … };
IN_PROC_BROWSER_TEST_P(SplitCacheContentBrowserTestEnabled, MainFrame) { … }
IN_PROC_BROWSER_TEST_P(SplitCacheContentBrowserTestEnabled, MainFrameRedirect) { … }
IN_PROC_BROWSER_TEST_P(SplitCacheContentBrowserTestEnabled, Subframe) { … }
IN_PROC_BROWSER_TEST_P(SplitCacheContentBrowserTestEnabled, MainFrameDataUrl) { … }
IN_PROC_BROWSER_TEST_P(SplitCacheContentBrowserTestEnabled,
MainFrameAboutBlank) { … }
IN_PROC_BROWSER_TEST_P(SplitCacheContentBrowserTestEnabled, SubFrameRedirect) { … }
IN_PROC_BROWSER_TEST_P(SplitCacheContentBrowserTestEnabled, SubFrameDataUrl) { … }
IN_PROC_BROWSER_TEST_P(SplitCacheContentBrowserTestEnabled,
SubframeAboutBlank) { … }
IN_PROC_BROWSER_TEST_P(SplitCacheContentBrowserTestEnabled, Popup) { … }
IN_PROC_BROWSER_TEST_F(SplitCacheContentBrowserTestDisabled, NonSplitCache) { … }
IN_PROC_BROWSER_TEST_P(SplitCacheContentBrowserTestEnabled,
NavigationResources) { … }
IN_PROC_BROWSER_TEST_P(SplitCacheContentBrowserTestEnabled,
SubframeNavigationResources) { … }
IN_PROC_BROWSER_TEST_P(SplitCacheContentBrowserTestEnabled,
SubframeNavigationResource) { … }
IN_PROC_BROWSER_TEST_P(SplitCacheContentBrowserTestEnabled,
CrossSiteNavigation) { … }
IN_PROC_BROWSER_TEST_P(SplitCacheContentBrowserTestEnabled,
CrossOriginSameSiteNavigation) { … }
class SplitCacheComputeHttpCacheSize { … };
#if BUILDFLAG(IS_WIN)
#define MAYBE_NotifyExternalCacheHitCheckSubframeBit …
#else
#define MAYBE_NotifyExternalCacheHitCheckSubframeBit …
#endif
IN_PROC_BROWSER_TEST_P(SplitCacheContentBrowserTestEnabled,
MAYBE_NotifyExternalCacheHitCheckSubframeBit) { … }
IN_PROC_BROWSER_TEST_P(SplitCacheContentBrowserTestPlzDedicatedWorker,
DedicatedWorkers) { … }
IN_PROC_BROWSER_TEST_P(SplitCacheContentBrowserTestPlzDedicatedWorker,
DISABLED_DedicatedWorkersScripts) { … }
IN_PROC_BROWSER_TEST_F(SplitCacheContentBrowserTestDisabled, DedicatedWorkers) { … }
INSTANTIATE_TEST_SUITE_P(…);
class ScopeBlinkMemoryCachePerContext : public SplitCacheContentBrowserTest { … };
IN_PROC_BROWSER_TEST_F(ScopeBlinkMemoryCachePerContext, DISABLED_CheckFeature) { … }
class SplitCacheByIncludeCredentialsTest : public ContentBrowserTest { … };
IN_PROC_BROWSER_TEST_F(SplitCacheByIncludeCredentialsTest, SameProcess) { … }
IN_PROC_BROWSER_TEST_F(SplitCacheByIncludeCredentialsTest, SameProcessVariant) { … }
IN_PROC_BROWSER_TEST_F(SplitCacheByIncludeCredentialsTest, DifferentProcess) { … }
IN_PROC_BROWSER_TEST_F(SplitCacheByIncludeCredentialsTest,
DifferentProcessVariant) { … }
}
}