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

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

Issue 332313003: Add Finch experiment for selectively bypassing proxies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: callback design (not yet done) Created 6 years, 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "net/http/http_network_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include <math.h> // ceil 7 #include <math.h> // ceil
8 #include <stdarg.h> 8 #include <stdarg.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 9114 matching lines...) Expand 10 before | Expand all | Expand 10 after
9125 session_deps_.next_protos = SpdyNextProtos(); 9125 session_deps_.next_protos = SpdyNextProtos();
9126 9126
9127 ProxyConfig proxy_config; 9127 ProxyConfig proxy_config;
9128 proxy_config.set_auto_detect(true); 9128 proxy_config.set_auto_detect(true);
9129 proxy_config.set_pac_url(GURL("http://fooproxyurl")); 9129 proxy_config.set_pac_url(GURL("http://fooproxyurl"));
9130 9130
9131 CapturingProxyResolver* capturing_proxy_resolver = 9131 CapturingProxyResolver* capturing_proxy_resolver =
9132 new CapturingProxyResolver(); 9132 new CapturingProxyResolver();
9133 session_deps_.proxy_service.reset(new ProxyService( 9133 session_deps_.proxy_service.reset(new ProxyService(
9134 new ProxyConfigServiceFixed(proxy_config), capturing_proxy_resolver, 9134 new ProxyConfigServiceFixed(proxy_config), capturing_proxy_resolver,
9135 NULL)); 9135 NULL, NULL));
9136 CapturingNetLog net_log; 9136 CapturingNetLog net_log;
9137 session_deps_.net_log = &net_log; 9137 session_deps_.net_log = &net_log;
9138 9138
9139 HttpRequestInfo request; 9139 HttpRequestInfo request;
9140 request.method = "GET"; 9140 request.method = "GET";
9141 request.url = GURL("http://www.google.com/"); 9141 request.url = GURL("http://www.google.com/");
9142 request.load_flags = 0; 9142 request.load_flags = 0;
9143 9143
9144 std::string alternate_protocol_http_header = 9144 std::string alternate_protocol_http_header =
9145 GetAlternateProtocolHttpHeader(); 9145 GetAlternateProtocolHttpHeader();
(...skipping 4035 matching lines...) Expand 10 before | Expand all | Expand 10 after
13181 EXPECT_EQ(ERR_IO_PENDING, rv); 13181 EXPECT_EQ(ERR_IO_PENDING, rv);
13182 13182
13183 rv = callback.WaitForResult(); 13183 rv = callback.WaitForResult();
13184 EXPECT_EQ(ERR_CONNECTION_RESET, rv); 13184 EXPECT_EQ(ERR_CONNECTION_RESET, rv);
13185 13185
13186 const HttpResponseInfo* response = trans->GetResponseInfo(); 13186 const HttpResponseInfo* response = trans->GetResponseInfo();
13187 EXPECT_TRUE(response == NULL); 13187 EXPECT_TRUE(response == NULL);
13188 } 13188 }
13189 13189
13190 } // namespace net 13190 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698