chromium/net/base/registry_controlled_domains/registry_controlled_domain_unittest.cc

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

#include "net/base/registry_controlled_domains/registry_controlled_domain.h"

#include <cstdint>

#include "base/containers/span.h"
#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/buildflags.h"
#include "url/gurl.h"
#include "url/origin.h"

namespace {

namespace test1 {
#include "net/base/registry_controlled_domains/effective_tld_names_unittest1-reversed-inc.cc"
}
namespace test2 {
#include "net/base/registry_controlled_domains/effective_tld_names_unittest2-reversed-inc.cc"
}
namespace test3 {
#include "net/base/registry_controlled_domains/effective_tld_names_unittest3-reversed-inc.cc"
}
namespace test4 {
#include "net/base/registry_controlled_domains/effective_tld_names_unittest4-reversed-inc.cc"
}
namespace test5 {
#include "net/base/registry_controlled_domains/effective_tld_names_unittest5-reversed-inc.cc"
}
namespace test6 {
#include "net/base/registry_controlled_domains/effective_tld_names_unittest6-reversed-inc.cc"
}

}  // namespace

namespace net::registry_controlled_domains {

namespace {

std::string GetDomainFromHost(const std::string& host) {}

size_t GetRegistryLengthFromURL(
    const std::string& url,
    UnknownRegistryFilter unknown_filter) {}

size_t GetRegistryLengthFromURLIncludingPrivate(
    const std::string& url,
    UnknownRegistryFilter unknown_filter) {}

size_t PermissiveGetHostRegistryLength(std::string_view host) {}

// Only called when using ICU (avoids unused static function error).
#if !BUILDFLAG(USE_PLATFORM_ICU_ALTERNATIVES)
size_t PermissiveGetHostRegistryLength(std::u16string_view host) {}
#endif

size_t GetCanonicalHostRegistryLength(const std::string& host,
                                      UnknownRegistryFilter unknown_filter) {}

size_t GetCanonicalHostRegistryLengthIncludingPrivate(const std::string& host) {}

}  // namespace

class RegistryControlledDomainTest : public testing::Test {};

TEST_F(RegistryControlledDomainTest, TestHostIsRegistryIdentifier) {}

TEST_F(RegistryControlledDomainTest, TestGetDomainAndRegistry) {}

TEST_F(RegistryControlledDomainTest, TestGetRegistryLength) {}

TEST_F(RegistryControlledDomainTest, HostHasRegistryControlledDomain) {}

TEST_F(RegistryControlledDomainTest, TestSameDomainOrHost) {}

TEST_F(RegistryControlledDomainTest, TestDefaultData) {}

TEST_F(RegistryControlledDomainTest, TestPrivateRegistryHandling) {}

TEST_F(RegistryControlledDomainTest, TestDafsaTwoByteOffsets) {}

TEST_F(RegistryControlledDomainTest, TestDafsaThreeByteOffsets) {}

TEST_F(RegistryControlledDomainTest, TestDafsaJoinedPrefixes) {}

TEST_F(RegistryControlledDomainTest, TestDafsaJoinedSuffixes) {}

TEST_F(RegistryControlledDomainTest, Permissive) {}

}  // namespace net::registry_controlled_domains