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

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

Issue 1878143005: SHP 4: Change AlternativeServiceMap to use SchemeHostPort as the key. No change to Pref data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SHP_3
Patch Set: fix cronet && SpdyNetworkTransactionUnittests Created 4 years, 8 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 <memory> 5 #include <memory>
6 #include <string> 6 #include <string>
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 bool priority_to_dependency; 103 bool priority_to_dependency;
104 }; 104 };
105 105
106 void UpdateSpdySessionDependencies(SpdyNetworkTransactionTestParams test_params, 106 void UpdateSpdySessionDependencies(SpdyNetworkTransactionTestParams test_params,
107 SpdySessionDependencies* session_deps) { 107 SpdySessionDependencies* session_deps) {
108 session_deps->parse_alternative_services = true; 108 session_deps->parse_alternative_services = true;
109 session_deps->enable_alternative_service_with_different_host = true; 109 session_deps->enable_alternative_service_with_different_host = true;
110 if (test_params.ssl_type == HTTP_SPDY_VIA_ALT_SVC) { 110 if (test_params.ssl_type == HTTP_SPDY_VIA_ALT_SVC) {
111 base::Time expiration = base::Time::Now() + base::TimeDelta::FromDays(1); 111 base::Time expiration = base::Time::Now() + base::TimeDelta::FromDays(1);
112 session_deps->http_server_properties.SetAlternativeService( 112 session_deps->http_server_properties.SetAlternativeService(
113 HostPortPair("www.example.org", 80), 113 url::SchemeHostPort("http", "www.example.org", 80),
Zhongyi Shi 2016/04/19 19:08:18 I should do this more carefully. This is the case
114 AlternativeService(AlternateProtocolFromNextProto(test_params.protocol), 114 AlternativeService(AlternateProtocolFromNextProto(test_params.protocol),
115 "www.example.org", 443), 115 "www.example.org", 443),
116 expiration); 116 expiration);
117 } 117 }
118 session_deps->enable_priority_dependencies = 118 session_deps->enable_priority_dependencies =
119 test_params.priority_to_dependency; 119 test_params.priority_to_dependency;
120 } 120 }
121 121
122 std::unique_ptr<SpdySessionDependencies> CreateSpdySessionDependencies( 122 std::unique_ptr<SpdySessionDependencies> CreateSpdySessionDependencies(
123 SpdyNetworkTransactionTestParams test_params) { 123 SpdyNetworkTransactionTestParams test_params) {
(...skipping 7005 matching lines...) Expand 10 before | Expand all | Expand 10 after
7129 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { 7129 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) {
7130 std::unique_ptr<SSLSocketDataProvider> ssl_provider( 7130 std::unique_ptr<SSLSocketDataProvider> ssl_provider(
7131 new SSLSocketDataProvider(ASYNC, OK)); 7131 new SSLSocketDataProvider(ASYNC, OK));
7132 // Set to TLS_RSA_WITH_NULL_MD5 7132 // Set to TLS_RSA_WITH_NULL_MD5
7133 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); 7133 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status);
7134 7134
7135 RunTLSUsageCheckTest(std::move(ssl_provider)); 7135 RunTLSUsageCheckTest(std::move(ssl_provider));
7136 } 7136 }
7137 7137
7138 } // namespace net 7138 } // namespace net
OLDNEW
« components/cronet/ios/cronet_environment.cc ('K') | « net/quic/quic_stream_factory_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698