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/base/run_all_unittests.cc | |
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/base/run_all_unittests.cc')
-rw-r--r-- | net/base/run_all_unittests.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/net/base/run_all_unittests.cc b/net/base/run_all_unittests.cc index 71dada9..15741e4 100644 --- a/net/base/run_all_unittests.cc +++ b/net/base/run_all_unittests.cc @@ -28,16 +28,20 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "base/message_loop.h" +#include "base/ref_counted.h" #include "base/test_suite.h" -#include "net/base/scoped_host_mapper.h" +#include "net/base/host_resolver_unittest.h" class NetTestSuite : public TestSuite { public: - NetTestSuite(int argc, char** argv) : TestSuite(argc, argv) { + NetTestSuite(int argc, char** argv) + : TestSuite(argc, argv), + host_mapper_(new net::RuleBasedHostMapper()), + scoped_host_mapper_(host_mapper_.get()) { // In case any attempts are made to resolve host names, force them all to // be mapped to localhost. This prevents DNS queries from being sent in // the process of running these unit tests. - host_mapper_.AddRule("*", "127.0.0.1"); + host_mapper_->AddRule("*", "127.0.0.1"); } virtual void Initialize() { @@ -56,7 +60,8 @@ class NetTestSuite : public TestSuite { private: scoped_ptr<MessageLoop> message_loop_; - net::ScopedHostMapper host_mapper_; + scoped_refptr<net::RuleBasedHostMapper> host_mapper_; + net::ScopedHostMapper scoped_host_mapper_; }; int main(int argc, char** argv) { |