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

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

Issue 113043: Fix gconf for the linux proxy config service.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 7 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 | « chrome/browser/net/chrome_url_request_context.cc ('k') | net/proxy/proxy_config.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/completion_callback.h" 9 #include "net/base/completion_callback.h"
10 #include "net/base/ssl_client_socket.h" 10 #include "net/base/ssl_client_socket.h"
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 MockClientSocketFactory mock_socket_factory; 340 MockClientSocketFactory mock_socket_factory;
341 341
342 // Create a proxy service which fails on all requests (falls back to direct). 342 // Create a proxy service which fails on all requests (falls back to direct).
343 ProxyService* CreateNullProxyService() { 343 ProxyService* CreateNullProxyService() {
344 return ProxyService::CreateNull(); 344 return ProxyService::CreateNull();
345 } 345 }
346 346
347 ProxyService* CreateFixedProxyService(const std::string& proxy) { 347 ProxyService* CreateFixedProxyService(const std::string& proxy) {
348 net::ProxyConfig proxy_config; 348 net::ProxyConfig proxy_config;
349 proxy_config.proxy_rules.ParseFromString(proxy); 349 proxy_config.proxy_rules.ParseFromString(proxy);
350 return ProxyService::Create(&proxy_config); 350 return ProxyService::CreateFixed(proxy_config);
351 } 351 }
352 352
353 353
354 HttpNetworkSession* CreateSession(ProxyService* proxy_service) { 354 HttpNetworkSession* CreateSession(ProxyService* proxy_service) {
355 return new HttpNetworkSession(proxy_service); 355 return new HttpNetworkSession(proxy_service);
356 } 356 }
357 357
358 class HttpNetworkTransactionTest : public PlatformTest { 358 class HttpNetworkTransactionTest : public PlatformTest {
359 public: 359 public:
360 virtual void SetUp() { 360 virtual void SetUp() {
(...skipping 3051 matching lines...) Expand 10 before | Expand all | Expand 10 after
3412 TestCompletionCallback callback; 3412 TestCompletionCallback callback;
3413 3413
3414 int rv = trans->Start(&request, &callback); 3414 int rv = trans->Start(&request, &callback);
3415 EXPECT_EQ(ERR_IO_PENDING, rv); 3415 EXPECT_EQ(ERR_IO_PENDING, rv);
3416 3416
3417 rv = callback.WaitForResult(); 3417 rv = callback.WaitForResult();
3418 EXPECT_EQ(OK, rv); 3418 EXPECT_EQ(OK, rv);
3419 } 3419 }
3420 3420
3421 } // namespace net 3421 } // namespace net
OLDNEW
« no previous file with comments | « chrome/browser/net/chrome_url_request_context.cc ('k') | net/proxy/proxy_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698