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

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

Issue 2347163002: s/NPN/ALPN/ (Closed)
Patch Set: Re: #12. Created 4 years, 3 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
« no previous file with comments | « net/socket/ssl_client_socket_pool.cc ('k') | net/spdy/spdy_http_stream.h » ('j') | 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/http/http_proxy_client_socket_pool.h" 5 #include "net/http/http_proxy_client_socket_pool.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 421
422 ClientSocketHandle handle; 422 ClientSocketHandle handle;
423 TestCompletionCallback callback; 423 TestCompletionCallback callback;
424 int rv = 424 int rv =
425 handle.Init("a", params, MEDIUM, ClientSocketPool::RespectLimits::ENABLED, 425 handle.Init("a", params, MEDIUM, ClientSocketPool::RespectLimits::ENABLED,
426 callback.callback(), pool_.get(), BoundNetLog()); 426 callback.callback(), pool_.get(), BoundNetLog());
427 EXPECT_THAT(rv, IsError(ERR_IO_PENDING)); 427 EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
428 EXPECT_FALSE(handle.is_initialized()); 428 EXPECT_FALSE(handle.is_initialized());
429 EXPECT_FALSE(handle.socket()); 429 EXPECT_FALSE(handle.socket());
430 430
431 EXPECT_THAT(callback.WaitForResult(), IsError(ERR_NPN_NEGOTIATION_FAILED)); 431 EXPECT_THAT(callback.WaitForResult(), IsError(ERR_ALPN_NEGOTIATION_FAILED));
432 EXPECT_FALSE(handle.is_initialized()); 432 EXPECT_FALSE(handle.is_initialized());
433 EXPECT_FALSE(handle.socket()); 433 EXPECT_FALSE(handle.socket());
434 EXPECT_TRUE(handle.is_ssl_error()); 434 EXPECT_TRUE(handle.is_ssl_error());
435 } 435 }
436 436
437 TEST_F(SSLClientSocketPoolTest, DirectGotSPDY) { 437 TEST_F(SSLClientSocketPoolTest, DirectGotSPDY) {
438 StaticSocketDataProvider data; 438 StaticSocketDataProvider data;
439 socket_factory_.AddSocketDataProvider(&data); 439 socket_factory_.AddSocketDataProvider(&data);
440 SSLSocketDataProvider ssl(ASYNC, OK); 440 SSLSocketDataProvider ssl(ASYNC, OK);
441 ssl.next_proto = kProtoHTTP2; 441 ssl.next_proto = kProtoHTTP2;
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 ssl.channel_id_sent = true; 928 ssl.channel_id_sent = true;
929 ssl.next_proto = kProtoHTTP2; 929 ssl.next_proto = kProtoHTTP2;
930 TestIPPoolingDisabled(&ssl); 930 TestIPPoolingDisabled(&ssl);
931 } 931 }
932 932
933 // It would be nice to also test the timeouts in SSLClientSocketPool. 933 // It would be nice to also test the timeouts in SSLClientSocketPool.
934 934
935 } // namespace 935 } // namespace
936 936
937 } // namespace net 937 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_pool.cc ('k') | net/spdy/spdy_http_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698