chromium/url/gurl_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.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/350788890): Remove this and spanify to fix the errors.
#pragma allow_unsafe_buffers
#endif

#include "url/gurl.h"

#include <stddef.h>

#include "base/strings/string_number_conversions.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_abstract_tests.h"
#include "url/origin.h"
#include "url/url_canon.h"
#include "url/url_features.h"
#include "url/url_test_utils.h"

namespace url {

namespace {

// Returns the canonicalized string for the given URL string for the
// GURLTest.Types test.
std::string TypesTestCase(const char* src) {}

}  // namespace

// Different types of URLs should be handled differently, and handed off to
// different canonicalizers.
TEST(GURLTest, Types) {}

// Test the basic creation and querying of components in a GURL. We assume that
// the parser is already tested and works, so we are mostly interested if the
// object does the right thing with the results.
TEST(GURLTest, Components) {}

TEST(GURLTest, Empty) {}

TEST(GURLTest, Copy) {}

TEST(GURLTest, Assign) {}

// This is a regression test for http://crbug.com/309975.
TEST(GURLTest, SelfAssign) {}

TEST(GURLTest, CopyFileSystem) {}

TEST(GURLTest, IsValid) {}

TEST(GURLTest, ExtraSlashesBeforeAuthority) {}

// Given invalid URLs, we should still get most of the components.
TEST(GURLTest, ComponentGettersWorkEvenForInvalidURL) {}

TEST(GURLTest, Resolve) {}

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

TEST_P(GURLTypedTest, Resolve) {}

INSTANTIATE_TEST_SUITE_P();

TEST(GURLTest, GetOrigin) {}

TEST(GURLTest, GetAsReferrer) {}

TEST(GURLTest, GetWithEmptyPath) {}

TEST(GURLTest, GetWithoutFilename) {}

TEST(GURLTest, GetWithoutRef) {}

TEST(GURLTest, Replacements) {}

TEST_P(GURLTypedTest, Replacements) {}

TEST(GURLTypedTest, ClearFragmentOnDataUrl) {}

TEST(GURLTest, PathForRequest) {}

TEST(GURLTest, EffectiveIntPort) {}

TEST(GURLTest, IPAddress) {}

TEST(GURLTest, HostNoBrackets) {}

TEST(GURLTest, DomainIs) {}

TEST(GURLTest, DomainIsTerminatingDotBehavior) {}

TEST(GURLTest, DomainIsWithFilesystemScheme) {}

// Newlines should be stripped from inputs.
TEST(GURLTest, Newlines) {}

TEST(GURLTest, IsStandard) {}

TEST(GURLTest, SchemeIsHTTPOrHTTPS) {}

TEST(GURLTest, SchemeIsWSOrWSS) {}

TEST(GURLTest, SchemeIsCryptographic) {}

TEST(GURLTest, SchemeIsCryptographicStatic) {}

TEST(GURLTest, SchemeIsBlob) {}

TEST(GURLTest, SchemeIsLocal) {}

// Tests that the 'content' of the URL is properly extracted. This can be
// complex in cases such as multiple schemes (view-source:http:) or for
// javascript URLs. See GURL::GetContent for more details.
TEST(GURLTest, ContentForNonStandardURLs) {}

TEST_P(GURLTypedTest, ContentForNonStandardURLs) {}

// Tests that the URL path is properly extracted for unusual URLs. This can be
// complex in cases such as multiple schemes (view-source:http:) or when
// octothorpes ('#') are involved.
TEST(GURLTest, PathForNonStandardURLs) {}

TEST_P(GURLTypedTest, PathForNonStandardURLs) {}

TEST(GURLTest, EqualsIgnoringRef) {}

TEST(GURLTest, DebugAlias) {}

TEST(GURLTest, InvalidHost) {}

TEST(GURLTest, PortZero) {}

class GURLTestTraits {};

INSTANTIATE_TYPED_TEST_SUITE_P();

}  // namespace url