diff options
author | ttuttle@chromium.org <ttuttle@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-13 02:21:59 +0000 |
---|---|---|
committer | ttuttle@chromium.org <ttuttle@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-13 02:21:59 +0000 |
commit | 4817d12607a1e0a0cdc6eaa510aad4a07f529dd3 (patch) | |
tree | 78116742ab6769a42131e1e1aaf31376ac9bccd4 /net/dns/dns_test_util.cc | |
parent | 023f5e1d03c90150b1f47e952e5a0159ac5597bc (diff) | |
download | chromium_src-4817d12607a1e0a0cdc6eaa510aad4a07f529dd3.zip chromium_src-4817d12607a1e0a0cdc6eaa510aad4a07f529dd3.tar.gz chromium_src-4817d12607a1e0a0cdc6eaa510aad4a07f529dd3.tar.bz2 |
DnsProbeJob: Differentiate network and DNS errors
DnsTransaction uses net_error to return errors returned by the remote DNS
server as well as local errors encountered trying to talk to the server (like
timeouts). Make note of which net errors mean that we received a response
from the DNS server, and mark those as "failing" instead of "unreachable".
Also, add another behavior to mock DNS transactions so we can test cases where
the server is unreachable.
BUG=156415
TEST=updated DnsProbeJobTest with a new case
Review URL: https://chromiumcodereview.appspot.com/11530018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172780 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/dns/dns_test_util.cc')
-rw-r--r-- | net/dns/dns_test_util.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/dns/dns_test_util.cc b/net/dns/dns_test_util.cc index 8663370..237646b 100644 --- a/net/dns/dns_test_util.cc +++ b/net/dns/dns_test_util.cc @@ -126,6 +126,9 @@ class MockTransaction : public DnsTransaction, case MockDnsClientRule::FAIL_ASYNC: callback_.Run(this, ERR_NAME_NOT_RESOLVED, NULL); break; + case MockDnsClientRule::TIMEOUT: + callback_.Run(this, ERR_DNS_TIMED_OUT, NULL); + break; default: NOTREACHED(); break; |