chromium/components/ip_protection/common/masked_domain_list_manager_unittest.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 "components/ip_protection/common/masked_domain_list_manager.h"

#include <string_view>

#include "base/strings/strcat.h"
#include "base/test/scoped_feature_list.h"
#include "base/unguessable_token.h"
#include "components/privacy_sandbox/masked_domain_list/masked_domain_list.pb.h"
#include "net/base/features.h"
#include "net/base/network_anonymization_key.h"
#include "net/base/schemeful_site.h"
#include "services/network/public/cpp/features.h"
#include "services/network/public/mojom/proxy_config.mojom-shared.h"
#include "testing/gmock/include/gmock/gmock-matchers.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/url_util.h"

namespace ip_protection {
namespace {
MaskedDomainList;
Resource;
ResourceOwner;
Eq;

struct ExperimentGroupMatchTest {};

const std::vector<ExperimentGroupMatchTest> kMatchTests =;

constexpr std::string_view kTestDomain =;

}  // namespace

class MaskedDomainListManagerBaseTest : public testing::Test {};

class MaskedDomainListManagerTest : public MaskedDomainListManagerBaseTest {};

TEST_F(MaskedDomainListManagerBaseTest, IsNotEnabledByDefault) {}

TEST_F(MaskedDomainListManagerBaseTest, IsEnabledWhenManuallySet) {}

TEST_F(MaskedDomainListManagerBaseTest, AllowListIsNotPopulatedByDefault) {}

TEST_F(MaskedDomainListManagerBaseTest, AllowlistIsPopulatedWhenMDLUsed) {}

TEST_F(MaskedDomainListManagerTest, ShouldMatchHttp) {}

TEST_F(MaskedDomainListManagerTest, ShouldMatchThirdPartyToTopLevelFrame) {}

TEST_F(MaskedDomainListManagerTest,
       MatchFirstPartyToTopLevelFrameDependsOnBypass) {}

TEST_F(MaskedDomainListManagerTest,
       MatchFirstPartyToTopLevelFrameIfEmptyNakDependsOnBypass) {}

TEST_F(MaskedDomainListManagerTest,
       ShouldNotMatchWithFencedFrameNakIfUrlDoesNotMatch) {}

TEST_F(MaskedDomainListManagerTest, ShouldMatchWithFencedFrameNakIfUrlMatches) {}

TEST_F(MaskedDomainListManagerTest, CustomSchemeTopLevelSite) {}

// Test whether third-party requests from pages with a data: URL top-level site
// (where the corresponding NAK is transient) should be proxied.
TEST_F(MaskedDomainListManagerTest, DataUrlTopLevelSite) {}

TEST_F(MaskedDomainListManagerTest, AllowListWithoutBypassUsesLessMemory) {}

class MaskedDomainListManagerExperimentGroupMatchTest
    : public MaskedDomainListManagerBaseTest,
      public testing::WithParamInterface<ExperimentGroupMatchTest> {};

TEST_P(MaskedDomainListManagerExperimentGroupMatchTest, Match) {}

INSTANTIATE_TEST_SUITE_P();

TEST_F(MaskedDomainListManagerBaseTest, ExclusionSetDomainsRemovedFromMDL) {}

}  // namespace ip_protection