diff options
author | erikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-06 23:00:19 +0000 |
---|---|---|
committer | erikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-06 23:00:19 +0000 |
commit | cd07257813fae874442864f65092ed882c37959c (patch) | |
tree | 10c85606fd7b274eb0121e7847b7460c8159c05e /net/base/run_all_unittests.cc | |
parent | a4c488fc126b3c02ef8031dea6651d68d96a5e4b (diff) | |
download | chromium_src-cd07257813fae874442864f65092ed882c37959c.zip chromium_src-cd07257813fae874442864f65092ed882c37959c.tar.gz chromium_src-cd07257813fae874442864f65092ed882c37959c.tar.bz2 |
Work around a Purify bug by moving initialization from constructor to Inititialize().
BUG=7467
Review URL: http://codereview.chromium.org/24006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9354 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/run_all_unittests.cc')
-rw-r--r-- | net/base/run_all_unittests.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/base/run_all_unittests.cc b/net/base/run_all_unittests.cc index 15741e4..6c60e2d 100644 --- a/net/base/run_all_unittests.cc +++ b/net/base/run_all_unittests.cc @@ -34,19 +34,19 @@ class NetTestSuite : public TestSuite { public: - 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"); + NetTestSuite(int argc, char** argv) : TestSuite(argc, argv) { } virtual void Initialize() { TestSuite::Initialize(); + host_mapper_ = new net::RuleBasedHostMapper(); + scoped_host_mapper_.Init(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"); + message_loop_.reset(new MessageLoopForIO()); } |