chromium/chrome/browser/net/dns_probe_test_util.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 "chrome/browser/net/dns_probe_test_util.h"

#include <stdint.h>
#include <utility>

#include "chrome/browser/net/dns_probe_runner.h"
#include "net/base/ip_address.h"
#include "net/base/network_anonymization_key.h"
#include "net/dns/public/resolve_error_info.h"
#include "services/network/public/mojom/clear_data_filter.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace chrome_browser_net {

namespace {

static std::optional<net::AddressList> AddressListForResponse(
    FakeHostResolver::Response response) {}

}  // namespace

FakeHostResolver::SingleResult::SingleResult(
    int32_t result,
    net::ResolveErrorInfo resolve_error_info,
    Response response)
    :{}

FakeHostResolver::FakeHostResolver(
    mojo::PendingReceiver<network::mojom::HostResolver> resolver_receiver,
    std::vector<SingleResult> result_list)
    :{}

FakeHostResolver::FakeHostResolver(
    mojo::PendingReceiver<network::mojom::HostResolver> resolver_receiver,
    int32_t result,
    net::ResolveErrorInfo resolve_error_info,
    Response response)
    :{}

FakeHostResolver::~FakeHostResolver() = default;

void FakeHostResolver::ResolveHost(
    network::mojom::HostResolverHostPtr host,
    const net::NetworkAnonymizationKey& network_anonymization_key,
    network::mojom::ResolveHostParametersPtr optional_parameters,
    mojo::PendingRemote<network::mojom::ResolveHostClient>
        pending_response_client) {}

void FakeHostResolver::MdnsListen(
    const net::HostPortPair& host,
    net::DnsQueryType query_type,
    mojo::PendingRemote<network::mojom::MdnsListenClient> response_client,
    MdnsListenCallback callback) {}

HangingHostResolver::HangingHostResolver(
    mojo::PendingReceiver<network::mojom::HostResolver> resolver_receiver)
    :{}

HangingHostResolver::~HangingHostResolver() = default;

void HangingHostResolver::ResolveHost(
    network::mojom::HostResolverHostPtr host,
    const net::NetworkAnonymizationKey& network_anonymization_key,
    network::mojom::ResolveHostParametersPtr optional_parameters,
    mojo::PendingRemote<network::mojom::ResolveHostClient> response_client) {}

void HangingHostResolver::MdnsListen(
    const net::HostPortPair& host,
    net::DnsQueryType query_type,
    mojo::PendingRemote<network::mojom::MdnsListenClient> response_client,
    MdnsListenCallback callback) {}

FakeHostResolverNetworkContext::FakeHostResolverNetworkContext(
    std::vector<FakeHostResolver::SingleResult> current_config_result_list,
    std::vector<FakeHostResolver::SingleResult> google_config_result_list)
    :{}

FakeHostResolverNetworkContext::~FakeHostResolverNetworkContext() = default;

void FakeHostResolverNetworkContext::CreateHostResolver(
    const std::optional<net::DnsConfigOverrides>& config_overrides,
    mojo::PendingReceiver<network::mojom::HostResolver> receiver) {}

HangingHostResolverNetworkContext::HangingHostResolverNetworkContext() =
    default;
HangingHostResolverNetworkContext::~HangingHostResolverNetworkContext() =
    default;

void HangingHostResolverNetworkContext::CreateHostResolver(
    const std::optional<net::DnsConfigOverrides>& config_overrides,
    mojo::PendingReceiver<network::mojom::HostResolver> receiver) {}

FakeDnsConfigChangeManager::FakeDnsConfigChangeManager(
    mojo::PendingReceiver<network::mojom::DnsConfigChangeManager> receiver)
    :{}

FakeDnsConfigChangeManager::~FakeDnsConfigChangeManager() = default;

void FakeDnsConfigChangeManager::RequestNotifications(
    mojo::PendingRemote<network::mojom::DnsConfigChangeManagerClient> client) {}

void FakeDnsConfigChangeManager::SimulateDnsConfigChange() {}

}  // namespace chrome_browser_net