summaryrefslogtreecommitdiffstats
path: root/net/http
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-10 00:54:54 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-10 00:54:54 +0000
commit5c6a17efce0c075f59b7d9b601952f9dcae31483 (patch)
tree083c8165cdba1fbb302c41ab9f9a56de4a7b2735 /net/http
parentf82049964be5e0fb9fe6774fba3e18b99459cdbc (diff)
downloadchromium_src-5c6a17efce0c075f59b7d9b601952f9dcae31483.zip
chromium_src-5c6a17efce0c075f59b7d9b601952f9dcae31483.tar.gz
chromium_src-5c6a17efce0c075f59b7d9b601952f9dcae31483.tar.bz2
Simplify a proxy test.
TEST=none Review URL: http://codereview.chromium.org/119404 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18011 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r--net/http/http_network_transaction_unittest.cc22
1 files changed, 2 insertions, 20 deletions
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc
index a4551e8..852612f 100644
--- a/net/http/http_network_transaction_unittest.cc
+++ b/net/http/http_network_transaction_unittest.cc
@@ -25,20 +25,6 @@
namespace net {
-namespace {
-
-// Config getter that returns a single config.
-class DummyProxyConfigService : public ProxyConfigService {
- public:
- // ProxyConfigService implementation:
- virtual int GetProxyConfig(ProxyConfig* config) {
- config->proxy_rules.ParseFromString("foobar:80");
- return OK;
- }
-};
-
-} // namespace
-
// Create a proxy service which fails on all requests (falls back to direct).
ProxyService* CreateNullProxyService() {
return ProxyService::CreateNull();
@@ -3114,7 +3100,8 @@ TEST_F(HttpNetworkTransactionTest, ReconsiderProxyAfterFailedConnection) {
ScopedHostMapper scoped_host_mapper(host_mapper.get());
host_mapper->AddSimulatedFailure("*");
- SessionDependencies session_deps;
+ SessionDependencies session_deps(
+ CreateFixedProxyService("myproxy:70;foobar:80"));
scoped_ptr<HttpTransaction> trans(
new HttpNetworkTransaction(
CreateSession(&session_deps),
@@ -3129,11 +3116,6 @@ TEST_F(HttpNetworkTransactionTest, ReconsiderProxyAfterFailedConnection) {
int rv = trans->Start(&request, &callback);
EXPECT_EQ(ERR_IO_PENDING, rv);
- // Set another config service so that ReconsiderProxyAfterError will fallback
- // to another proxy config.
- session_deps.proxy_service->ResetConfigService(
- new DummyProxyConfigService());
-
rv = callback.WaitForResult();
EXPECT_EQ(ERR_NAME_NOT_RESOLVED, rv);
}