#include "base/test/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "content/browser/loader/subresource_proxying_url_loader_service.h"
#include "content/browser/web_package/prefetched_signed_exchange_cache.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/test/back_forward_cache_util.h"
#include "content/public/test/navigation_simulator.h"
#include "content/public/test/test_utils.h"
#include "content/public/test/web_contents_tester.h"
#include "content/test/test_render_frame_host.h"
#include "content/test/test_render_view_host.h"
#include "mojo/public/cpp/system/functions.h"
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
#include "services/network/public/cpp/wrapper_shared_url_loader_factory.h"
#include "services/network/public/mojom/parsed_headers.mojom.h"
#include "services/network/test/test_url_loader_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "third_party/blink/public/mojom/browsing_topics/browsing_topics.mojom.h"
namespace content {
namespace {
FollowRedirectParams;
constexpr char kExpectedHeaderForEmptyTopics[] = …;
constexpr char kExpectedHeaderForOrigin1[] = …;
constexpr char kExpectedHeaderForOrigin2[] = …;
class TopicsInterceptingContentBrowserClient : public ContentBrowserClient { … };
}
class BrowsingTopicsURLLoaderTest : public RenderViewHostTestHarness { … };
TEST_F(BrowsingTopicsURLLoaderTest, RequestArrivedBeforeCommit) { … }
TEST_F(BrowsingTopicsURLLoaderTest, RequestArrivedAfterCommit) { … }
TEST_F(BrowsingTopicsURLLoaderTest, RequestArrivedAfterDocumentDestroyed) { … }
TEST_F(BrowsingTopicsURLLoaderTest, RequestFromSubframe) { … }
TEST_F(BrowsingTopicsURLLoaderTest, HasFalseValueObserveResponseHeader) { … }
TEST_F(BrowsingTopicsURLLoaderTest, EmptyTopics) { … }
TEST_F(BrowsingTopicsURLLoaderTest, TopicsNotEligibleDueToFromFencedFrame) { … }
TEST_F(BrowsingTopicsURLLoaderTest, TopicsNotEligibleDueToInactiveFrame) { … }
TEST_F(BrowsingTopicsURLLoaderTest, OpaqueRequestURL) { … }
TEST_F(BrowsingTopicsURLLoaderTest, TopicsNotEligibleDueToPermissionsPolicy) { … }
TEST_F(BrowsingTopicsURLLoaderTest,
TopicsNotEligibleDueToContentClientSettings) { … }
TEST_F(BrowsingTopicsURLLoaderTest, RedirectTopicsUpdated) { … }
TEST_F(BrowsingTopicsURLLoaderTest, RedirectNotEligibleForTopics) { … }
TEST_F(BrowsingTopicsURLLoaderTest, TwoRequests) { … }
TEST_F(BrowsingTopicsURLLoaderTest, TwoFactories) { … }
TEST_F(BrowsingTopicsURLLoaderTest, BindContextClearedDueToDisconnect) { … }
TEST_F(BrowsingTopicsURLLoaderTest, ReportBadMessageOnInvalidRequest) { … }
}