summaryrefslogtreecommitdiffstats
path: root/net/test
diff options
context:
space:
mode:
authoragayev@chromium.org <agayev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-28 01:56:32 +0000
committeragayev@chromium.org <agayev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-28 01:56:32 +0000
commit076632b6a10f2adaeb8cd2faa6f2b9625fc18479 (patch)
tree8ff6ca0f76f8be2b47bbc70bf223fc6071940092 /net/test
parent4d280fadfff3d038dd4ca07c7de2879a274a5611 (diff)
downloadchromium_src-076632b6a10f2adaeb8cd2faa6f2b9625fc18479.zip
chromium_src-076632b6a10f2adaeb8cd2faa6f2b9625fc18479.tar.gz
chromium_src-076632b6a10f2adaeb8cd2faa6f2b9625fc18479.tar.bz2
HostResolverImpl: don't interpret NULL callback argument as a request to do synchronous resolution.
BUG=90547,60149 TEST=net_unittests --gtest_filter="HostResolverImplTest*" Review URL: http://codereview.chromium.org/7465046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94412 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/test')
-rw-r--r--net/test/test_server.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/test/test_server.cc b/net/test/test_server.cc
index dd36bce..8723215 100644
--- a/net/test/test_server.cc
+++ b/net/test/test_server.cc
@@ -200,7 +200,11 @@ bool TestServer::GetAddressList(AddressList* address_list) const {
HostResolver::kDefaultRetryAttempts,
NULL));
HostResolver::RequestInfo info(host_port_pair_);
- int rv = resolver->Resolve(info, address_list, NULL, NULL, BoundNetLog());
+ TestCompletionCallback callback;
+ int rv = resolver->Resolve(info, address_list, &callback, NULL,
+ BoundNetLog());
+ if (rv == ERR_IO_PENDING)
+ rv = callback.WaitForResult();
if (rv != net::OK) {
LOG(ERROR) << "Failed to resolve hostname: " << host_port_pair_.host();
return false;