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

Side by Side Diff: net/socket/ssl_client_socket_unittest.cc

Issue 214593009: Enable False Start for OpenSSL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Punt webview ifdefs (only our openssl is supported) Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « net/socket/ssl_client_socket_openssl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "net/socket/ssl_client_socket.h" 5 #include "net/socket/ssl_client_socket.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "net/base/address_list.h" 10 #include "net/base/address_list.h"
(...skipping 2313 matching lines...) Expand 10 before | Expand all | Expand 10 after
2324 EXPECT_TRUE(sock->WasEverUsed()); 2324 EXPECT_TRUE(sock->WasEverUsed());
2325 2325
2326 // TODO(davidben): Read one byte to ensure the test server has responded and 2326 // TODO(davidben): Read one byte to ensure the test server has responded and
2327 // then assert IsConnectedAndIdle is false. This currently doesn't work 2327 // then assert IsConnectedAndIdle is false. This currently doesn't work
2328 // because neither SSLClientSocketNSS nor SSLClientSocketOpenSSL check their 2328 // because neither SSLClientSocketNSS nor SSLClientSocketOpenSSL check their
2329 // SSL implementation's internal buffers. Either call PR_Available and 2329 // SSL implementation's internal buffers. Either call PR_Available and
2330 // SSL_pending, although the former isn't actually implemented or perhaps 2330 // SSL_pending, although the former isn't actually implemented or perhaps
2331 // attempt to read one byte extra. 2331 // attempt to read one byte extra.
2332 } 2332 }
2333 2333
2334 // This test is only enabled on NSS until False Start support is added for 2334 TEST_F(SSLClientSocketFalseStartTest, FalseStartEnabled) {
2335 // OpenSSL. http://crbug.com/354132
2336 #if defined(USE_NSS)
2337 #define MAYBE_FalseStartEnabled FalseStartEnabled
2338 #else
2339 #define MAYBE_FalseStartEnabled DISABLED_FalseStartEnabled
2340 #endif // USE_NSS
2341 TEST_F(SSLClientSocketFalseStartTest, MAYBE_FalseStartEnabled) {
2342 // False Start requires NPN and a forward-secret cipher suite. 2335 // False Start requires NPN and a forward-secret cipher suite.
2343 SpawnedTestServer::SSLOptions server_options; 2336 SpawnedTestServer::SSLOptions server_options;
2344 server_options.key_exchanges = 2337 server_options.key_exchanges =
2345 SpawnedTestServer::SSLOptions::KEY_EXCHANGE_DHE_RSA; 2338 SpawnedTestServer::SSLOptions::KEY_EXCHANGE_DHE_RSA;
2346 server_options.enable_npn = true; 2339 server_options.enable_npn = true;
2347 SSLConfig client_config; 2340 SSLConfig client_config;
2348 client_config.next_protos.push_back("http/1.1"); 2341 client_config.next_protos.push_back("http/1.1");
2349 TestFalseStart(server_options, client_config, true); 2342 TestFalseStart(server_options, client_config, true);
2350 } 2343 }
2351 2344
(...skipping 12 matching lines...) Expand all
2364 SpawnedTestServer::SSLOptions server_options; 2357 SpawnedTestServer::SSLOptions server_options;
2365 server_options.key_exchanges = 2358 server_options.key_exchanges =
2366 SpawnedTestServer::SSLOptions::KEY_EXCHANGE_RSA; 2359 SpawnedTestServer::SSLOptions::KEY_EXCHANGE_RSA;
2367 server_options.enable_npn = true; 2360 server_options.enable_npn = true;
2368 SSLConfig client_config; 2361 SSLConfig client_config;
2369 client_config.next_protos.push_back("http/1.1"); 2362 client_config.next_protos.push_back("http/1.1");
2370 TestFalseStart(server_options, client_config, false); 2363 TestFalseStart(server_options, client_config, false);
2371 } 2364 }
2372 2365
2373 } // namespace net 2366 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_openssl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698