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

Side by Side Diff: net/spdy/spdy_network_transaction_unittest.cc

Issue 339663010: Add a probability to Alternate-Protocol support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: eliminate static initializer 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_stream_factory.cc ('k') | no next file » | 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) 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 SpdyNetworkTransactionTestSSLType ssl_type; 70 SpdyNetworkTransactionTestSSLType ssl_type;
71 }; 71 };
72 72
73 void UpdateSpdySessionDependencies( 73 void UpdateSpdySessionDependencies(
74 SpdyNetworkTransactionTestParams test_params, 74 SpdyNetworkTransactionTestParams test_params,
75 SpdySessionDependencies* session_deps) { 75 SpdySessionDependencies* session_deps) {
76 switch (test_params.ssl_type) { 76 switch (test_params.ssl_type) {
77 case SPDYNPN: 77 case SPDYNPN:
78 session_deps->http_server_properties.SetAlternateProtocol( 78 session_deps->http_server_properties.SetAlternateProtocol(
79 HostPortPair("www.google.com", 80), 443, 79 HostPortPair("www.google.com", 80), 443,
80 AlternateProtocolFromNextProto(test_params.protocol)); 80 AlternateProtocolFromNextProto(test_params.protocol), 1);
81 session_deps->use_alternate_protocols = true; 81 session_deps->use_alternate_protocols = true;
82 session_deps->next_protos = SpdyNextProtos(); 82 session_deps->next_protos = SpdyNextProtos();
83 break; 83 break;
84 case SPDYNOSSL: 84 case SPDYNOSSL:
85 session_deps->force_spdy_over_ssl = false; 85 session_deps->force_spdy_over_ssl = false;
86 session_deps->force_spdy_always = true; 86 session_deps->force_spdy_always = true;
87 break; 87 break;
88 case SPDYSSL: 88 case SPDYSSL:
89 session_deps->force_spdy_over_ssl = true; 89 session_deps->force_spdy_over_ssl = true;
90 session_deps->force_spdy_always = true; 90 session_deps->force_spdy_always = true;
(...skipping 6471 matching lines...) Expand 10 before | Expand all | Expand 10 after
6562 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { 6562 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) {
6563 scoped_ptr<SSLSocketDataProvider> ssl_provider( 6563 scoped_ptr<SSLSocketDataProvider> ssl_provider(
6564 new SSLSocketDataProvider(ASYNC, OK)); 6564 new SSLSocketDataProvider(ASYNC, OK));
6565 // Set to TLS_RSA_WITH_NULL_MD5 6565 // Set to TLS_RSA_WITH_NULL_MD5
6566 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); 6566 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status);
6567 6567
6568 RunTLSUsageCheckTest(ssl_provider.Pass()); 6568 RunTLSUsageCheckTest(ssl_provider.Pass());
6569 } 6569 }
6570 6570
6571 } // namespace net 6571 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_stream_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698