#include "services/network/public/cpp/ip_address_space_util.h"
#include "base/command_line.h"
#include "base/test/scoped_feature_list.h"
#include "net/base/ip_address.h"
#include "net/base/ip_endpoint.h"
#include "net/base/transport_info.h"
#include "services/network/public/cpp/features.h"
#include "services/network/public/cpp/network_switches.h"
#include "services/network/public/mojom/ip_address_space.mojom.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
namespace network {
namespace {
ContentSecurityPolicy;
IPAddressSpace;
ParsedHeaders;
URLResponseHead;
IPAddress;
IPAddressBytes;
IPEndPoint;
TransportInfo;
TransportType;
IPAddress PublicIPv4Address() { … }
IPAddress PrivateIPv4Address() { … }
TransportInfo DirectTransport(const IPEndPoint& endpoint) { … }
TransportInfo ProxiedTransport(const IPEndPoint& endpoint) { … }
TransportInfo MakeTransport(TransportType type, const IPEndPoint& endpoint) { … }
IPAddressSpace IPEndPointToIPAddressSpace(const IPEndPoint& endpoint) { … }
IPAddressSpace IPAddressToIPAddressSpace(const IPAddress& address) { … }
TEST(IPAddressSpaceTest, IPEndPointToIPAddressSpaceInvalid) { … }
TEST(IPAddressSpaceTest, IPEndPointToIPAddressSpaceV4Public) { … }
TEST(IPAddressSpaceTest, IPEndPointToIPAddressSpaceV4PrivateUse) { … }
TEST(IPAddressSpaceTest, IPEndPointToIPAddressSpaceV4LinkLocal) { … }
TEST(IPAddressSpaceTest, IPEndPointToIPAddressSpaceV4Localhost) { … }
IPAddress ParseIPAddress(std::string_view str) { … }
TEST(IPAddressSpaceTest, IPEndPointToIPAddressSpaceV6Public) { … }
TEST(IPAddressSpaceTest, IPEndPointToIPAddressSpaceV6UniqueLocal) { … }
TEST(IPAddressSpaceTest, IPEndPointToIPAddressSpaceV6LinkLocalUnicast) { … }
TEST(IPAddressSpaceTest, IPEndPointToIPAddressSpaceV6Localhost) { … }
TEST(IPAddressSpaceTest, IPEndPointToAddressSpaceIPv4MappedIPv6) { … }
TEST(IPAddressSpaceTest, IPEndPointToAddressSpaceNullIP) { … }
TEST(IPAddressSpaceTest, IPEndPointToAddressSpaceNullIPKillSwitch) { … }
TEST(IPAddressSpaceTest, IPEndPointToAddressSpaceOverrideEmpty) { … }
TEST(IPAddressSpaceTest, IPEndPointToAddressSpaceOverrideSingle) { … }
TEST(IPAddressSpaceTest, IPEndPointToAddressSpaceOverrideMultiple) { … }
TEST(IPAddressSpaceTest, IPEndPointToAddressSpaceOverrideInvalid) { … }
TEST(IPAddressSpaceTest, IPEndPointToAddressSpaceOverrideOverlap) { … }
TEST(IPAddressSpaceTest, IPEndPointToAddressSpaceOverrideInvalidAddress) { … }
TEST(IPAddressSpaceTest, IPEndPointToAddressSpaceOverrideV6) { … }
TEST(IPAddressSpaceTest, TransportInfoToIPAddressSpaceProxiedIsUnknown) { … }
TEST(IPAddressSpaceTest, TransportInfoToIPAddressSpaceProxiedIgnoresOverrides) { … }
TEST(IPAddressSpaceTest,
TransportInfoToIPAddressSpaceCachedFromProxyIsUnknown) { … }
TEST(IPAddressSpaceTest,
TransportInfoToIPAddressSpaceCachedFromProxyIgnoresOverrides) { … }
TEST(IPAddressSpaceTest, IPEndPointToAddressSpaceOverrideIPv4MappedIPv6) { … }
TEST(IPAddressSpaceTest, IsLessPublicAddressSpaceThanLocal) { … }
TEST(IPAddressSpaceTest, IsLessPublicAddressSpaceThanPrivate) { … }
TEST(IPAddressSpaceTest, IsLessPublicAddressSpaceThanPublic) { … }
TEST(IPAddressSpaceTest, IsLessPublicAddressSpaceThanUnknown) { … }
TEST(IPAddressSpaceUtilTest, CalculateClientAddressSpaceFileURL) { … }
TEST(IPAddressSpaceUtilTest,
CalculateClientAddressSpaceInheritedFromServiceWorker) { … }
TEST(IPAddressSpaceUtilTest, CalculateClientAddressSpaceNullParams) { … }
TEST(IPAddressSpaceUtilTest, CalculateClientAddressSpaceEmptyParams) { … }
TEST(IPAddressSpaceUtilTest, CalculateClientAddressSpaceIPAddress) { … }
TEST(IPAddressSpaceUtilTest, CalculateClientAddressSpaceTreatAsPublicAddress) { … }
TEST(IPAddressSpaceTest, CalculateClientAddressSpaceOverride) { … }
TEST(IPAddressSpaceTest, CalculateResourceAddressSpaceFileURL) { … }
TEST(IPAddressSpaceTest, CalculateResourceAddressSpaceIPAddress) { … }
TEST(IPAddressSpaceTest, CalculateResourceAddressSpaceOverride) { … }
}
}