#include "services/network/proxy_auto_config_library.h"
#include <algorithm>
#include <deque>
#include <memory>
#include <string_view>
#include "base/barrier_closure.h"
#include "base/containers/circular_deque.h"
#include "base/functional/bind.h"
#include "base/functional/callback_forward.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/notreached.h"
#include "base/run_loop.h"
#include "base/task/sequenced_task_runner.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "net/base/address_list.h"
#include "net/base/completion_once_callback.h"
#include "net/base/ip_address.h"
#include "net/base/net_errors.h"
#include "net/base/network_interfaces.h"
#include "net/dns/host_resolver_system_task.h"
#include "net/log/net_log_with_source.h"
#include "net/socket/client_socket_factory.h"
#include "net/socket/datagram_client_socket.h"
#include "services/proxy_resolver/public/mojom/proxy_resolver.mojom.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace network {
namespace {
class MockClient : public proxy_resolver::mojom::HostResolverRequestClient { … };
void VerifyActualMyIpAddresses(const net::IPAddressList& test_list) { … }
net::IPAddress CreateIPAddress(std::string_view literal) { … }
class MockHostResolverProc : public net::HostResolverProc { … };
class MockUDPSocket : public net::DatagramClientSocket { … };
class MockSocketFactory : public net::ClientSocketFactory { … };
class PacLibraryTest : public testing::Test { … };
TEST_F(PacLibraryTest, ActualPacMyIpAddress) { … }
TEST_F(PacLibraryTest, ActualPacMyIpAddressEx) { … }
TEST_F(PacLibraryTest, PacMyIpAddress8888) { … }
TEST_F(PacLibraryTest, PacMyIpAddress8888AsyncConnect) { … }
TEST_F(PacLibraryTest, PacMyIpAddress8888AsyncConnect2) { … }
TEST_F(PacLibraryTest, PacMyIpAddress8888AsyncConnect2OutOfOrder) { … }
TEST_F(PacLibraryTest, PacMyIpAddress8888AsyncConnect2OutOfOrder2) { … }
TEST_F(PacLibraryTest, PacMyIpAddress2001) { … }
TEST_F(PacLibraryTest, PacMyIpAddressHostname) { … }
TEST_F(PacLibraryTest, PacMyIpAddressHostnameAllIPv6) { … }
TEST_F(PacLibraryTest, PacMyIpAddressPrivateIPv4) { … }
TEST_F(PacLibraryTest, PacMyIpAddressPrivateIPv6) { … }
TEST_F(PacLibraryTest, PacMyIpAddressAllFail) { … }
TEST_F(PacLibraryTest, PacMyIpAddressAllFailOrLoopback) { … }
TEST_F(PacLibraryTest, PacMyIpAddressAllFailHasLinkLocal) { … }
TEST_F(PacLibraryTest, PacMyIpAddressAllFailHasLinkLocalFavorIPv4) { … }
TEST_F(PacLibraryTest, PacMyIpAddressEx8888) { … }
TEST_F(PacLibraryTest, PacMyIpAddressEx2001) { … }
TEST_F(PacLibraryTest, PacMyIpAddressEx8888And2001) { … }
TEST_F(PacLibraryTest, PacMyIpAddressExHostname) { … }
TEST_F(PacLibraryTest, PacMyIpAddressExPrivateDuplicates) { … }
TEST_F(PacLibraryTest, PacMyIpAddressExPrivateDuplicatesAsyncConnect) { … }
TEST_F(PacLibraryTest, PacMyIpAddressExAllFail) { … }
TEST_F(PacLibraryTest, PacMyIpAddressExAllFailHasLinkLocal) { … }
TEST_F(PacLibraryTest, PacMyIpAddressExAllFailHasLinkLocalFavorIPv4) { … }
TEST_F(PacLibraryTest, PacMyIpAddressExAllFailOrLoopback) { … }
TEST_F(PacLibraryTest, PacMyIpAddressExRunMultipleTimes) { … }
TEST_F(PacLibraryTest, PacMyIpAddressExRunMultipleTimesAsync) { … }
TEST_F(PacLibraryTest, PacMyIpAddressExAllFailOrLoopbackAsyncConnect) { … }
TEST_F(PacLibraryTest, DeleteMyIpAddressImpl) { … }
TEST_F(PacLibraryTest, ConnectMultipleRemotes) { … }
TEST_F(PacLibraryTest, ConnectMultipleRemotesAsync) { … }
TEST_F(PacLibraryTest, ConnectMultipleRemotesOneDisconnects) { … }
TEST_F(PacLibraryTest, ConnectMultipleRemotesButAllDisconnect) { … }
TEST_F(PacLibraryTest, ConnectOneRemoteAndThenAnother) { … }
}
}