| 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 <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/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 NextProto protocol; | 70 NextProto protocol; |
| 71 SpdyNetworkTransactionTestSSLType ssl_type; | 71 SpdyNetworkTransactionTestSSLType ssl_type; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 void UpdateSpdySessionDependencies( | 74 void UpdateSpdySessionDependencies( |
| 75 SpdyNetworkTransactionTestParams test_params, | 75 SpdyNetworkTransactionTestParams test_params, |
| 76 SpdySessionDependencies* session_deps) { | 76 SpdySessionDependencies* session_deps) { |
| 77 switch (test_params.ssl_type) { | 77 switch (test_params.ssl_type) { |
| 78 case SPDYNPN: | 78 case SPDYNPN: |
| 79 session_deps->http_server_properties.SetAlternateProtocol( | 79 session_deps->http_server_properties.SetAlternativeService( |
| 80 HostPortPair("www.google.com", 80), 443, | 80 HostPortPair("www.google.com", 80), |
| 81 AlternateProtocolFromNextProto(test_params.protocol), 1); | 81 AlternativeService( |
| 82 AlternateProtocolFromNextProto(test_params.protocol), |
| 83 "www.google.com", 443), |
| 84 1); |
| 82 session_deps->use_alternate_protocols = true; | 85 session_deps->use_alternate_protocols = true; |
| 83 session_deps->next_protos = SpdyNextProtos(); | 86 session_deps->next_protos = SpdyNextProtos(); |
| 84 break; | 87 break; |
| 85 case SPDYNOSSL: | 88 case SPDYNOSSL: |
| 86 session_deps->force_spdy_over_ssl = false; | 89 session_deps->force_spdy_over_ssl = false; |
| 87 session_deps->force_spdy_always = true; | 90 session_deps->force_spdy_always = true; |
| 88 break; | 91 break; |
| 89 case SPDYSSL: | 92 case SPDYSSL: |
| 90 session_deps->force_spdy_over_ssl = true; | 93 session_deps->force_spdy_over_ssl = true; |
| 91 session_deps->force_spdy_always = true; | 94 session_deps->force_spdy_always = true; |
| (...skipping 6727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6819 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { | 6822 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { |
| 6820 scoped_ptr<SSLSocketDataProvider> ssl_provider( | 6823 scoped_ptr<SSLSocketDataProvider> ssl_provider( |
| 6821 new SSLSocketDataProvider(ASYNC, OK)); | 6824 new SSLSocketDataProvider(ASYNC, OK)); |
| 6822 // Set to TLS_RSA_WITH_NULL_MD5 | 6825 // Set to TLS_RSA_WITH_NULL_MD5 |
| 6823 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); | 6826 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); |
| 6824 | 6827 |
| 6825 RunTLSUsageCheckTest(ssl_provider.Pass()); | 6828 RunTLSUsageCheckTest(ssl_provider.Pass()); |
| 6826 } | 6829 } |
| 6827 | 6830 |
| 6828 } // namespace net | 6831 } // namespace net |
| OLD | NEW |