diff options
author | isherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-05 00:45:22 +0000 |
---|---|---|
committer | isherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-05 00:45:22 +0000 |
commit | c4566249d7c9ebffc4a0f4c53eb7bdf086a7773c (patch) | |
tree | 439132f4c12b9285197657b4c86b2bc69ea35af5 /net/base/mock_host_resolver.h | |
parent | 7e412003eabecd5987073bbe0496bd500ad4ab39 (diff) | |
download | chromium_src-c4566249d7c9ebffc4a0f4c53eb7bdf086a7773c.zip chromium_src-c4566249d7c9ebffc4a0f4c53eb7bdf086a7773c.tar.gz chromium_src-c4566249d7c9ebffc4a0f4c53eb7bdf086a7773c.tar.bz2 |
Automatically fail external DNS queries in tests, but don't abort the test.
Test code should not go out of its way to disable external DNS queries, so we should not cause tests to fail when such queries are made. However, to avoid external depenencies in tests, we simulate failure for the queries themselves.
See http://codereview.chromium.org/3396022/show for some backstory.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3535003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61456 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/mock_host_resolver.h')
-rw-r--r-- | net/base/mock_host_resolver.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/base/mock_host_resolver.h b/net/base/mock_host_resolver.h index 3c273a7..e5b8694 100644 --- a/net/base/mock_host_resolver.h +++ b/net/base/mock_host_resolver.h @@ -16,9 +16,9 @@ namespace net { class RuleBasedHostResolverProc; -// In most cases, it is important that unit tests avoid making actual DNS -// queries since the resulting tests can be flaky, especially if the network is -// unreliable for some reason. To simplify writing tests that avoid making +// In most cases, it is important that unit tests avoid relying on making actual +// DNS queries since the resulting tests can be flaky, especially if the network +// is unreliable for some reason. To simplify writing tests that avoid making // actual DNS queries, pass a MockHostResolver as the HostResolver dependency. // The socket addresses returned can be configured using the // RuleBasedHostResolverProc: |