chromium/components/fingerprinting_protection_filter/renderer/renderer_url_loader_throttle_unittest.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 "components/fingerprinting_protection_filter/renderer/renderer_url_loader_throttle.h"

#include <memory>
#include <optional>
#include <string_view>

#include "base/test/task_environment.h"
#include "components/fingerprinting_protection_filter/renderer/renderer_agent.h"
#include "components/subresource_filter/core/mojom/subresource_filter.mojom.h"
#include "net/base/net_errors.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/mojom/fetch_api.mojom-shared.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/loader/url_loader_throttle.h"

namespace fingerprinting_protection_filter {

class MockThrottleDelegate : public blink::URLLoaderThrottle::Delegate {};

class MockRendererURLLoaderThrottle : public RendererURLLoaderThrottle {};

class RendererURLLoaderThrottleTest : public ::testing::Test {};

TEST_F(RendererURLLoaderThrottleTest, DoesNotDeferHttpsImageUrl) {}

TEST_F(RendererURLLoaderThrottleTest, DoesNotDeferChromeUrl) {}

TEST_F(RendererURLLoaderThrottleTest, DoesNotDeferIframeUrl) {}

TEST_F(RendererURLLoaderThrottleTest,
       DefersHttpsScriptUrlWhenWaitingForActivation) {}

TEST_F(RendererURLLoaderThrottleTest,
       DoesNotDeferHttpsScriptUrlWhenActivationComputed) {}

TEST_F(RendererURLLoaderThrottleTest, ResumesSafeUrlLoad) {}

TEST_F(RendererURLLoaderThrottleTest, BlocksMatchingUrlLoad) {}

TEST_F(RendererURLLoaderThrottleTest,
       ResumesMatchingUrlLoadWithDisabledActivation) {}

TEST_F(RendererURLLoaderThrottleTest,
       ResumesMatchingUrlLoadWithDryRunActivation) {}

}  // namespace fingerprinting_protection_filter