#include "content/browser/loader/navigation_early_hints_manager.h"
#include <memory>
#include "base/memory/scoped_refptr.h"
#include "base/run_loop.h"
#include "base/test/bind.h"
#include "content/browser/renderer_host/frame_tree_node.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/test_browser_context.h"
#include "content/public/test/test_storage_partition.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "net/http/http_request_headers.h"
#include "services/network/public/cpp/constants.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "services/network/public/mojom/early_hints.mojom.h"
#include "services/network/public/mojom/link_header.mojom.h"
#include "services/network/public/mojom/parsed_headers.mojom.h"
#include "services/network/test/test_network_context.h"
#include "services/network/test/test_url_loader_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace content {
PreloadedResources;
namespace {
const char kNavigationPath[] = …;
const char kPreloadPath[] = …;
const std::string kPreloadBody = …;
struct PreconnectRequest { … };
class FakeNetworkContext : public network::TestNetworkContext { … };
}
class NavigationEarlyHintsManagerTest : public testing::Test { … };
TEST_F(NavigationEarlyHintsManagerTest, SimpleResponse) { … }
TEST_F(NavigationEarlyHintsManagerTest, EmptyBody) { … }
TEST_F(NavigationEarlyHintsManagerTest, ResponseExistsInDiskCache) { … }
TEST_F(NavigationEarlyHintsManagerTest, PreloadSchemeIsUnsupported) { … }
TEST_F(NavigationEarlyHintsManagerTest, SinglePreconnect) { … }
TEST_F(NavigationEarlyHintsManagerTest, MultiplePreconnects) { … }
TEST_F(NavigationEarlyHintsManagerTest, InvalidPreconnectLink) { … }
TEST_F(NavigationEarlyHintsManagerTest, PreloadPriority) { … }
}