diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-29 11:32:26 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-29 11:32:26 +0000 |
commit | 471822cad3c7f41002c28fd9a32243abe1bbb2a2 (patch) | |
tree | 68e4dc44d8d31cce4aaf683ef116db7743daa460 /net/http | |
parent | 1aaf6e1ff14d0f627986f26ec68e87a8ea4e98fc (diff) | |
download | chromium_src-471822cad3c7f41002c28fd9a32243abe1bbb2a2.zip chromium_src-471822cad3c7f41002c28fd9a32243abe1bbb2a2.tar.gz chromium_src-471822cad3c7f41002c28fd9a32243abe1bbb2a2.tar.bz2 |
Add more unit tests for net/base/host_resolver.
BUG=6661
Review URL: http://codereview.chromium.org/18775
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8872 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r-- | net/http/http_network_layer_unittest.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/net/http/http_network_layer_unittest.cc b/net/http/http_network_layer_unittest.cc index aae4ed5..eae1815 100644 --- a/net/http/http_network_layer_unittest.cc +++ b/net/http/http_network_layer_unittest.cc @@ -2,7 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "net/base/scoped_host_mapper.h" +#include "base/ref_counted.h" +#include "net/base/host_resolver_unittest.h" #include "net/http/http_network_layer.h" #include "net/http/http_transaction_unittest.h" #include "net/proxy/proxy_service.h" @@ -11,13 +12,17 @@ class HttpNetworkLayerTest : public PlatformTest { public: - HttpNetworkLayerTest() { + HttpNetworkLayerTest() + : host_mapper_(new net::RuleBasedHostMapper()), + scoped_host_mapper_(host_mapper_.get()) { // TODO(darin): kill this exception once we have a way to test out the // HttpNetworkLayer class using loopback connections. - host_mapper_.AddRule("www.google.com", "www.google.com"); + host_mapper_->AddRule("www.google.com", "www.google.com"); } + private: - net::ScopedHostMapper host_mapper_; + scoped_refptr<net::RuleBasedHostMapper> host_mapper_; + net::ScopedHostMapper scoped_host_mapper_; }; TEST_F(HttpNetworkLayerTest, CreateAndDestroy) { |