| 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 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1059 new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session())); | 1059 new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session())); |
| 1060 scoped_ptr<HttpNetworkTransaction> trans2( | 1060 scoped_ptr<HttpNetworkTransaction> trans2( |
| 1061 new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session())); | 1061 new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session())); |
| 1062 | 1062 |
| 1063 TestCompletionCallback callback1; | 1063 TestCompletionCallback callback1; |
| 1064 TestCompletionCallback callback2; | 1064 TestCompletionCallback callback2; |
| 1065 | 1065 |
| 1066 HttpRequestInfo httpreq = CreateGetRequest(); | 1066 HttpRequestInfo httpreq = CreateGetRequest(); |
| 1067 | 1067 |
| 1068 // Preconnect the first. | 1068 // Preconnect the first. |
| 1069 SSLConfig preconnect_ssl_config; | |
| 1070 helper.session()->ssl_config_service()->GetSSLConfig(&preconnect_ssl_config); | |
| 1071 HttpStreamFactory* http_stream_factory = | 1069 HttpStreamFactory* http_stream_factory = |
| 1072 helper.session()->http_stream_factory(); | 1070 helper.session()->http_stream_factory(); |
| 1073 helper.session()->GetAlpnProtos(&preconnect_ssl_config.alpn_protos); | |
| 1074 helper.session()->GetNpnProtos(&preconnect_ssl_config.npn_protos); | |
| 1075 | 1071 |
| 1076 http_stream_factory->PreconnectStreams(1, httpreq, preconnect_ssl_config, | 1072 http_stream_factory->PreconnectStreams(1, httpreq); |
| 1077 preconnect_ssl_config); | |
| 1078 | 1073 |
| 1079 out.rv = trans1->Start(&httpreq, callback1.callback(), log); | 1074 out.rv = trans1->Start(&httpreq, callback1.callback(), log); |
| 1080 ASSERT_EQ(ERR_IO_PENDING, out.rv); | 1075 ASSERT_EQ(ERR_IO_PENDING, out.rv); |
| 1081 out.rv = trans2->Start(&httpreq, callback2.callback(), log); | 1076 out.rv = trans2->Start(&httpreq, callback2.callback(), log); |
| 1082 ASSERT_EQ(ERR_IO_PENDING, out.rv); | 1077 ASSERT_EQ(ERR_IO_PENDING, out.rv); |
| 1083 | 1078 |
| 1084 out.rv = callback1.WaitForResult(); | 1079 out.rv = callback1.WaitForResult(); |
| 1085 ASSERT_EQ(OK, out.rv); | 1080 ASSERT_EQ(OK, out.rv); |
| 1086 out.rv = callback2.WaitForResult(); | 1081 out.rv = callback2.WaitForResult(); |
| 1087 ASSERT_EQ(OK, out.rv); | 1082 ASSERT_EQ(OK, out.rv); |
| (...skipping 6027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7115 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { | 7110 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { |
| 7116 scoped_ptr<SSLSocketDataProvider> ssl_provider( | 7111 scoped_ptr<SSLSocketDataProvider> ssl_provider( |
| 7117 new SSLSocketDataProvider(ASYNC, OK)); | 7112 new SSLSocketDataProvider(ASYNC, OK)); |
| 7118 // Set to TLS_RSA_WITH_NULL_MD5 | 7113 // Set to TLS_RSA_WITH_NULL_MD5 |
| 7119 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); | 7114 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); |
| 7120 | 7115 |
| 7121 RunTLSUsageCheckTest(std::move(ssl_provider)); | 7116 RunTLSUsageCheckTest(std::move(ssl_provider)); |
| 7122 } | 7117 } |
| 7123 | 7118 |
| 7124 } // namespace net | 7119 } // namespace net |
| OLD | NEW |