#include <string>
#include <vector>
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "base/test/bind.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/test_future.h"
#include "base/threading/thread_restrictions.h"
#include "build/build_config.h"
#include "content/browser/loader/prefetch_browsertest_base.h"
#include "content/browser/web_package/mock_signed_exchange_handler.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.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/fenced_frame_test_util.h"
#include "content/public/test/test_frame_navigation_observer.h"
#include "content/public/test/url_loader_monitor.h"
#include "content/shell/browser/shell.h"
#include "net/base/features.h"
#include "net/base/filename_util.h"
#include "net/base/isolation_info.h"
#include "net/dns/mock_host_resolver.h"
#include "net/test/embedded_test_server/default_handlers.h"
#include "net/test/scoped_mutually_exclusive_feature_list.h"
#include "services/network/public/cpp/features.h"
#include "services/network/public/cpp/resource_request.h"
#include "third_party/blink/public/common/features.h"
namespace content {
namespace {
enum class SplitCacheTestCase { … };
const struct { … } kTestCaseToFeatureMapping[] = …;
}
class PrefetchBrowserTest
: public PrefetchBrowserTestBase,
public testing::WithParamInterface<SplitCacheTestCase> { … };
class PrefetchBrowserTestPrivacyChanges
: public PrefetchBrowserTestBase,
public testing::WithParamInterface<bool> { … };
IN_PROC_BROWSER_TEST_P(PrefetchBrowserTestPrivacyChanges,
DISABLED_RedirectNotFollowed) { … }
IN_PROC_BROWSER_TEST_P(PrefetchBrowserTest,
DISABLED_CrossOriginDocumentHasNoSameSiteCookies) { … }
IN_PROC_BROWSER_TEST_P(PrefetchBrowserTest,
DISABLED_CrossOriginDocumentReusedAsNavigation) { … }
IN_PROC_BROWSER_TEST_P(PrefetchBrowserTest,
DISABLED_CrossOriginDocumentFromOpaqueOrigin) { … }
IN_PROC_BROWSER_TEST_P(
PrefetchBrowserTest,
DISABLED_CrossOriginDocumentNotReusedAsNestedFrameNavigation) { … }
IN_PROC_BROWSER_TEST_P(PrefetchBrowserTest,
DISABLED_CrossOriginSubresourceNotReused) { … }
IN_PROC_BROWSER_TEST_P(PrefetchBrowserTest,
DISABLED_CrossOriginSubresourceReusedByCurrentFrame) { … }
IN_PROC_BROWSER_TEST_P(PrefetchBrowserTest,
DISABLED_CrossOriginSubresourceNotReusedAsNavigation) { … }
IN_PROC_BROWSER_TEST_P(PrefetchBrowserTest, Simple) { … }
IN_PROC_BROWSER_TEST_P(PrefetchBrowserTest, DoublePrefetch) { … }
IN_PROC_BROWSER_TEST_P(PrefetchBrowserTest, NoCacheAndNoStore) { … }
IN_PROC_BROWSER_TEST_P(PrefetchBrowserTest, WithPreload) { … }
IN_PROC_BROWSER_TEST_P(PrefetchBrowserTest,
DISABLED_CrossOriginWithPreloadHasNoSameSiteCookies) { … }
IN_PROC_BROWSER_TEST_P(PrefetchBrowserTest,
DISABLED_CrossOriginWithPreloadAnonymous) { … }
IN_PROC_BROWSER_TEST_P(PrefetchBrowserTest,
DISABLED_CrossOriginWithInvalidPreloadAsDocument) { … }
IN_PROC_BROWSER_TEST_P(PrefetchBrowserTest,
DISABLED_CrossOriginWithPreloadCredentialled) { … }
IN_PROC_BROWSER_TEST_P(PrefetchBrowserTest, SignedExchangeWithPreload) { … }
IN_PROC_BROWSER_TEST_P(PrefetchBrowserTest,
DISABLED_CrossOriginSignedExchangeWithPreload) { … }
IN_PROC_BROWSER_TEST_P(PrefetchBrowserTest, FileToHttp) { … }
class FencedFramePrefetchTest : public PrefetchBrowserTestBase { … };
IN_PROC_BROWSER_TEST_F(FencedFramePrefetchTest, BasicPrefetch) { … }
IN_PROC_BROWSER_TEST_F(FencedFramePrefetchTest, NetworkCutoffDisablesPrefetch) { … }
IN_PROC_BROWSER_TEST_F(FencedFramePrefetchTest,
CrossOriginWithPreloadCredentialled) { … }
IN_PROC_BROWSER_TEST_F(FencedFramePrefetchTest,
DISABLED_NetworkCutoffDisablesRecursivePrefetch) { … }
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
}