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

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

Issue 2089243002: Split enable_alternative_service_with_different_host flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 (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 <cmath> 5 #include <cmath>
6 #include <memory> 6 #include <memory>
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 return os; 101 return os;
102 } 102 }
103 103
104 NextProto protocol; 104 NextProto protocol;
105 SpdyNetworkTransactionTestSSLType ssl_type; 105 SpdyNetworkTransactionTestSSLType ssl_type;
106 bool priority_to_dependency; 106 bool priority_to_dependency;
107 }; 107 };
108 108
109 void UpdateSpdySessionDependencies(SpdyNetworkTransactionTestParams test_params, 109 void UpdateSpdySessionDependencies(SpdyNetworkTransactionTestParams test_params,
110 SpdySessionDependencies* session_deps) { 110 SpdySessionDependencies* session_deps) {
111 session_deps->enable_alternative_service_with_different_host = true;
112 if (test_params.ssl_type == HTTP_SPDY_VIA_ALT_SVC) { 111 if (test_params.ssl_type == HTTP_SPDY_VIA_ALT_SVC) {
113 base::Time expiration = base::Time::Now() + base::TimeDelta::FromDays(1); 112 base::Time expiration = base::Time::Now() + base::TimeDelta::FromDays(1);
114 session_deps->http_server_properties->SetAlternativeService( 113 session_deps->http_server_properties->SetAlternativeService(
115 url::SchemeHostPort("http", "www.example.org", 80), 114 url::SchemeHostPort("http", "www.example.org", 80),
116 AlternativeService(AlternateProtocolFromNextProto(test_params.protocol), 115 AlternativeService(AlternateProtocolFromNextProto(test_params.protocol),
117 "www.example.org", 443), 116 "www.example.org", 443),
118 expiration); 117 expiration);
119 } 118 }
120 session_deps->enable_priority_dependencies = 119 session_deps->enable_priority_dependencies =
121 test_params.priority_to_dependency; 120 test_params.priority_to_dependency;
(...skipping 7135 matching lines...) Expand 10 before | Expand all | Expand 10 after
7257 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { 7256 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) {
7258 std::unique_ptr<SSLSocketDataProvider> ssl_provider( 7257 std::unique_ptr<SSLSocketDataProvider> ssl_provider(
7259 new SSLSocketDataProvider(ASYNC, OK)); 7258 new SSLSocketDataProvider(ASYNC, OK));
7260 // Set to TLS_RSA_WITH_NULL_MD5 7259 // Set to TLS_RSA_WITH_NULL_MD5
7261 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); 7260 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status);
7262 7261
7263 RunTLSUsageCheckTest(std::move(ssl_provider)); 7262 RunTLSUsageCheckTest(std::move(ssl_provider));
7264 } 7263 }
7265 7264
7266 } // namespace net 7265 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698