chromium/content/browser/preloading/prerenderer_impl_browsertest.cc

// Copyright 2024 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/preloading/prerenderer_impl.h"

#include "base/test/scoped_feature_list.h"
#include "content/browser/preloading/prefetch/prefetch_features.h"
#include "content/browser/preloading/preloading.h"
#include "content/browser/preloading/preloading_confidence.h"
#include "content/browser/preloading/preloading_decider.h"
#include "content/browser/preloading/prerender/prerender_features.h"
#include "content/browser/preloading/prerender/prerender_host_registry.h"
#include "content/public/browser/web_contents_delegate.h"
#include "content/public/common/content_client.h"
#include "content/public/common/isolated_world_ids.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/public/test/prefetch_test_util.h"
#include "content/public/test/prerender_test_util.h"
#include "content/public/test/test_browser_context.h"
#include "content/public/test/test_renderer_host.h"
#include "content/shell/browser/shell.h"
#include "content/test/test_content_browser_client.h"
#include "content/test/test_web_contents.h"
#include "net/dns/mock_host_resolver.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/speculation_rules/speculation_rules.mojom.h"

namespace content {
namespace {

struct RequestPathAndSecPurposeHeader {};

class PrerendererImplBrowserTestBase : public ContentBrowserTest {};

class PrerendererImplBrowserTestNoPrefetchAhead
    : public PrerendererImplBrowserTestBase {};

class PrerendererImplBrowserTestPrefetchAhead
    : public PrerendererImplBrowserTestBase {};

IN_PROC_BROWSER_TEST_F(PrerendererImplBrowserTestNoPrefetchAhead,
                       PrefetchNotTriggeredPrerenderSuccess) {}

IN_PROC_BROWSER_TEST_F(PrerendererImplBrowserTestNoPrefetchAhead,
                       PrefetchNotTriggeredPrerenderFailure) {}

IN_PROC_BROWSER_TEST_F(PrerendererImplBrowserTestPrefetchAhead,
                       PrefetchSuccessPrerenderSuccess) {}

IN_PROC_BROWSER_TEST_F(PrerendererImplBrowserTestPrefetchAhead,
                       PrefetchSuccessPrerenderNotEligible) {}

IN_PROC_BROWSER_TEST_F(PrerendererImplBrowserTestPrefetchAhead,
                       PrefetchSuccessPrerenderFailure) {}

}  // namespace
}  // namespace content