chromium/content/browser/loader/background_resource_fetch_browsertests.cc

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "content/browser/web_contents/web_contents_impl.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/shell/browser/shell.h"
#include "content/test/content_browser_test_utils_internal.h"
#include "net/dns/mock_host_resolver.h"
#include "net/test/embedded_test_server/controllable_http_response.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/loader/background_resource_fetch_histograms.h"

namespace content {
namespace {

ElementsAre;

// TODO(crbug.com/40244488): When we will add VirtualTestSuites of web tests for
// BackgroundResourceFetch feature, duplicated basic tests should be deleted
// from BackgroundResourceFetchBrowserTest.
class BackgroundResourceFetchBrowserTest : public ContentBrowserTest {};

IN_PROC_BROWSER_TEST_F(BackgroundResourceFetchBrowserTest, ScriptLoad) {}

IN_PROC_BROWSER_TEST_F(BackgroundResourceFetchBrowserTest, ScriptLoadFailure) {}

IN_PROC_BROWSER_TEST_F(BackgroundResourceFetchBrowserTest,
                       ScriptLoadFailureAfterResponse) {}

IN_PROC_BROWSER_TEST_F(BackgroundResourceFetchBrowserTest, ScriptLoadTwice) {}

IN_PROC_BROWSER_TEST_F(BackgroundResourceFetchBrowserTest, ScriptLoadStop) {}

IN_PROC_BROWSER_TEST_F(BackgroundResourceFetchBrowserTest,
                       NavigationWhileLoadingScript) {}

IN_PROC_BROWSER_TEST_F(BackgroundResourceFetchBrowserTest,
                       UnupportedSyncRequest) {}

IN_PROC_BROWSER_TEST_F(BackgroundResourceFetchBrowserTest,
                       UnupportedNonGetRequest) {}

IN_PROC_BROWSER_TEST_F(BackgroundResourceFetchBrowserTest,
                       UnupportedNonHttpUrlRequest) {}

IN_PROC_BROWSER_TEST_F(BackgroundResourceFetchBrowserTest,
                       UnupportedKeepAliveRequest) {}

IN_PROC_BROWSER_TEST_F(BackgroundResourceFetchBrowserTest, FontLoad) {}

IN_PROC_BROWSER_TEST_F(BackgroundResourceFetchBrowserTest, FontLoadFailure) {}

IN_PROC_BROWSER_TEST_F(BackgroundResourceFetchBrowserTest,
                       ScriptLoadAfterCrossOriginSameSiteNavigation) {}

IN_PROC_BROWSER_TEST_F(BackgroundResourceFetchBrowserTest, Redirect) {}

IN_PROC_BROWSER_TEST_F(BackgroundResourceFetchBrowserTest, RedirectRejected) {}

}  // namespace
}  // namespace content