| Index: net/dns/dns_test_util.h
|
| diff --git a/net/dns/dns_test_util.h b/net/dns/dns_test_util.h
|
| index 8d8c0a6d4b4b2bd24e02139b2b35c8ad24aad331..e247be0c378e081d4ea589f7dfc35ce26d075dea 100644
|
| --- a/net/dns/dns_test_util.h
|
| +++ b/net/dns/dns_test_util.h
|
| @@ -7,6 +7,8 @@
|
| #pragma once
|
|
|
| #include "base/basictypes.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "net/dns/dns_config_service.h"
|
| #include "net/dns/dns_protocol.h"
|
|
|
| namespace net {
|
| @@ -156,6 +158,25 @@ static const char* const kT3IpAddresses[] = {
|
| static const char kT3CanonName[] = "www.l.google.com";
|
| static const int kT3TTL = 0x00000015;
|
|
|
| +class DnsClient;
|
| +// Creates mock DnsClient for testing HostResolverImpl.
|
| +scoped_ptr<DnsClient> CreateMockDnsClient(const DnsConfig& config);
|
| +
|
| +class MockDnsConfigService : public DnsConfigService {
|
| + public:
|
| + virtual ~MockDnsConfigService() {}
|
| +
|
| + // Expose the protected methods for tests.
|
| + void ChangeConfig(const DnsConfig& config) {
|
| + DnsConfigService::OnConfigRead(config);
|
| + }
|
| +
|
| + void ChangeHosts(const DnsHosts& hosts) {
|
| + DnsConfigService::OnHostsRead(hosts);
|
| + }
|
| +};
|
| +
|
| +
|
| } // namespace net
|
|
|
| #endif // NET_DNS_DNS_TEST_UTIL_H_
|
|
|