chromium/chrome/browser/extensions/loading_predictor_extension_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 "chrome/browser/extensions/extension_browsertest.h"
#include "chrome/browser/optimization_guide/optimization_guide_keyed_service.h"
#include "chrome/browser/optimization_guide/optimization_guide_keyed_service_factory.h"
#include "chrome/browser/predictors/predictors_features.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/optimization_guide/proto/loading_predictor_metadata.pb.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "net/dns/mock_host_resolver.h"

namespace extensions {

class LoadingPredictorExtensionBrowserTest : public ExtensionBrowserTest {};

// Tests that a prefetch triggered by LoadingPredictor is seen by an extension
// (via webRequest).
IN_PROC_BROWSER_TEST_F(LoadingPredictorExtensionBrowserTest,
                       PrefetchObservedByExtension) {}

// Tests that a prefetch triggered by LoadingPredictor is blocked by an
// extension using declarativeNetRequest.
IN_PROC_BROWSER_TEST_F(LoadingPredictorExtensionBrowserTest,
                       PrefetchBlockedByExtension) {}

}  // namespace extensions