diff options
author | darin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-24 06:31:34 +0000 |
---|---|---|
committer | darin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-24 06:31:34 +0000 |
commit | 025517044b4be3ab45efc2f383e5a7b830aa7281 (patch) | |
tree | b43566625f0702e8fa44590a7a82b3c41b56b5cc /net/http | |
parent | 8943d1c09b155984790847a849e816ffe695a91a (diff) | |
download | chromium_src-025517044b4be3ab45efc2f383e5a7b830aa7281.zip chromium_src-025517044b4be3ab45efc2f383e5a7b830aa7281.tar.gz chromium_src-025517044b4be3ab45efc2f383e5a7b830aa7281.tar.bz2 |
Add support for mock DNS queries. This allows us to eliminate
flaky DNS queries from the unit tests.
Note: some unit tests still connect to www.google.com. My plan
is to resolve those in a subsequent CL.
R=wtc
BUG=2635
Review URL: http://codereview.chromium.org/4022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2545 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r-- | net/http/http_network_layer_unittest.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/http/http_network_layer_unittest.cc b/net/http/http_network_layer_unittest.cc index ab59edc..316c91d 100644 --- a/net/http/http_network_layer_unittest.cc +++ b/net/http/http_network_layer_unittest.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "net/base/host_resolver_unittest.h" #include "net/http/http_network_layer.h" #include "net/http/http_transaction_unittest.h" #include "testing/gtest/include/gtest/gtest.h" @@ -9,6 +10,14 @@ namespace { class HttpNetworkLayerTest : public testing::Test { + public: + HttpNetworkLayerTest() { + // 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"); + } + private: + net::ScopedHostMapper host_mapper_; }; } // namespace |