chromium/net/base/url_util_unittest.cc

// Copyright 2013 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/url_util.h"

#include <optional>
#include <ostream>

#include "base/format_macros.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
#include "url/scheme_host_port.h"
#include "url/url_features.h"
#include "url/url_util.h"

ASCIIToUTF16;
WideToUTF16;

namespace net {
namespace {

TEST(UrlUtilTest, AppendQueryParameter) {}

TEST(UrlUtilTest, AppendOrReplaceQueryParameter) {}

TEST(UrlUtilTest, AppendOrReplaceRef) {}

TEST(UrlUtilTest, GetValueForKeyInQuery) {}

TEST(UrlUtilTest, GetValueForKeyInQueryInvalidURL) {}

TEST(UrlUtilTest, ParseQuery) {}

TEST(UrlUtilTest, ParseQueryInvalidURL) {}

TEST(UrlUtilTest, ParseHostAndPort) {}
TEST(UrlUtilTest, GetHostAndPort) {}

TEST(UrlUtilTest, GetHostAndOptionalPort) {}

TEST(UrlUtilTest, GetHostOrSpecFromURL) {}

TEST(UrlUtilTest, GetSuperdomain) {}

TEST(UrlUtilTest, IsSubdomainOf) {}

TEST(UrlUtilTest, CompliantHost) {}

struct NonUniqueNameTestData {};

// Google Test pretty-printer.
void PrintTo(const NonUniqueNameTestData& data, std::ostream* os) {}

const NonUniqueNameTestData kNonUniqueNameTestData[] =;

class UrlUtilNonUniqueNameTest
    : public testing::TestWithParam<NonUniqueNameTestData> {};

// Test that internal/non-unique names are properly identified as such, but
// that IP addresses and hosts beneath registry-controlled domains are flagged
// as unique names.
TEST_P(UrlUtilNonUniqueNameTest, IsHostnameNonUnique) {}

INSTANTIATE_TEST_SUITE_P();

TEST(UrlUtilTest, IsLocalhost) {}

class UrlUtilTypedTest : public ::testing::TestWithParam<bool> {};

INSTANTIATE_TEST_SUITE_P();

TEST(UrlUtilTest, SimplifyUrlForRequest) {}

TEST_P(UrlUtilTypedTest, SimplifyUrlForRequest) {}

TEST(UrlUtilTest, ChangeWebSocketSchemeToHttpScheme) {}

TEST(UrlUtilTest, SchemeHasNetworkHost) {}

TEST(UrlUtilTest, GetIdentityFromURL) {}

// Try extracting a username which was encoded with UTF8.
TEST(UrlUtilTest, GetIdentityFromURL_UTF8) {}

TEST(UrlUtilTest, GoogleHost) {}

TEST(UrlUtilTest, IsLocalHostname) {}

TEST(UrlUtilTest, GoogleHostWithAlpnH3) {}

}  // namespace
}  // namespace net