#include "content/browser/preloading/speculation_rules/speculation_host_impl.h"
#include "base/memory/raw_ptr.h"
#include "base/test/bind.h"
#include "base/test/scoped_feature_list.h"
#include "base/unguessable_token.h"
#include "content/browser/preloading/preloading_decider.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/test/prerender_test_util.h"
#include "content/public/test/test_browser_context.h"
#include "content/public/test/test_utils.h"
#include "content/test/test_content_browser_client.h"
#include "content/test/test_render_view_host.h"
#include "content/test/test_web_contents.h"
#include "mojo/public/cpp/system/functions.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/speculation_rules/speculation_rules.mojom.h"
namespace content {
namespace {
class SpeculationHostImplTest : public RenderViewHostImplTestHarness { … };
class ScopedPreloadingDeciderObserver
: public PreloadingDeciderObserverForTesting { … };
TEST_F(SpeculationHostImplTest, StartPrerender) { … }
TEST_F(SpeculationHostImplTest, ReportNonHttpMessage) { … }
TEST_F(SpeculationHostImplTest,
ReportTargetBrowsingContextNameHintOnPrefetchCandidate) { … }
TEST_F(SpeculationHostImplTest,
ReportInvalidRequiresAnonymousClientIpWhenCrossOrigin) { … }
class TestSpeculationHostDelegate : public SpeculationHostDelegate { … };
class ScopedSpeculationHostImplContentBrowserClient
: public TestContentBrowserClient { … };
TEST_F(SpeculationHostImplTest, AllCandidatesProcessedByDelegate) { … }
}
}