OLD | NEW |
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 <utility> | 6 #include <utility> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 void UpdateSpdySessionDependencies(SpdyNetworkTransactionTestParams test_params, | 105 void UpdateSpdySessionDependencies(SpdyNetworkTransactionTestParams test_params, |
106 SpdySessionDependencies* session_deps) { | 106 SpdySessionDependencies* session_deps) { |
107 session_deps->parse_alternative_services = true; | 107 session_deps->parse_alternative_services = true; |
108 session_deps->enable_alternative_service_with_different_host = true; | 108 session_deps->enable_alternative_service_with_different_host = true; |
109 if (test_params.ssl_type == HTTP_SPDY_VIA_ALT_SVC) { | 109 if (test_params.ssl_type == HTTP_SPDY_VIA_ALT_SVC) { |
110 base::Time expiration = base::Time::Now() + base::TimeDelta::FromDays(1); | 110 base::Time expiration = base::Time::Now() + base::TimeDelta::FromDays(1); |
111 session_deps->http_server_properties.SetAlternativeService( | 111 session_deps->http_server_properties.SetAlternativeService( |
112 HostPortPair("www.example.org", 80), | 112 HostPortPair("www.example.org", 80), |
113 AlternativeService(AlternateProtocolFromNextProto(test_params.protocol), | 113 AlternativeService(AlternateProtocolFromNextProto(test_params.protocol), |
114 "www.example.org", 443), | 114 "www.example.org", 443), |
115 1.0, expiration); | 115 expiration); |
116 } | 116 } |
117 } | 117 } |
118 | 118 |
119 scoped_ptr<SpdySessionDependencies> CreateSpdySessionDependencies( | 119 scoped_ptr<SpdySessionDependencies> CreateSpdySessionDependencies( |
120 SpdyNetworkTransactionTestParams test_params) { | 120 SpdyNetworkTransactionTestParams test_params) { |
121 scoped_ptr<SpdySessionDependencies> session_deps( | 121 scoped_ptr<SpdySessionDependencies> session_deps( |
122 new SpdySessionDependencies(test_params.protocol)); | 122 new SpdySessionDependencies(test_params.protocol)); |
123 UpdateSpdySessionDependencies(test_params, session_deps.get()); | 123 UpdateSpdySessionDependencies(test_params, session_deps.get()); |
124 return session_deps; | 124 return session_deps; |
125 } | 125 } |
(...skipping 6851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6977 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { | 6977 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { |
6978 scoped_ptr<SSLSocketDataProvider> ssl_provider( | 6978 scoped_ptr<SSLSocketDataProvider> ssl_provider( |
6979 new SSLSocketDataProvider(ASYNC, OK)); | 6979 new SSLSocketDataProvider(ASYNC, OK)); |
6980 // Set to TLS_RSA_WITH_NULL_MD5 | 6980 // Set to TLS_RSA_WITH_NULL_MD5 |
6981 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); | 6981 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); |
6982 | 6982 |
6983 RunTLSUsageCheckTest(std::move(ssl_provider)); | 6983 RunTLSUsageCheckTest(std::move(ssl_provider)); |
6984 } | 6984 } |
6985 | 6985 |
6986 } // namespace net | 6986 } // namespace net |
OLD | NEW |