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 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1069 TestCompletionCallback callback1; | 1069 TestCompletionCallback callback1; |
1070 TestCompletionCallback callback2; | 1070 TestCompletionCallback callback2; |
1071 | 1071 |
1072 HttpRequestInfo httpreq = CreateGetRequest(); | 1072 HttpRequestInfo httpreq = CreateGetRequest(); |
1073 | 1073 |
1074 // Preconnect the first. | 1074 // Preconnect the first. |
1075 SSLConfig preconnect_ssl_config; | 1075 SSLConfig preconnect_ssl_config; |
1076 helper.session()->ssl_config_service()->GetSSLConfig(&preconnect_ssl_config); | 1076 helper.session()->ssl_config_service()->GetSSLConfig(&preconnect_ssl_config); |
1077 HttpStreamFactory* http_stream_factory = | 1077 HttpStreamFactory* http_stream_factory = |
1078 helper.session()->http_stream_factory(); | 1078 helper.session()->http_stream_factory(); |
1079 helper.session()->GetNextProtos(&preconnect_ssl_config.next_protos); | 1079 helper.session()->GetAlpnProtos(&preconnect_ssl_config.alpn_protos); |
| 1080 helper.session()->GetNpnProtos(&preconnect_ssl_config.npn_protos); |
1080 | 1081 |
1081 http_stream_factory->PreconnectStreams(1, httpreq, preconnect_ssl_config, | 1082 http_stream_factory->PreconnectStreams(1, httpreq, preconnect_ssl_config, |
1082 preconnect_ssl_config); | 1083 preconnect_ssl_config); |
1083 | 1084 |
1084 out.rv = trans1->Start(&httpreq, callback1.callback(), log); | 1085 out.rv = trans1->Start(&httpreq, callback1.callback(), log); |
1085 ASSERT_EQ(ERR_IO_PENDING, out.rv); | 1086 ASSERT_EQ(ERR_IO_PENDING, out.rv); |
1086 out.rv = trans2->Start(&httpreq, callback2.callback(), log); | 1087 out.rv = trans2->Start(&httpreq, callback2.callback(), log); |
1087 ASSERT_EQ(ERR_IO_PENDING, out.rv); | 1088 ASSERT_EQ(ERR_IO_PENDING, out.rv); |
1088 | 1089 |
1089 out.rv = callback1.WaitForResult(); | 1090 out.rv = callback1.WaitForResult(); |
(...skipping 5499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6589 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { | 6590 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { |
6590 scoped_ptr<SSLSocketDataProvider> ssl_provider( | 6591 scoped_ptr<SSLSocketDataProvider> ssl_provider( |
6591 new SSLSocketDataProvider(ASYNC, OK)); | 6592 new SSLSocketDataProvider(ASYNC, OK)); |
6592 // Set to TLS_RSA_WITH_NULL_MD5 | 6593 // Set to TLS_RSA_WITH_NULL_MD5 |
6593 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); | 6594 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); |
6594 | 6595 |
6595 RunTLSUsageCheckTest(ssl_provider.Pass()); | 6596 RunTLSUsageCheckTest(ssl_provider.Pass()); |
6596 } | 6597 } |
6597 | 6598 |
6598 } // namespace net | 6599 } // namespace net |
OLD | NEW |