| 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 <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 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1071 new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session())); | 1071 new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session())); |
| 1072 std::unique_ptr<HttpNetworkTransaction> trans2( | 1072 std::unique_ptr<HttpNetworkTransaction> trans2( |
| 1073 new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session())); | 1073 new HttpNetworkTransaction(DEFAULT_PRIORITY, helper.session())); |
| 1074 | 1074 |
| 1075 TestCompletionCallback callback1; | 1075 TestCompletionCallback callback1; |
| 1076 TestCompletionCallback callback2; | 1076 TestCompletionCallback callback2; |
| 1077 | 1077 |
| 1078 HttpRequestInfo httpreq = CreateGetRequest(); | 1078 HttpRequestInfo httpreq = CreateGetRequest(); |
| 1079 | 1079 |
| 1080 // Preconnect the first. | 1080 // Preconnect the first. |
| 1081 SSLConfig preconnect_ssl_config; | |
| 1082 helper.session()->ssl_config_service()->GetSSLConfig(&preconnect_ssl_config); | |
| 1083 HttpStreamFactory* http_stream_factory = | 1081 HttpStreamFactory* http_stream_factory = |
| 1084 helper.session()->http_stream_factory(); | 1082 helper.session()->http_stream_factory(); |
| 1085 helper.session()->GetAlpnProtos(&preconnect_ssl_config.alpn_protos); | |
| 1086 helper.session()->GetNpnProtos(&preconnect_ssl_config.npn_protos); | |
| 1087 | 1083 |
| 1088 http_stream_factory->PreconnectStreams(1, httpreq, preconnect_ssl_config, | 1084 http_stream_factory->PreconnectStreams(1, httpreq); |
| 1089 preconnect_ssl_config); | |
| 1090 | 1085 |
| 1091 out.rv = trans1->Start(&httpreq, callback1.callback(), log); | 1086 out.rv = trans1->Start(&httpreq, callback1.callback(), log); |
| 1092 ASSERT_EQ(ERR_IO_PENDING, out.rv); | 1087 ASSERT_EQ(ERR_IO_PENDING, out.rv); |
| 1093 out.rv = trans2->Start(&httpreq, callback2.callback(), log); | 1088 out.rv = trans2->Start(&httpreq, callback2.callback(), log); |
| 1094 ASSERT_EQ(ERR_IO_PENDING, out.rv); | 1089 ASSERT_EQ(ERR_IO_PENDING, out.rv); |
| 1095 | 1090 |
| 1096 out.rv = callback1.WaitForResult(); | 1091 out.rv = callback1.WaitForResult(); |
| 1097 ASSERT_EQ(OK, out.rv); | 1092 ASSERT_EQ(OK, out.rv); |
| 1098 out.rv = callback2.WaitForResult(); | 1093 out.rv = callback2.WaitForResult(); |
| 1099 ASSERT_EQ(OK, out.rv); | 1094 ASSERT_EQ(OK, out.rv); |
| (...skipping 6035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7135 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { | 7130 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { |
| 7136 std::unique_ptr<SSLSocketDataProvider> ssl_provider( | 7131 std::unique_ptr<SSLSocketDataProvider> ssl_provider( |
| 7137 new SSLSocketDataProvider(ASYNC, OK)); | 7132 new SSLSocketDataProvider(ASYNC, OK)); |
| 7138 // Set to TLS_RSA_WITH_NULL_MD5 | 7133 // Set to TLS_RSA_WITH_NULL_MD5 |
| 7139 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); | 7134 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); |
| 7140 | 7135 |
| 7141 RunTLSUsageCheckTest(std::move(ssl_provider)); | 7136 RunTLSUsageCheckTest(std::move(ssl_provider)); |
| 7142 } | 7137 } |
| 7143 | 7138 |
| 7144 } // namespace net | 7139 } // namespace net |
| OLD | NEW |