chromium/services/proxy_resolver/mock_proxy_host_resolver.h

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SERVICES_PROXY_RESOLVER_MOCK_PROXY_HOST_RESOLVER_H_
#define SERVICES_PROXY_RESOLVER_MOCK_PROXY_HOST_RESOLVER_H_

#include <map>
#include <memory>
#include <string>
#include <tuple>
#include <utility>
#include <vector>

#include "base/functional/callback_forward.h"
#include "net/base/ip_address.h"
#include "net/proxy_resolution/proxy_resolve_dns_operation.h"
#include "services/proxy_resolver/proxy_host_resolver.h"

namespace net {
class NetworkAnonymizationKey;
}  // namespace net

namespace proxy_resolver {

// Mock of ProxyHostResolver that resolves by default to 127.0.0.1, except for
// hostnames with more specific results set using SetError() or SetResult().
// Also allows returning failure for all results with FailAll().
class MockProxyHostResolver : public ProxyHostResolver {};

// Mock of ProxyHostResolver that always hangs until cancelled.
class HangingProxyHostResolver : public ProxyHostResolver {};

}  // namespace proxy_resolver

#endif  // SERVICES_PROXY_RESOLVER_MOCK_PROXY_HOST_RESOLVER_H_