Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Unified Diff: net/base/run_all_unittests.cc

Issue 24006: Work around a Purify bug by making an object used by NetTestSuite stack alloc... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/host_resolver_unittest.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/run_all_unittests.cc
===================================================================
--- net/base/run_all_unittests.cc (revision 9313)
+++ net/base/run_all_unittests.cc (working copy)
@@ -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()) {
+ 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");
- }
- virtual void Initialize() {
- TestSuite::Initialize();
-
message_loop_.reset(new MessageLoopForIO());
}
« no previous file with comments | « net/base/host_resolver_unittest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698