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

Side by Side Diff: net/http/http_network_transaction_unittest.cc

Issue 21158: Fix a logic error in the handling the response to an HTTP... (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/http/http_network_transaction.cc ('k') | net/http/http_response_headers.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <math.h> // ceil 5 #include <math.h> // ceil
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "net/base/client_socket_factory.h" 8 #include "net/base/client_socket_factory.h"
9 #include "net/base/test_completion_callback.h" 9 #include "net/base/test_completion_callback.h"
10 #include "net/base/upload_data.h" 10 #include "net/base/upload_data.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 MockClientSocketFactory mock_socket_factory; 200 MockClientSocketFactory mock_socket_factory;
201 201
202 // Create a proxy service which fails on all requests (falls back to direct). 202 // Create a proxy service which fails on all requests (falls back to direct).
203 net::ProxyService* CreateNullProxyService() { 203 net::ProxyService* CreateNullProxyService() {
204 return net::ProxyService::CreateNull(); 204 return net::ProxyService::CreateNull();
205 } 205 }
206 206
207 net::ProxyService* CreateFixedProxyService(const std::string& proxy) { 207 net::ProxyService* CreateFixedProxyService(const std::string& proxy) {
208 net::ProxyInfo proxy_info; 208 net::ProxyInfo proxy_info;
209 proxy_info.UseNamedProxy(proxy); 209 proxy_info.UseNamedProxy(proxy);
210 return new net::ProxyService( 210 return net::ProxyService::Create(&proxy_info);
211 new net::ProxyConfigServiceFixed(proxy_info), NULL);
212 } 211 }
213 212
214 213
215 net::HttpNetworkSession* CreateSession(net::ProxyService* proxy_service) { 214 net::HttpNetworkSession* CreateSession(net::ProxyService* proxy_service) {
216 return new net::HttpNetworkSession(proxy_service); 215 return new net::HttpNetworkSession(proxy_service);
217 } 216 }
218 217
219 class HttpNetworkTransactionTest : public PlatformTest { 218 class HttpNetworkTransactionTest : public PlatformTest {
220 public: 219 public:
221 virtual void SetUp() { 220 virtual void SetUp() {
(...skipping 1297 matching lines...) Expand 10 before | Expand all | Expand 10 after
1519 1518
1520 rv = callback2.WaitForResult(); 1519 rv = callback2.WaitForResult();
1521 EXPECT_EQ(net::OK, rv); 1520 EXPECT_EQ(net::OK, rv);
1522 1521
1523 response = trans->GetResponseInfo(); 1522 response = trans->GetResponseInfo();
1524 EXPECT_FALSE(response == NULL); 1523 EXPECT_FALSE(response == NULL);
1525 EXPECT_TRUE(response->auth_challenge.get() == NULL); 1524 EXPECT_TRUE(response->auth_challenge.get() == NULL);
1526 EXPECT_EQ(100, response->headers->GetContentLength()); 1525 EXPECT_EQ(100, response->headers->GetContentLength());
1527 } 1526 }
1528 } 1527 }
OLDNEW
« no previous file with comments | « net/http/http_network_transaction.cc ('k') | net/http/http_response_headers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698