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

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

Issue 9252029: SPDY - default to SPDY/2.1 protocol in unittests (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync with trunk Created 8 years, 11 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_proxy_client_socket_pool.h" 5 #include "net/http/http_proxy_client_socket_pool.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 if (GetParam() == SPDY) { 169 if (GetParam() == SPDY) {
170 InitializeSpdySsl(); 170 InitializeSpdySsl();
171 } 171 }
172 socket_factory_.AddSSLSocketDataProvider(ssl_data_.get()); 172 socket_factory_.AddSSLSocketDataProvider(ssl_data_.get());
173 } 173 }
174 } 174 }
175 175
176 void InitializeSpdySsl() { 176 void InitializeSpdySsl() {
177 spdy::SpdyFramer::set_enable_compression_default(false); 177 spdy::SpdyFramer::set_enable_compression_default(false);
178 ssl_data_->next_proto_status = SSLClientSocket::kNextProtoNegotiated; 178 ssl_data_->next_proto_status = SSLClientSocket::kNextProtoNegotiated;
179 ssl_data_->next_proto = "spdy/2"; 179 ssl_data_->next_proto = "spdy/2.1";
180 ssl_data_->was_npn_negotiated = true; 180 ssl_data_->was_npn_negotiated = true;
181 ssl_data_->protocol_negotiated = SSLClientSocket::kProtoSPDY2; 181 ssl_data_->protocol_negotiated = SSLClientSocket::kProtoSPDY21;
182 } 182 }
183 183
184 HttpNetworkSession* CreateNetworkSession() { 184 HttpNetworkSession* CreateNetworkSession() {
185 HttpNetworkSession::Params params; 185 HttpNetworkSession::Params params;
186 params.host_resolver = &host_resolver_; 186 params.host_resolver = &host_resolver_;
187 params.cert_verifier = &cert_verifier_; 187 params.cert_verifier = &cert_verifier_;
188 params.proxy_service = proxy_service_.get(); 188 params.proxy_service = proxy_service_.get();
189 params.client_socket_factory = &socket_factory_; 189 params.client_socket_factory = &socket_factory_;
190 params.ssl_config_service = ssl_config_service_; 190 params.ssl_config_service = ssl_config_service_;
191 params.http_auth_handler_factory = http_auth_handler_factory_.get(); 191 params.http_auth_handler_factory = http_auth_handler_factory_.get();
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 // HTTPS or SPDY Proxy CONNECT responses are trustworthy 538 // HTTPS or SPDY Proxy CONNECT responses are trustworthy
539 EXPECT_EQ(ERR_HTTPS_PROXY_TUNNEL_RESPONSE, rv); 539 EXPECT_EQ(ERR_HTTPS_PROXY_TUNNEL_RESPONSE, rv);
540 EXPECT_TRUE(handle_.is_initialized()); 540 EXPECT_TRUE(handle_.is_initialized());
541 EXPECT_TRUE(handle_.socket()); 541 EXPECT_TRUE(handle_.socket());
542 } 542 }
543 } 543 }
544 544
545 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. 545 // It would be nice to also test the timeouts in HttpProxyClientSocketPool.
546 546
547 } // namespace net 547 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_pipelined_host_impl_unittest.cc ('k') | net/http/http_server_properties_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698