| 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.AddAlternateProtocol( |
| 80 HostPortPair("www.google.com", 80), 443, | 80 HostPortPair("www.google.com", 80), |
| 81 AlternateProtocolFromNextProto(test_params.protocol), 1); | 81 443, |
| 82 AlternateProtocolFromNextProto(test_params.protocol), |
| 83 1); |
| 82 session_deps->use_alternate_protocols = true; | 84 session_deps->use_alternate_protocols = true; |
| 83 session_deps->next_protos = SpdyNextProtos(); | 85 session_deps->next_protos = SpdyNextProtos(); |
| 84 break; | 86 break; |
| 85 case SPDYNOSSL: | 87 case SPDYNOSSL: |
| 86 session_deps->force_spdy_over_ssl = false; | 88 session_deps->force_spdy_over_ssl = false; |
| 87 session_deps->force_spdy_always = true; | 89 session_deps->force_spdy_always = true; |
| 88 break; | 90 break; |
| 89 case SPDYSSL: | 91 case SPDYSSL: |
| 90 session_deps->force_spdy_over_ssl = true; | 92 session_deps->force_spdy_over_ssl = true; |
| 91 session_deps->force_spdy_always = true; | 93 session_deps->force_spdy_always = true; |
| (...skipping 6521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6613 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { | 6615 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { |
| 6614 scoped_ptr<SSLSocketDataProvider> ssl_provider( | 6616 scoped_ptr<SSLSocketDataProvider> ssl_provider( |
| 6615 new SSLSocketDataProvider(ASYNC, OK)); | 6617 new SSLSocketDataProvider(ASYNC, OK)); |
| 6616 // Set to TLS_RSA_WITH_NULL_MD5 | 6618 // Set to TLS_RSA_WITH_NULL_MD5 |
| 6617 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); | 6619 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); |
| 6618 | 6620 |
| 6619 RunTLSUsageCheckTest(ssl_provider.Pass()); | 6621 RunTLSUsageCheckTest(ssl_provider.Pass()); |
| 6620 } | 6622 } |
| 6621 | 6623 |
| 6622 } // namespace net | 6624 } // namespace net |
| OLD | NEW |