chromium/net/dns/host_resolver_manager_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.

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

#include "net/dns/host_resolver_manager_unittest.h"

#include <iterator>
#include <limits>
#include <optional>
#include <string>
#include <string_view>
#include <tuple>
#include <utility>
#include <vector>

#include "base/auto_reset.h"
#include "base/containers/contains.h"
#include "base/containers/to_vector.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/location.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/numerics/safe_conversions.h"
#include "base/rand_util.h"
#include "base/ranges/algorithm.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/synchronization/condition_variable.h"
#include "base/synchronization/lock.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/test/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/mock_callback.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/simple_test_clock.h"
#include "base/test/test_mock_time_task_runner.h"
#include "base/test/test_timeouts.h"
#include "base/threading/thread_restrictions.h"
#include "base/time/time.h"
#include "base/timer/mock_timer.h"
#include "base/values.h"
#include "build/build_config.h"
#include "net/base/address_family.h"
#include "net/base/address_list.h"
#include "net/base/connection_endpoint_metadata_test_util.h"
#include "net/base/features.h"
#include "net/base/host_port_pair.h"
#include "net/base/ip_address.h"
#include "net/base/ip_endpoint.h"
#include "net/base/mock_network_change_notifier.h"
#include "net/base/net_errors.h"
#include "net/base/network_anonymization_key.h"
#include "net/base/network_change_notifier.h"
#include "net/base/network_interfaces.h"
#include "net/base/schemeful_site.h"
#include "net/dns/address_sorter.h"
#include "net/dns/dns_client.h"
#include "net/dns/dns_config.h"
#include "net/dns/dns_test_util.h"
#include "net/dns/dns_util.h"
#include "net/dns/host_resolver.h"
#include "net/dns/host_resolver_cache.h"
#include "net/dns/host_resolver_internal_result.h"
#include "net/dns/host_resolver_internal_result_test_util.h"
#include "net/dns/host_resolver_results_test_util.h"
#include "net/dns/host_resolver_system_task.h"
#include "net/dns/mock_host_resolver.h"
#include "net/dns/mock_mdns_client.h"
#include "net/dns/mock_mdns_socket_factory.h"
#include "net/dns/public/dns_config_overrides.h"
#include "net/dns/public/dns_over_https_config.h"
#include "net/dns/public/dns_protocol.h"
#include "net/dns/public/dns_query_type.h"
#include "net/dns/public/doh_provider_entry.h"
#include "net/dns/public/mdns_listener_update_type.h"
#include "net/dns/public/resolve_error_info.h"
#include "net/dns/public/secure_dns_mode.h"
#include "net/dns/public/secure_dns_policy.h"
#include "net/dns/resolve_context.h"
#include "net/dns/test_dns_config_service.h"
#include "net/log/net_log_event_type.h"
#include "net/log/net_log_source_type.h"
#include "net/log/net_log_with_source.h"
#include "net/log/test_net_log.h"
#include "net/log/test_net_log_util.h"
#include "net/proxy_resolution/configured_proxy_resolution_service.h"
#include "net/socket/next_proto.h"
#include "net/socket/socket_test_util.h"
#include "net/test/gtest_util.h"
#include "net/test/test_with_task_environment.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_builder.h"
#include "net/url_request/url_request_test_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
#include "url/scheme_host_port.h"
#include "url/url_constants.h"

#if BUILDFLAG(ENABLE_MDNS)
#include "net/dns/mdns_client_impl.h"
#endif  // BUILDFLAG(ENABLE_MDNS)

IsError;
IsOk;
_;
AllOf;
AnyOf;
Between;
ByMove;
Contains;
ElementsAre;
Eq;
IsEmpty;
Not;
Optional;
Pair;
Pointee;
Property;
Return;
UnorderedElementsAre;

namespace net {

namespace {

const size_t kMaxJobs =;
const size_t kMaxRetryAttempts =;

HostResolverSystemTask::Params DefaultParams(
    scoped_refptr<HostResolverProc> resolver_proc) {}

class ResolveHostResponseHelper {};

// Using LookupAttemptHostResolverProc simulate very long lookups, and control
// which attempt resolves the host.
class LookupAttemptHostResolverProc : public HostResolverProc {};

// TestHostResolverManager's sole purpose is to mock the IPv6 reachability test.
// By default, this pretends that IPv6 is globally reachable.
// This class is necessary so unit tests run the same on dual-stack machines as
// well as IPv4 only machines.
class TestHostResolverManager : public HostResolverManager {};

bool HasAddress(const IPAddress& search_address,
                const std::vector<IPEndPoint>& addresses) {}

void TestBothLoopbackIPs(const std::string& host) {}

// Returns the DoH provider entry in `DohProviderEntry::GetList()` that matches
// `provider`. Crashes if there is no matching entry.
const DohProviderEntry& GetDohProviderEntryForTesting(
    std::string_view provider) {}

}  // namespace

HostResolverManagerTest::HostResolverManagerTest(
    base::test::TaskEnvironment::TimeSource time_source)
    :{}

HostResolverManagerTest::~HostResolverManagerTest() = default;

void HostResolverManagerTest::CreateResolver(bool check_ipv6_on_wifi) {}

void HostResolverManagerTest::DestroyResolver() {}

  // This HostResolverManager will only allow 1 outstanding resolve at a time
  // and perform no retries.
void HostResolverManagerTest::CreateSerialResolver(bool check_ipv6_on_wifi,
                                                   bool ipv6_reachable,
                                                   bool is_async) {}

void HostResolverManagerTest::SetUp() {}

void HostResolverManagerTest::TearDown() {}

void HostResolverManagerTest::CreateResolverWithLimitsAndParams(
    size_t max_concurrent_resolves,
    const HostResolverSystemTask::Params& params,
    bool ipv6_reachable,
    bool check_ipv6_on_wifi,
    bool is_async) {}

HostResolver::ManagerOptions HostResolverManagerTest::DefaultOptions() {}

void HostResolverManagerTest::CreateResolverWithOptionsAndParams(
    HostResolver::ManagerOptions options,
    const HostResolverSystemTask::Params& params,
    bool ipv6_reachable,
    bool is_async,
    bool ipv4_reachable) {}

size_t HostResolverManagerTest::num_running_dispatcher_jobs() const {}

void HostResolverManagerTest::set_allow_fallback_to_systemtask(
    bool allow_fallback_to_systemtask) {}

int HostResolverManagerTest::StartIPv6ReachabilityCheck(
    const NetLogWithSource& net_log,
    raw_ptr<ClientSocketFactory> client_socket_factory,
    CompletionOnceCallback callback) {}

bool HostResolverManagerTest::GetLastIpv6ProbeResult() {}

void HostResolverManagerTest::PopulateCache(const HostCache::Key& key,
                                            IPEndPoint endpoint) {}

const std::pair<const HostCache::Key, HostCache::Entry>*
HostResolverManagerTest::GetCacheHit(const HostCache::Key& key) {}

void HostResolverManagerTest::MakeCacheStale() {}

IPEndPoint HostResolverManagerTest::CreateExpected(
    const std::string& ip_literal,
    uint16_t port) {}

TEST_F(HostResolverManagerTest, AsynchronousLookup) {}

// TODO(crbug.com/40181080): Confirm scheme behavior once it affects behavior.
TEST_F(HostResolverManagerTest, AsynchronousLookupWithScheme) {}

TEST_F(HostResolverManagerTest, AsynchronousIpv6Lookup) {}

TEST_F(HostResolverManagerTest, AsynchronousAllFamilyLookup) {}

TEST_F(HostResolverManagerTest, JobsClearedOnCompletion) {}

TEST_F(HostResolverManagerTest, JobsClearedOnCompletion_MultipleRequests) {}

TEST_F(HostResolverManagerTest, JobsClearedOnCompletion_Failure) {}

TEST_F(HostResolverManagerTest, JobsClearedOnCompletion_Abort) {}

TEST_F(HostResolverManagerTest, DnsQueryType) {}

TEST_F(HostResolverManagerTest, DnsQueryWithoutAliases) {}

void HostResolverManagerTest::LocalhostIPV4IPV6LookupTest(bool is_async) {}

TEST_F(HostResolverManagerTest, LocalhostIPV4IPV6LookupAsync) {}

TEST_F(HostResolverManagerTest, LocalhostIPV4IPV6LookupSync) {}

TEST_F(HostResolverManagerTest, ResolveIPLiteralWithHostResolverSystemOnly) {}

TEST_F(HostResolverManagerTest, EmptyListMeansNameNotResolved) {}

TEST_F(HostResolverManagerTest, FailedAsynchronousLookup) {}

TEST_F(HostResolverManagerTest, AbortedAsynchronousLookup) {}

TEST_F(HostResolverManagerTest, NumericIPv4Address) {}

TEST_F(HostResolverManagerTest, NumericIPv4AddressWithScheme) {}

void HostResolverManagerTest::NumericIPv6AddressTest(bool is_async) {}

TEST_F(HostResolverManagerTest, NumericIPv6AddressAsync) {}

TEST_F(HostResolverManagerTest, NumericIPv6AddressSync) {}

void HostResolverManagerTest::NumericIPv6AddressWithSchemeTest(bool is_async) {}

TEST_F(HostResolverManagerTest, NumericIPv6AddressWithSchemeAsync) {}

TEST_F(HostResolverManagerTest, NumericIPv6AddressWithSchemeSync) {}

// Regression test for https://crbug.com/1432508.
//
// Tests that if a new request is made while the loop within
// FinishIPv6ReachabilityCheck is still running, and the new request needs to
// wait on a new IPv6 probe to complete, the new request does not try to modify
// the same vector that FinishIPv6ReachabilityCheck is iterating over.
TEST_F(HostResolverManagerTest, AddRequestDuringFinishIPv6ReachabilityCheck) {}

TEST_F(HostResolverManagerTest, EmptyHost) {}

TEST_F(HostResolverManagerTest, EmptyDotsHost) {}

TEST_F(HostResolverManagerTest, LongHost) {}

TEST_F(HostResolverManagerTest, DeDupeRequests) {}

TEST_F(HostResolverManagerTest, CancelMultipleRequests) {}

TEST_F(HostResolverManagerTest, CanceledRequestsReleaseJobSlots) {}

TEST_F(HostResolverManagerTest, CancelWithinCallback) {}

TEST_F(HostResolverManagerTest, DeleteWithinCallback) {}

TEST_F(HostResolverManagerTest, DeleteWithinAbortedCallback) {}

TEST_F(HostResolverManagerTest, StartWithinCallback) {}

TEST_F(HostResolverManagerTest, StartWithinEvictionCallback) {}

// Test where we start a new request within an eviction callback that itself
// evicts the first evictor.
TEST_F(HostResolverManagerTest, StartWithinEvictionCallback_DoubleEviction) {}

TEST_F(HostResolverManagerTest, StartWithinEvictionCallback_SameRequest) {}

TEST_F(HostResolverManagerTest, BypassCache) {}

void HostResolverManagerTest::FlushCacheOnIPAddressChangeTest(bool is_async) {}

// Test that IP address changes flush the cache but initial DNS config reads
// do not.
TEST_F(HostResolverManagerTest, FlushCacheOnIPAddressChangeAsync) {}
TEST_F(HostResolverManagerTest, FlushCacheOnIPAddressChangeSync) {}

void HostResolverManagerTest::AbortOnIPAddressChangedTest(bool is_async) {}

// Test that IP address changes send ERR_NETWORK_CHANGED to pending requests.
TEST_F(HostResolverManagerTest, AbortOnIPAddressChangedAsync) {}
TEST_F(HostResolverManagerTest, AbortOnIPAddressChangedSync) {}

// Obey pool constraints after IP address has changed.
TEST_F(HostResolverManagerTest, ObeyPoolConstraintsAfterIPAddressChange) {}

void HostResolverManagerTest::AbortOnlyExistingRequestsOnIPAddressChangeTest(
    bool is_async) {}
// Tests that a new Request made from the callback of a previously aborted one
// will not be aborted.
TEST_F(HostResolverManagerTest,
       AbortOnlyExistingRequestsOnIPAddressChangeAsync) {}
TEST_F(HostResolverManagerTest,
       AbortOnlyExistingRequestsOnIPAddressChangeSync) {}

// Tests that when the maximum threads is set to 1, requests are dequeued
// in order of priority.
TEST_F(HostResolverManagerTest, HigherPriorityRequestsStartedFirst) {}

void HostResolverManagerTest::ChangePriorityTest(bool is_async) {}

// Test that changing a job's priority affects the dequeueing order.
TEST_F(HostResolverManagerTest, ChangePriorityAsync) {}

TEST_F(HostResolverManagerTest, ChangePrioritySync) {}

// Try cancelling a job which has not started yet.
TEST_F(HostResolverManagerTest, CancelPendingRequest) {}

// Test that when too many requests are enqueued, old ones start to be aborted.
TEST_F(HostResolverManagerTest, QueueOverflow) {}

// Tests that jobs can self-evict by setting the max queue to 0.
TEST_F(HostResolverManagerTest, QueueOverflow_SelfEvict) {}

// Make sure that the dns query type parameter is respected when raw IPs are
// passed in.
TEST_F(HostResolverManagerTest, AddressFamilyWithRawIPs) {}

TEST_F(HostResolverManagerTest, LocalOnly_FromCache) {}

TEST_F(HostResolverManagerTest, LocalOnly_StaleEntry) {}

void HostResolverManagerTest::LocalOnlyFromIpTest(bool is_async) {}

TEST_F(HostResolverManagerTest, LocalOnly_FromIpAsync) {}

TEST_F(HostResolverManagerTest, LocalOnly_FromIpSync) {}

TEST_F(HostResolverManagerTest, LocalOnly_InvalidName) {}

TEST_F(HostResolverManagerTest, LocalOnly_InvalidLocalhost) {}

TEST_F(HostResolverManagerTest, StaleAllowed) {}

TEST_F(HostResolverManagerTest, StaleAllowed_NonLocal) {}

void HostResolverManagerTest::StaleAllowedFromIpTest(bool is_async) {}

TEST_F(HostResolverManagerTest, StaleAllowed_FromIpAsync) {}

TEST_F(HostResolverManagerTest, StaleAllowed_FromIpSync) {}

// TODO(mgersh): add a test case for errors with positive TTL after
// https://crbug.com/115051 is fixed.

// Test the retry attempts simulating host resolver proc that takes too long.
TEST_F(HostResolverManagerTest, MultipleAttempts) {}

// Regression test for https://crbug.com/976948.
//
// Tests that when the maximum number of retries is set to
// |HostResolver::ManagerOptions::kDefaultRetryAttempts| the
// number of retries used is 4 rather than something higher.
TEST_F(HostResolverManagerTest, DefaultMaxRetryAttempts) {}

// If a host resolves to a list that includes 127.0.53.53, this is treated as
// an error. 127.0.53.53 is a localhost address, however it has been given a
// special significance by ICANN to help surface name collision resulting from
// the new gTLDs.
TEST_F(HostResolverManagerTest, NameCollisionIcann) {}

TEST_F(HostResolverManagerTest, StartIPv6ReachabilityCheck) {}

TEST_F(HostResolverManagerTest, IncludeCanonicalName) {}

TEST_F(HostResolverManagerTest, FixupCanonicalName) {}

TEST_F(HostResolverManagerTest, IncludeCanonicalNameButNotReceived) {}

// If `ResolveHostParameters::include_canonical_name` is set, canonical name
// should be returned exactly as received from the system resolver, without any
// attempt to do URL hostname canonicalization on it.
TEST_F(HostResolverManagerTest, IncludeCanonicalNameSkipsUrlCanonicalization) {}

TEST_F(HostResolverManagerTest, LoopbackOnly) {}

TEST_F(HostResolverManagerTest, IsSpeculative) {}

TEST_F(HostResolverManagerTest, AvoidMulticastResolutionParameter) {}

#if BUILDFLAG(ENABLE_MDNS)
const uint8_t kMdnsResponseA[] =;

const uint8_t kMdnsResponseA2[] =;

const uint8_t kMdnsResponseA2Goodbye[] =;

const uint8_t kMdnsResponseAAAA[] =;

// An MDNS response indicating that the responder owns the hostname, but the
// specific requested type (AAAA) does not exist because the responder only has
// A addresses.
const uint8_t kMdnsResponseNsec[] =;

const uint8_t kMdnsResponseTxt[] =;

const uint8_t kMdnsResponsePtr[] =;

const uint8_t kMdnsResponsePtrRoot[] =;

const uint8_t kMdnsResponseSrv[] =;

const uint8_t kMdnsResponseSrvUnrestricted[] =;

const uint8_t kMdnsResponseSrvUnrestrictedResult[] =;

TEST_F(HostResolverManagerTest, Mdns) {}

TEST_F(HostResolverManagerTest, Mdns_AaaaOnly) {}

TEST_F(HostResolverManagerTest, Mdns_Txt) {}

TEST_F(HostResolverManagerTest, Mdns_Ptr) {}

TEST_F(HostResolverManagerTest, Mdns_Srv) {}

// Test that we are able to create multicast DNS requests that contain
// characters not permitted in the DNS spec such as spaces and parenthesis.
TEST_F(HostResolverManagerTest, Mdns_Srv_Unrestricted) {}

// Test that we are able to create multicast DNS requests that contain
// characters not permitted in the DNS spec such as spaces and parenthesis.
TEST_F(HostResolverManagerTest, Mdns_Srv_Result_Unrestricted) {}

// Test multicast DNS handling of NSEC responses (used for explicit negative
// response).
TEST_F(HostResolverManagerTest, Mdns_Nsec) {}

TEST_F(HostResolverManagerTest, Mdns_NoResponse) {}

TEST_F(HostResolverManagerTest, Mdns_WrongType) {}

// Test for a request for both A and AAAA results where results only exist for
// one type.
TEST_F(HostResolverManagerTest, Mdns_PartialResults) {}

TEST_F(HostResolverManagerTest, Mdns_Cancel) {}

// Test for a two-transaction query where the first fails to start. The second
// should be cancelled.
TEST_F(HostResolverManagerTest, Mdns_PartialFailure) {}

TEST_F(HostResolverManagerTest, Mdns_ListenFailure) {}

// Implementation of HostResolver::MdnsListenerDelegate that records all
// received results in maps.
class TestMdnsListenerDelegate : public HostResolver::MdnsListener::Delegate {};

TEST_F(HostResolverManagerTest, MdnsListener) {}

TEST_F(HostResolverManagerTest, MdnsListener_StartListenFailure) {}

// Test that removal notifications are sent on natural expiration of MDNS
// records.
TEST_F(HostResolverManagerTest, MdnsListener_Expiration) {}

TEST_F(HostResolverManagerTest, MdnsListener_Txt) {}

TEST_F(HostResolverManagerTest, MdnsListener_Ptr) {}

TEST_F(HostResolverManagerTest, MdnsListener_Srv) {}

// Ensure query types we are not listening for do not affect MdnsListener.
TEST_F(HostResolverManagerTest, MdnsListener_NonListeningTypes) {}

TEST_F(HostResolverManagerTest, MdnsListener_RootDomain) {}
#endif  // BUILDFLAG(ENABLE_MDNS)

DnsConfig CreateUpgradableDnsConfig() {}

// Check that entries are written to the cache with the right NAK.
TEST_F(HostResolverManagerTest, NetworkAnonymizationKeyWriteToHostCache) {}

// Check that entries are read to the cache with the right NAK.
TEST_F(HostResolverManagerTest, NetworkAnonymizationKeyReadFromHostCache) {}

// Test that two requests made with different NetworkAnonymizationKeys are not
// merged if network state partitioning is enabled.
TEST_F(HostResolverManagerTest, NetworkAnonymizationKeyTwoRequestsAtOnce) {}

// Test that two otherwise-identical requests with different ResolveContexts are
// not merged.
TEST_F(HostResolverManagerTest, ContextsNotMerged) {}

// HostResolverManagerDnsTest ==================================================

HostResolverManagerDnsTest::HostResolverManagerDnsTest(
    base::test::TaskEnvironment::TimeSource time_source)
    :{}

HostResolverManagerDnsTest::~HostResolverManagerDnsTest() = default;

void HostResolverManagerDnsTest::DestroyResolver() {}

void HostResolverManagerDnsTest::SetDnsClient(
    std::unique_ptr<DnsClient> dns_client) {}

void HostResolverManagerDnsTest::TearDown() {}

HostResolver::ManagerOptions HostResolverManagerDnsTest::DefaultOptions() {}

void HostResolverManagerDnsTest::CreateResolverWithOptionsAndParams(
    HostResolver::ManagerOptions options,
    const HostResolverSystemTask::Params& params,
    bool ipv6_reachable,
    bool is_async,
    bool ipv4_reachable) {}

void HostResolverManagerDnsTest::UseMockDnsClient(const DnsConfig& config,
                                                  MockDnsClientRuleList rules) {}

// static
MockDnsClientRuleList HostResolverManagerDnsTest::CreateDefaultDnsRules() {}

// static
void HostResolverManagerDnsTest::AddDnsRule(
    MockDnsClientRuleList* rules,
    const std::string& prefix,
    uint16_t qtype,
    MockDnsClientRule::ResultType result_type,
    bool delay) {}

// static
void HostResolverManagerDnsTest::AddDnsRule(MockDnsClientRuleList* rules,
                                            const std::string& prefix,
                                            uint16_t qtype,
                                            const IPAddress& result_ip,
                                            bool delay) {}

// static
void HostResolverManagerDnsTest::AddDnsRule(MockDnsClientRuleList* rules,
                                            const std::string& prefix,
                                            uint16_t qtype,
                                            IPAddress result_ip,
                                            std::string cannonname,
                                            bool delay) {}

// static
void HostResolverManagerDnsTest::AddDnsRule(MockDnsClientRuleList* rules,

                                            const std::string& prefix,
                                            uint16_t qtype,
                                            DnsResponse dns_test_response,
                                            bool delay) {}

// static
void HostResolverManagerDnsTest::AddSecureDnsRule(
    MockDnsClientRuleList* rules,
    const std::string& prefix,
    uint16_t qtype,
    MockDnsClientRule::ResultType result_type,
    bool delay) {}

void HostResolverManagerDnsTest::ChangeDnsConfig(const DnsConfig& config) {}

void HostResolverManagerDnsTest::InvalidateDnsConfig() {}

void HostResolverManagerDnsTest::SetInitialDnsConfig(const DnsConfig& config) {}

void HostResolverManagerDnsTest::TriggerInsecureFailureCondition() {}

TEST_F(HostResolverManagerDnsTest, FlushCacheOnDnsConfigChange) {}

TEST_F(HostResolverManagerDnsTest, DisableAndEnableInsecureDnsClient) {}

TEST_F(HostResolverManagerDnsTest,
       UseHostResolverSystemTaskWhenPrivateDnsActive) {}

// RFC 6761 localhost names should always resolve to loopback.
TEST_F(HostResolverManagerDnsTest, LocalhostLookup) {}

// RFC 6761 localhost names should always resolve to loopback, even if a HOSTS
// file is active.
TEST_F(HostResolverManagerDnsTest, LocalhostLookupWithHosts) {}

// Test successful and fallback resolutions in HostResolverManager::DnsTask.
TEST_F(HostResolverManagerDnsTest, DnsTask) {}

TEST_F(HostResolverManagerDnsTest, DnsTaskWithScheme) {}

// Test successful and failing resolutions in HostResolverManager::DnsTask when
// fallback to HostResolverSystemTask is disabled.
TEST_F(HostResolverManagerDnsTest, NoFallbackToHostResolverSystemTask) {}

// Test behavior of OnDnsTaskFailure when Job is aborted.
TEST_F(HostResolverManagerDnsTest, OnDnsTaskFailureAbortedJob) {}

// Fallback to proc allowed with ANY source.
TEST_F(HostResolverManagerDnsTest, FallbackBySource_Any) {}

// Fallback to proc not allowed with DNS source.
TEST_F(HostResolverManagerDnsTest, FallbackBySource_Dns) {}

// Fallback to proc on DnsClient change allowed with ANY source.
TEST_F(HostResolverManagerDnsTest, FallbackOnAbortBySource_Any) {}

// Fallback to system on DnsClient change not allowed with DNS source.
TEST_F(HostResolverManagerDnsTest, FallbackOnAbortBySource_Dns) {}

// Insecure DnsClient change shouldn't affect secure DnsTasks.
TEST_F(HostResolverManagerDnsTest,
       DisableInsecureDnsClient_SecureDnsTasksUnaffected) {}

TEST_F(HostResolverManagerDnsTest, DnsTaskUnspec) {}

TEST_F(HostResolverManagerDnsTest, NameCollisionIcann) {}

TEST_F(HostResolverManagerDnsTest, ServeFromHosts) {}

TEST_F(HostResolverManagerDnsTest,
       SkipHostsWithUpcomingHostResolverSystemTask) {}

// Test that hosts ending in ".local" or ".local." are resolved using the system
// resolver.
TEST_F(HostResolverManagerDnsTest, BypassDnsTask) {}

#if BUILDFLAG(ENABLE_MDNS)
// Test that non-address queries for hosts ending in ".local" are resolved using
// the MDNS resolver.
TEST_F(HostResolverManagerDnsTest, BypassDnsToMdnsWithNonAddress) {}
#endif  // BUILDFLAG(ENABLE_MDNS)

// Test that DNS task is always used when explicitly requested as the source,
// even with a case that would normally bypass it eg hosts ending in ".local".
TEST_F(HostResolverManagerDnsTest, DnsNotBypassedWhenDnsSource) {}

TEST_F(HostResolverManagerDnsTest, SystemOnlyBypassesDnsTask) {}

TEST_F(HostResolverManagerDnsTest,
       DisableInsecureDnsClientOnPersistentFailure) {}

TEST_F(HostResolverManagerDnsTest, SecureDnsWorksAfterInsecureFailure) {}

TEST_F(HostResolverManagerDnsTest, DontDisableDnsClientOnSporadicFailure) {}

void HostResolverManagerDnsTest::Ipv6UnreachableTest(bool is_async) {}

TEST_F(HostResolverManagerDnsTest, Ipv6UnreachableAsync) {}

TEST_F(HostResolverManagerDnsTest, Ipv6UnreachableSync) {}

void HostResolverManagerDnsTest::Ipv6UnreachableInvalidConfigTest(
    bool is_async) {}
// Without a valid DnsConfig, assume IPv6 is needed and ignore prober.
TEST_F(HostResolverManagerDnsTest, Ipv6Unreachable_InvalidConfigAsync) {}

TEST_F(HostResolverManagerDnsTest, Ipv6Unreachable_InvalidConfigSync) {}

TEST_F(HostResolverManagerDnsTest, Ipv6Unreachable_UseLocalIpv6) {}

// Confirm that resolving "localhost" is unrestricted even if there are no
// global IPv6 address. See SystemHostResolverCall for rationale.
// Test both the DnsClient and system host resolver paths.
TEST_F(HostResolverManagerDnsTest, Ipv6Unreachable_Localhost) {}

// Test that IPv6 being unreachable only causes the AAAA query to be disabled,
// rather than querying only for A. See https://crbug.com/1272055.
TEST_F(HostResolverManagerDnsTest, Ipv6UnreachableOnlyDisablesAAAAQuery) {}

TEST_F(HostResolverManagerDnsTest, SeparateJobsBySecureDnsMode) {}

// Cancel a request with a single DNS transaction active.
TEST_F(HostResolverManagerDnsTest, CancelWithOneTransactionActive) {}

// Cancel a request with a single DNS transaction active and another pending.
TEST_F(HostResolverManagerDnsTest, CancelWithOneTransactionActiveOnePending) {}

// Cancel a request with two DNS transactions active.
TEST_F(HostResolverManagerDnsTest, CancelWithTwoTransactionsActive) {}

// Delete a resolver with some active requests and some queued requests.
TEST_F(HostResolverManagerDnsTest, DeleteWithActiveTransactions) {}

TEST_F(HostResolverManagerDnsTest, DeleteWithSecureTransactions) {}

TEST_F(HostResolverManagerDnsTest, DeleteWithCompletedRequests) {}

// Cancel a request with only the IPv6 transaction active.
TEST_F(HostResolverManagerDnsTest, CancelWithIPv6TransactionActive) {}

// Cancel a request with only the IPv4 transaction pending.
TEST_F(HostResolverManagerDnsTest, CancelWithIPv4TransactionPending) {}

TEST_F(HostResolverManagerDnsTest, CancelWithAutomaticModeTransactionPending) {}

// Test cases where AAAA completes first.
TEST_F(HostResolverManagerDnsTest, AAAACompletesFirst) {}

TEST_F(HostResolverManagerDnsTest, AAAACompletesFirst_AutomaticMode) {}

TEST_F(HostResolverManagerDnsTest, SecureDnsMode_Automatic) {}

TEST_F(HostResolverManagerDnsTest, SecureDnsMode_Automatic_SecureCache) {}

TEST_F(HostResolverManagerDnsTest, SecureDnsMode_Automatic_InsecureCache) {}

TEST_F(HostResolverManagerDnsTest, SecureDnsMode_Automatic_Downgrade) {}

TEST_F(HostResolverManagerDnsTest, SecureDnsMode_Automatic_Unavailable) {}

TEST_F(HostResolverManagerDnsTest, SecureDnsMode_Automatic_Unavailable_Fail) {}

// Test that DoH server availability is respected per-context.
TEST_F(HostResolverManagerDnsTest,
       SecureDnsMode_Automatic_UnavailableByContext) {}

TEST_F(HostResolverManagerDnsTest, SecureDnsMode_Automatic_Stale) {}

TEST_F(HostResolverManagerDnsTest,
       SecureDnsMode_Automatic_InsecureAsyncDisabled) {}

TEST_F(HostResolverManagerDnsTest, SecureDnsMode_Automatic_DotActive) {}

TEST_F(HostResolverManagerDnsTest, SecureDnsMode_Secure) {}

TEST_F(HostResolverManagerDnsTest, SecureDnsMode_Secure_InsecureAsyncDisabled) {}

TEST_F(HostResolverManagerDnsTest, SecureDnsMode_Secure_Local_CacheMiss) {}

TEST_F(HostResolverManagerDnsTest, SecureDnsMode_Secure_Local_CacheHit) {}

// On an IPv6 network, if we get A results and the AAAA response is SERVFAIL, we
// fail the whole DnsTask rather than proceeding with just the A results. In
// SECURE mode, fallback to the system resolver is disabled. See
// https://crbug.com/1292324.
TEST_F(HostResolverManagerDnsTest,
       SecureDnsModeIsSecureAndAAAAServfailCausesFailDespiteAResults) {}

// Test for a resolve with a transaction that takes longer than usual to
// complete. With the typical behavior of using fast timeouts, this is expected
// to timeout and fallback to the system resolver.
TEST_F(HostResolverManagerDnsTest, SlowResolve) {}

// Test for a resolve with a secure transaction that takes longer than usual to
// complete. In automatic mode, because fallback to insecure is available, the
// secure transaction is expected to quickly timeout and fallback to insecure.
TEST_F(HostResolverManagerDnsTest, SlowSecureResolve_AutomaticMode) {}

// Test for a resolve with a secure transaction that takes longer than usual to
// complete. In secure mode, because no fallback is available, this is expected
// to wait longer before timeout and complete successfully.
TEST_F(HostResolverManagerDnsTest, SlowSecureResolve_SecureMode) {}

// Test the case where only a single transaction slot is available.
TEST_F(HostResolverManagerDnsTest, SerialResolver) {}

// Test the case where subsequent transactions are handled on transaction
// completion when only part of a multi-transaction request could be initially
// started.
TEST_F(HostResolverManagerDnsTest, AAAAStartsAfterOtherJobFinishes) {}

// Tests the case that a Job with a single transaction receives an empty address
// list, triggering fallback to HostResolverSystemTask.
TEST_F(HostResolverManagerDnsTest, IPv4EmptyFallback) {}

// Tests the case that a Job with two transactions receives two empty address
// lists, triggering fallback to HostResolverSystemTask.
TEST_F(HostResolverManagerDnsTest, UnspecEmptyFallback) {}

// Tests getting a new invalid DnsConfig while there are active DnsTasks.
TEST_F(HostResolverManagerDnsTest, InvalidDnsConfigWithPendingRequests) {}

// Test that initial DNS config read signals do not abort pending requests
// when using DnsClient.
TEST_F(HostResolverManagerDnsTest, DontAbortOnInitialDNSConfigRead) {}

// Tests the case that the insecure part of the DnsClient is automatically
// disabled due to failures while there are active DnsTasks.
TEST_F(HostResolverManagerDnsTest,
       AutomaticallyDisableInsecureDnsClientWithPendingRequests) {}

// Tests a call to SetDnsClient while there are active DnsTasks.
TEST_F(HostResolverManagerDnsTest,
       ManuallyDisableDnsClientWithPendingRequests) {}

// When explicitly requesting source=DNS, no fallback allowed, so doing so with
// DnsClient disabled should result in an error.
TEST_F(HostResolverManagerDnsTest, DnsCallsWithDisabledDnsClient) {}

TEST_F(HostResolverManagerDnsTest,
       DnsCallsWithDisabledDnsClient_DisabledAtConstruction) {}

// Same as DnsClient disabled, requests with source=DNS and no usable DnsConfig
// should result in an error.
TEST_F(HostResolverManagerDnsTest, DnsCallsWithNoDnsConfig) {}

TEST_F(HostResolverManagerDnsTest, NoCheckIpv6OnWifi) {}

TEST_F(HostResolverManagerDnsTest, NotFoundTtl) {}

TEST_F(HostResolverManagerDnsTest, NotFoundTtlWithHostCache) {}

TEST_F(HostResolverManagerDnsTest, CachedError) {}

TEST_F(HostResolverManagerDnsTest, CachedError_AutomaticMode) {}

TEST_F(HostResolverManagerDnsTest, CachedError_SecureMode) {}

// Test that if one of A and AAAA completes successfully and the other fails,
// the failure is not cached.
TEST_F(HostResolverManagerDnsTest, TtlNotSharedBetweenQtypes) {}

TEST_F(HostResolverManagerDnsTest, CanonicalName) {}

TEST_F(HostResolverManagerDnsTest, CanonicalName_PreferV6) {}

TEST_F(HostResolverManagerDnsTest, CanonicalName_V4Only) {}

// Test that responses containing CNAME records but no address results are fine
// and treated as normal NODATA responses.
TEST_F(HostResolverManagerDnsTest, CanonicalNameWithoutResults) {}

// Test that if the response for one address family contains CNAME records but
// no address results, it doesn't interfere with the other address family
// receiving address results (as would happen if such a response were
// incorrectly treated as a malformed response error).
TEST_F(HostResolverManagerDnsTest, CanonicalNameWithResultsForOnlyOneFamily) {}

// Test that without specifying source, a request that would otherwise be
// handled by DNS is sent to the system resolver if cannonname is requested.
TEST_F(HostResolverManagerDnsTest, CanonicalNameForcesProc) {}

TEST_F(HostResolverManagerDnsTest, DnsAliases) {}

TEST_F(HostResolverManagerDnsTest, DnsAliasesAreFixedUp) {}

TEST_F(HostResolverManagerDnsTest, RejectsLocalhostAlias) {}

TEST_F(HostResolverManagerDnsTest, NoAdditionalDnsAliases) {}

TEST_F(HostResolverManagerTest, ResolveLocalHostname) {}

TEST_F(HostResolverManagerDnsTest, AddDnsOverHttpsServerAfterConfig) {}

TEST_F(HostResolverManagerDnsTest, AddDnsOverHttpsServerBeforeConfig) {}

TEST_F(HostResolverManagerDnsTest, AddDnsOverHttpsServerBeforeClient) {}

TEST_F(HostResolverManagerDnsTest, AddDnsOverHttpsServerAndThenRemove) {}

// Basic test socket factory that allows creation of UDP sockets, but those
// sockets are mocks with no data and are not expected to be usable.
class AlwaysFailSocketFactory : public MockClientSocketFactory {};

class TestDnsObserver : public NetworkChangeNotifier::DNSObserver {};

// Built-in client and config overrides not available on iOS.
#if !BUILDFLAG(IS_IOS)
TEST_F(HostResolverManagerDnsTest, SetDnsConfigOverrides) {}

TEST_F(HostResolverManagerDnsTest,
       SetDnsConfigOverrides_OverrideEverythingCreation) {}

TEST_F(HostResolverManagerDnsTest, SetDnsConfigOverrides_PartialOverride) {}

// Test that overridden configs are reapplied over a changed underlying system
// config.
TEST_F(HostResolverManagerDnsTest, SetDnsConfigOverrides_NewConfig) {}

TEST_F(HostResolverManagerDnsTest, SetDnsConfigOverrides_ClearOverrides) {}

TEST_F(HostResolverManagerDnsTest, SetDnsConfigOverrides_NoChange) {}

// No effect or notifications expected using partial overrides without a base
// system config.
TEST_F(HostResolverManagerDnsTest, NoBaseConfig_PartialOverrides) {}

TEST_F(HostResolverManagerDnsTest, NoBaseConfig_OverridesEverything) {}

TEST_F(HostResolverManagerDnsTest, DohMapping) {}

TEST_F(HostResolverManagerDnsTest, DohMappingDisabled) {}

TEST_F(HostResolverManagerDnsTest, DohMappingModeIneligibleForUpgrade) {}

TEST_F(HostResolverManagerDnsTest,
       DohMappingUnhandledOptionsIneligibleForUpgrade) {}

TEST_F(HostResolverManagerDnsTest, DohMappingWithExclusion) {}

TEST_F(HostResolverManagerDnsTest, DohMappingIgnoredIfTemplateSpecified) {}

TEST_F(HostResolverManagerDnsTest,
       DohMappingUnhandledOptionsAndTemplateSpecified) {}

TEST_F(HostResolverManagerDnsTest, DohMappingWithAutomaticDot) {}

TEST_F(HostResolverManagerDnsTest, DohMappingWithStrictDot) {}

#endif  // !BUILDFLAG(IS_IOS)

TEST_F(HostResolverManagerDnsTest, FlushCacheOnDnsConfigOverridesChange) {}

TEST_F(HostResolverManagerDnsTest,
       FlushContextSessionDataOnDnsConfigOverridesChange) {}

// Test that even when using config overrides, a change to the base system
// config cancels pending requests.
TEST_F(HostResolverManagerDnsTest, CancellationOnBaseConfigChange) {}

// Test that when all configuration is overridden, system configuration changes
// do not cancel requests.
TEST_F(HostResolverManagerDnsTest,
       CancellationOnBaseConfigChange_OverridesEverything) {}

// Test that in-progress queries are cancelled on applying new DNS config
// overrides, same as receiving a new DnsConfig from the system.
TEST_F(HostResolverManagerDnsTest, CancelQueriesOnSettingOverrides) {}

// Queries should not be cancelled if equal overrides are set.
TEST_F(HostResolverManagerDnsTest,
       CancelQueriesOnSettingOverrides_SameOverrides) {}

// Test that in-progress queries are cancelled on clearing DNS config overrides,
// same as receiving a new DnsConfig from the system.
TEST_F(HostResolverManagerDnsTest, CancelQueriesOnClearingOverrides) {}

// Queries should not be cancelled on clearing overrides if there were not any
// overrides.
TEST_F(HostResolverManagerDnsTest,
       CancelQueriesOnClearingOverrides_NoOverrides) {}

TEST_F(HostResolverManagerDnsTest,
       FlushContextSessionDataOnSystemConfigChange) {}

TEST_F(HostResolverManagerDnsTest, TxtQuery) {}

TEST_F(HostResolverManagerDnsTest, TxtQueryRejectsIpLiteral) {}

// Test that TXT records can be extracted from a response that also contains
// unrecognized record types.
TEST_F(HostResolverManagerDnsTest, TxtQuery_MixedWithUnrecognizedType) {}

TEST_F(HostResolverManagerDnsTest, TxtQuery_InvalidConfig) {}

TEST_F(HostResolverManagerDnsTest, TxtQuery_NonexistentDomain) {}

TEST_F(HostResolverManagerDnsTest, TxtQuery_Failure) {}

TEST_F(HostResolverManagerDnsTest, TxtQuery_Timeout) {}

TEST_F(HostResolverManagerDnsTest, TxtQuery_Empty) {}

TEST_F(HostResolverManagerDnsTest, TxtQuery_Malformed) {}

TEST_F(HostResolverManagerDnsTest, TxtQuery_MismatchedName) {}

TEST_F(HostResolverManagerDnsTest, TxtQuery_WrongType) {}

TEST_F(HostResolverManagerDnsTest,
       TxtInsecureQueryDisallowedWhenAdditionalTypesDisallowed) {}

// Same as TxtQuery except we specify DNS HostResolverSource instead of relying
// on automatic determination.  Expect same results since DNS should be what we
// automatically determine, but some slightly different logic paths are
// involved.
TEST_F(HostResolverManagerDnsTest, TxtDnsQuery) {}

TEST_F(HostResolverManagerDnsTest, PtrQuery) {}

TEST_F(HostResolverManagerDnsTest, PtrQueryRejectsIpLiteral) {}

TEST_F(HostResolverManagerDnsTest, PtrQueryHandlesReverseIpLookup) {}

TEST_F(HostResolverManagerDnsTest, PtrQuery_NonexistentDomain) {}

TEST_F(HostResolverManagerDnsTest, PtrQuery_Failure) {}

TEST_F(HostResolverManagerDnsTest, PtrQuery_Timeout) {}

TEST_F(HostResolverManagerDnsTest, PtrQuery_Empty) {}

TEST_F(HostResolverManagerDnsTest, PtrQuery_Malformed) {}

TEST_F(HostResolverManagerDnsTest, PtrQuery_MismatchedName) {}

TEST_F(HostResolverManagerDnsTest, PtrQuery_WrongType) {}

TEST_F(HostResolverManagerDnsTest,
       PtrInsecureQueryDisallowedWhenAdditionalTypesDisallowed) {}

// Same as PtrQuery except we specify DNS HostResolverSource instead of relying
// on automatic determination.  Expect same results since DNS should be what we
// automatically determine, but some slightly different logic paths are
// involved.
TEST_F(HostResolverManagerDnsTest, PtrDnsQuery) {}

TEST_F(HostResolverManagerDnsTest, SrvQuery) {}

TEST_F(HostResolverManagerDnsTest, SrvQueryRejectsIpLiteral) {}

// 0-weight services are allowed. Ensure that we can handle such records,
// especially the case where all entries have weight 0.
TEST_F(HostResolverManagerDnsTest, SrvQuery_ZeroWeight) {}

TEST_F(HostResolverManagerDnsTest, SrvQuery_NonexistentDomain) {}

TEST_F(HostResolverManagerDnsTest, SrvQuery_Failure) {}

TEST_F(HostResolverManagerDnsTest, SrvQuery_Timeout) {}

TEST_F(HostResolverManagerDnsTest, SrvQuery_Empty) {}

TEST_F(HostResolverManagerDnsTest, SrvQuery_Malformed) {}

TEST_F(HostResolverManagerDnsTest, SrvQuery_MismatchedName) {}

TEST_F(HostResolverManagerDnsTest, SrvQuery_WrongType) {}

TEST_F(HostResolverManagerDnsTest,
       SrvInsecureQueryDisallowedWhenAdditionalTypesDisallowed) {}

// Same as SrvQuery except we specify DNS HostResolverSource instead of relying
// on automatic determination.  Expect same results since DNS should be what we
// automatically determine, but some slightly different logic paths are
// involved.
TEST_F(HostResolverManagerDnsTest, SrvDnsQuery) {}

TEST_F(HostResolverManagerDnsTest, HttpsQuery) {}

TEST_F(HostResolverManagerDnsTest, HttpsQueryForNonStandardPort) {}

TEST_F(HostResolverManagerDnsTest, HttpsQueryForHttpUpgrade) {}

// Test that HTTPS requests for an http host with port 443 will result in a
// transaction hostname without prepending port and scheme, despite not having
// the default port for an http host. The request host ("http://https.test:443")
// will be mapped to the equivalent https upgrade host
// ("https://https.test:443") at port 443, which is the default port for an
// https host, so port and scheme are not prefixed.
TEST_F(HostResolverManagerDnsTest, HttpsQueryForHttpUpgradeFromHttpsPort) {}

TEST_F(HostResolverManagerDnsTest,
       HttpsQueryForHttpUpgradeWithNonStandardPort) {}

TEST_F(HostResolverManagerDnsTest, HttpsInAddressQuery) {}

TEST_F(HostResolverManagerDnsTest, HttpsInAddressQueryWithNonstandardPort) {}

TEST_F(HostResolverManagerDnsTest,
       HttpsInAddressQueryWithNonstandardPortAndDefaultServiceName) {}

TEST_F(HostResolverManagerDnsTest, HttpsInAddressQueryWithAlpnAndEch) {}

TEST_F(HostResolverManagerDnsTest, HttpsInAddressQueryWithNonMatchingPort) {}

TEST_F(HostResolverManagerDnsTest, HttpsInAddressQueryWithMatchingPort) {}

TEST_F(HostResolverManagerDnsTest, HttpsInAddressQueryWithoutAddresses) {}

TEST_F(HostResolverManagerDnsTest, HttpsQueriedInAddressQueryButNoResults) {}

// For a response where DnsTransaction can at least do its basic parsing and
// return a DnsResponse object to HostResolverManager.  See
// `UnparsableHttpsInAddressRequestIsFatal` for a response so unparsable that
// DnsTransaction couldn't do that.
TEST_F(HostResolverManagerDnsTest,
       MalformedHttpsInResponseInAddressRequestIsIgnored) {}

TEST_F(HostResolverManagerDnsTest,
       MalformedHttpsRdataInAddressRequestIsIgnored) {}

TEST_F(HostResolverManagerDnsTest,
       FailedHttpsInAddressRequestIsFatalWhenFeatureEnabled) {}

TEST_F(HostResolverManagerDnsTest,
       FailedHttpsInAddressRequestIgnoredWhenFeatureDisabled) {}

TEST_F(
    HostResolverManagerDnsTest,
    FailedHttpsInAddressRequestAfterAddressFailureIsFatalWhenFeatureEnabled) {}

TEST_F(
    HostResolverManagerDnsTest,
    FailedHttpsInAddressRequestAfterAddressFailureIgnoredWhenFeatureDisabled) {}

TEST_F(HostResolverManagerDnsTest, TimeoutHttpsInAddressRequestIsFatal) {}

TEST_F(HostResolverManagerDnsTest, ServfailHttpsInAddressRequestIsFatal) {}

// For a response so malformed that DnsTransaction can't do its basic parsing to
// determine an RCODE and return a DnsResponse object to HostResolverManager.
// Essentially equivalent to a network error. See
// `MalformedHttpsInResponseInAddressRequestIsFatal` for a malformed response
// that can at least send a DnsResponse to HostResolverManager.
TEST_F(HostResolverManagerDnsTest, UnparsableHttpsInAddressRequestIsFatal) {}

TEST_F(HostResolverManagerDnsTest, RefusedHttpsInAddressRequestIsIgnored) {}

TEST_F(HostResolverManagerDnsTest, HttpsInAddressQueryForWssScheme) {}

TEST_F(HostResolverManagerDnsTest, NoHttpsInAddressQueryWithoutScheme) {}

TEST_F(HostResolverManagerDnsTest, NoHttpsInAddressQueryForNonHttpScheme) {}

TEST_F(HostResolverManagerDnsTest,
       HttpsInAddressQueryForHttpSchemeWhenUpgradeEnabled) {}

TEST_F(HostResolverManagerDnsTest,
       HttpsInAddressQueryForHttpSchemeWhenUpgradeEnabledWithAliasRecord) {}

TEST_F(
    HostResolverManagerDnsTest,
    HttpsInAddressQueryForHttpSchemeWhenUpgradeEnabledWithIncompatibleServiceRecord) {}

// Even if no addresses are received for a request, finding an HTTPS record
// should still force an HTTP->HTTPS upgrade.
TEST_F(HostResolverManagerDnsTest,
       HttpsInAddressQueryForHttpSchemeWhenUpgradeEnabledWithoutAddresses) {}

TEST_F(HostResolverManagerDnsTest, HttpsInSecureModeAddressQuery) {}

TEST_F(HostResolverManagerDnsTest, HttpsInSecureModeAddressQueryForHttpScheme) {}

TEST_F(HostResolverManagerDnsTest, HttpsInInsecureAddressQuery) {}

TEST_F(HostResolverManagerDnsTest, HttpsInInsecureAddressQueryForHttpScheme) {}

TEST_F(HostResolverManagerDnsTest, FailedHttpsInInsecureAddressRequestIgnored) {}

TEST_F(HostResolverManagerDnsTest,
       TimeoutHttpsInInsecureAddressRequestIgnored) {}

TEST_F(HostResolverManagerDnsTest,
       ServfailHttpsInInsecureAddressRequestIgnored) {}

TEST_F(HostResolverManagerDnsTest,
       UnparsableHttpsInInsecureAddressRequestIgnored) {}

// Test that when additional HTTPS timeout Feature params are disabled, the task
// does not timeout until the transactions themselves timeout.
TEST_F(HostResolverManagerDnsTest,
       HttpsInAddressQueryWaitsWithoutAdditionalTimeout) {}

TEST_F(HostResolverManagerDnsTest,
       HttpsInSecureAddressQueryWithOnlyMinTimeout) {}

TEST_F(HostResolverManagerDnsTest,
       HttpsInSecureAddressQueryWithOnlyMaxTimeout) {}

TEST_F(HostResolverManagerDnsTest,
       HttpsInSecureAddressQueryWithRelativeTimeout) {}

TEST_F(HostResolverManagerDnsTest,
       HttpsInSecureAddressQueryWithMaxTimeoutFirst) {}

TEST_F(HostResolverManagerDnsTest,
       HttpsInAddressQueryWithRelativeTimeoutFirst) {}

TEST_F(HostResolverManagerDnsTest,
       HttpsInAddressQueryWithRelativeTimeoutShorterThanMinTimeout) {}

TEST_F(HostResolverManagerDnsTest,
       HttpsInInsecureAddressQueryWithOnlyMinTimeout) {}

TEST_F(HostResolverManagerDnsTest,
       HttpsInInsecureAddressQueryWithOnlyMaxTimeout) {}

TEST_F(HostResolverManagerDnsTest,
       HttpsInInsecureAddressQueryWithRelativeTimeout) {}

// Test that HTTPS timeouts are not used when fatal for the request.
TEST_F(HostResolverManagerDnsTest,
       HttpsInAddressQueryWaitsWithoutTimeoutIfFatal) {}

// Test that HTTPS timeouts are always respected for insecure requests.
TEST_F(HostResolverManagerDnsTest,
       HttpsInAddressQueryAlwaysRespectsTimeoutsForInsecure) {}

TEST_F(HostResolverManagerDnsTest, UnsolicitedHttps) {}

TEST_F(HostResolverManagerDnsTest, DohProbeRequest) {}

TEST_F(HostResolverManagerDnsTest, DohProbeRequest_BeforeConfig) {}

TEST_F(HostResolverManagerDnsTest, DohProbeRequest_InvalidateConfig) {}

TEST_F(HostResolverManagerDnsTest, DohProbeRequest_RestartOnConnectionChange) {}

TEST_F(HostResolverManagerDnsTest, MultipleDohProbeRequests) {}

// Test that a newly-registered ResolveContext is immediately usable with a DNS
// configuration loaded before the context registration.
TEST_F(HostResolverManagerDnsTest,
       NewlyRegisteredContext_ConfigBeforeRegistration) {}

// Test interaction with a ResolveContext registered before a DNS config is
// ready.
TEST_F(HostResolverManagerDnsTest,
       NewlyRegisteredContext_NoConfigAtRegistration) {}

// `HostResolver::ResolveHostParameters::avoid_multicast_resolution` not
// currently supported to do anything except with the system resolver. So with
// DnsTask, expect it to be ignored.
TEST_F(HostResolverManagerDnsTest, AvoidMulticastIgnoredWithDnsTask) {}

class MockAddressSorter : public AddressSorter {};

TEST_F(HostResolverManagerDnsTest, ResultsAreSorted) {}

TEST_F(HostResolverManagerDnsTest, ResultsAreSortedWithHostCache) {}

TEST_F(HostResolverManagerDnsTest, Ipv4OnlyResultsAreSorted) {}

TEST_F(HostResolverManagerDnsTest, Ipv4OnlyResultsNotSortedWithHostCache) {}

TEST_F(HostResolverManagerDnsTest, EmptyResultsNotSorted) {}

TEST_F(HostResolverManagerDnsTest, EmptyResultsNotSortedWithHostCache) {}

// Test for when AddressSorter removes all results.
TEST_F(HostResolverManagerDnsTest, ResultsSortedAsUnreachable) {}

// Test for when AddressSorter removes all results.
TEST_F(HostResolverManagerDnsTest, ResultsSortedAsUnreachableWithHostCache) {}

TEST_F(HostResolverManagerDnsTest, SortFailure) {}

// Test for if a transaction sort fails after another transaction has already
// succeeded.
TEST_F(HostResolverManagerDnsTest, PartialSortFailure) {}

TEST_F(HostResolverManagerDnsTest, SortFailureWithHostCache) {}

TEST_F(HostResolverManagerDnsTest, HostResolverCacheContainsTransactions) {}

TEST_F(HostResolverManagerDnsTest, HostResolverCacheContainsAliasChains) {}

TEST_F(HostResolverManagerDnsTest,
       HostResolverCacheContainsAliasChainsWithErrors) {}

TEST_F(HostResolverManagerDnsTest,
       HostResolverCacheContainsAliasChainsWithNoTtlErrors) {}

TEST_F(HostResolverManagerDnsTest, NetworkErrorsNotSavedInHostCache) {}

// Test for if a DNS transaction fails with network error after another
// transaction has already succeeded.
TEST_F(HostResolverManagerDnsTest, PartialNetworkErrorsNotSavedInHostCache) {}

TEST_F(HostResolverManagerDnsTest, NetworkErrorsNotSavedInHostResolverCache) {}

// Test for if a DNS transaction fails with network error after another
// transaction has already succeeded.
TEST_F(HostResolverManagerDnsTest,
       PartialNetworkErrorsNotSavedInHostResolverCache) {}

TEST_F(HostResolverManagerDnsTest, MalformedResponsesNotSavedInHostCache) {}

// Test for if a DNS transaction fails with a malformed response after another
// transaction has already succeeded.
TEST_F(HostResolverManagerDnsTest,
       PartialMalformedResponsesNotSavedInHostCache) {}TEST_F(HostResolverManagerDnsTest,
       MalformedResponsesNotSavedInHostResolverCache) {}TEST_F(HostResolverManagerDnsTest,
       PartialMalformedResponsesNotSavedInHostResolverCache) {}TEST_F(HostResolverManagerDnsTest, HttpToHttpsUpgradeSavedInHostCache) {}TEST_F(HostResolverManagerDnsTest,
       HttpToHttpsUpgradeAfterAddressesSavedInHostResolverCache) {}class HostResolverManagerBootstrapTest : public HostResolverManagerDnsTest {}std::vector<IPAddress> IPAddresses(const std::vector<IPEndPoint>& endpoints) {}std::vector<IPAddress> IPAddresses(const AddressList& addresses) {}MATCHER_P(AddressesMatch, expected, "Matches addresses between AddressLists") {}TEST_F(HostResolverManagerBootstrapTest, BlankSlate) {}TEST_F(HostResolverManagerBootstrapTest, InsecureCacheEntry) {}TEST_F(HostResolverManagerBootstrapTest, SecureCacheEntry) {}TEST_F(HostResolverManagerBootstrapTest, OnlyBootstrap) {}TEST_F(HostResolverManagerBootstrapTest, BootstrapAndInsecureCache) {}TEST_F(HostResolverManagerBootstrapTest, BootstrapAndSecureCacheEntry) {}TEST_F(HostResolverManagerBootstrapTest, BlankSlateFailure) {}TEST_F(HostResolverManagerBootstrapTest, BootstrapFollowupFailure) {}TEST_F(HostResolverManagerBootstrapTest, ContextClose) {}TEST_F(HostResolverManagerBootstrapTest, BootstrapAfterFollowup) {}TEST_F(HostResolverManagerBootstrapTest, BootstrapFollowupFailureTwice) {}TEST_F(HostResolverManagerBootstrapTest, OnlyBootstrapTwice) {}void HostResolverManagerTest::IPv4AddressLiteralInIPv6OnlyNetworkTest(
    bool is_async) {}TEST_F(HostResolverManagerTest, IPv4AddressLiteralInIPv6OnlyNetworkAsync) {}TEST_F(HostResolverManagerTest, IPv4AddressLiteralInIPv6OnlyNetworkSync) {}void HostResolverManagerTest::IPv4AddressLiteralInIPv6OnlyNetworkPort443Test(
    bool is_async) {}TEST_F(HostResolverManagerTest,
       IPv4AddressLiteralInIPv6OnlyNetworkPort443Async) {}TEST_F(HostResolverManagerTest,
       IPv4AddressLiteralInIPv6OnlyNetworkPort443Sync) {}void HostResolverManagerTest::IPv4AddressLiteralInIPv6OnlyNetworkNoDns64Test(
    bool is_async) {}TEST_F(HostResolverManagerTest,
       IPv4AddressLiteralInIPv6OnlyNetworkNoDns64Async) {}TEST_F(HostResolverManagerTest,
       IPv4AddressLiteralInIPv6OnlyNetworkNoDns64Sync) {}void HostResolverManagerTest::IPv4AddressLiteralInIPv6OnlyNetworkBadAddressTest(
    bool is_async) {}TEST_F(HostResolverManagerTest,
       IPv4AddressLiteralInIPv6OnlyNetworkBadAddressAsync) {}TEST_F(HostResolverManagerTest,
       IPv4AddressLiteralInIPv6OnlyNetworkBadAddressSync) {}