summaryrefslogtreecommitdiffstats
path: root/net/dns
diff options
context:
space:
mode:
authorttuttle@chromium.org <ttuttle@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-20 01:21:05 +0000
committerttuttle@chromium.org <ttuttle@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-20 01:21:05 +0000
commit6068836c67c25e74716619cc0d4642734c711956 (patch)
treed5abed0908578d462b9843dd32d51c0199d23260 /net/dns
parenta0b45c59ed8e89164a7d5d69433cc1667f583131 (diff)
downloadchromium_src-6068836c67c25e74716619cc0d4642734c711956.zip
chromium_src-6068836c67c25e74716619cc0d4642734c711956.tar.gz
chromium_src-6068836c67c25e74716619cc0d4642734c711956.tar.bz2
Create a barebones DNS prober
This will eventually be able to give us some idea whether a DNS configuration is correct (servers respond) and working (responses are valid and useful). (Also, I needed to add a constructor to MockDnsClientRule; I modified HostResolverImplUnittest to use it.) BUG=156415 TEST=DnsProberUnittest TBR=jhawkins@chromium.org Review URL: https://chromiumcodereview.appspot.com/11098062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163119 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/dns')
-rw-r--r--net/dns/dns_test_util.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/dns/dns_test_util.h b/net/dns/dns_test_util.h
index 1d9e067b..5c5019a 100644
--- a/net/dns/dns_test_util.h
+++ b/net/dns/dns_test_util.h
@@ -178,9 +178,14 @@ struct MockDnsClientRule {
OK, // Return a response with loopback address.
};
+ MockDnsClientRule(const std::string& prefix_arg,
+ uint16 qtype_arg,
+ Result result_arg)
+ : result(result_arg), prefix(prefix_arg), qtype(qtype_arg) { }
+
+ Result result;
std::string prefix;
uint16 qtype;
- Result result;
};
typedef std::vector<MockDnsClientRule> MockDnsClientRuleList;