Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Side by Side Diff: net/spdy/spdy_network_transaction_unittest.cc

Issue 1387363004: Disable HTTP/2 over NPN (with OpenSSL). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable NPN in NSS if npn_protos.empty(). Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 TestCompletionCallback callback1; 1072 TestCompletionCallback callback1;
1073 TestCompletionCallback callback2; 1073 TestCompletionCallback callback2;
1074 1074
1075 HttpRequestInfo httpreq = CreateGetRequest(); 1075 HttpRequestInfo httpreq = CreateGetRequest();
1076 1076
1077 // Preconnect the first. 1077 // Preconnect the first.
1078 SSLConfig preconnect_ssl_config; 1078 SSLConfig preconnect_ssl_config;
1079 helper.session()->ssl_config_service()->GetSSLConfig(&preconnect_ssl_config); 1079 helper.session()->ssl_config_service()->GetSSLConfig(&preconnect_ssl_config);
1080 HttpStreamFactory* http_stream_factory = 1080 HttpStreamFactory* http_stream_factory =
1081 helper.session()->http_stream_factory(); 1081 helper.session()->http_stream_factory();
1082 helper.session()->GetNextProtos(&preconnect_ssl_config.next_protos); 1082 helper.session()->GetAlpnProtos(&preconnect_ssl_config.alpn_protos);
1083 helper.session()->GetNpnProtos(&preconnect_ssl_config.npn_protos);
1083 1084
1084 http_stream_factory->PreconnectStreams(1, httpreq, preconnect_ssl_config, 1085 http_stream_factory->PreconnectStreams(1, httpreq, preconnect_ssl_config,
1085 preconnect_ssl_config); 1086 preconnect_ssl_config);
1086 1087
1087 out.rv = trans1->Start(&httpreq, callback1.callback(), log); 1088 out.rv = trans1->Start(&httpreq, callback1.callback(), log);
1088 ASSERT_EQ(ERR_IO_PENDING, out.rv); 1089 ASSERT_EQ(ERR_IO_PENDING, out.rv);
1089 out.rv = trans2->Start(&httpreq, callback2.callback(), log); 1090 out.rv = trans2->Start(&httpreq, callback2.callback(), log);
1090 ASSERT_EQ(ERR_IO_PENDING, out.rv); 1091 ASSERT_EQ(ERR_IO_PENDING, out.rv);
1091 1092
1092 out.rv = callback1.WaitForResult(); 1093 out.rv = callback1.WaitForResult();
(...skipping 5499 matching lines...) Expand 10 before | Expand all | Expand 10 after
6592 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { 6593 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) {
6593 scoped_ptr<SSLSocketDataProvider> ssl_provider( 6594 scoped_ptr<SSLSocketDataProvider> ssl_provider(
6594 new SSLSocketDataProvider(ASYNC, OK)); 6595 new SSLSocketDataProvider(ASYNC, OK));
6595 // Set to TLS_RSA_WITH_NULL_MD5 6596 // Set to TLS_RSA_WITH_NULL_MD5
6596 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); 6597 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status);
6597 6598
6598 RunTLSUsageCheckTest(ssl_provider.Pass()); 6599 RunTLSUsageCheckTest(ssl_provider.Pass());
6599 } 6600 }
6600 6601
6601 } // namespace net 6602 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698