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

Side by Side Diff: net/http/http_proxy_client_socket_pool_unittest.cc

Issue 955553002: net: Remove static_cast of socket in HttpProxyClientSocketPoolTest.AsyncHaveAuth. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | 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/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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 int rv = handle_.Init("a", CreateTunnelParams(proxy_delegate.get()), LOW, 519 int rv = handle_.Init("a", CreateTunnelParams(proxy_delegate.get()), LOW,
520 callback_.callback(), &pool_, BoundNetLog()); 520 callback_.callback(), &pool_, BoundNetLog());
521 EXPECT_EQ(ERR_IO_PENDING, rv); 521 EXPECT_EQ(ERR_IO_PENDING, rv);
522 EXPECT_FALSE(handle_.is_initialized()); 522 EXPECT_FALSE(handle_.is_initialized());
523 EXPECT_FALSE(handle_.socket()); 523 EXPECT_FALSE(handle_.socket());
524 524
525 data_->RunFor(2); 525 data_->RunFor(2);
526 EXPECT_EQ(OK, callback_.WaitForResult()); 526 EXPECT_EQ(OK, callback_.WaitForResult());
527 EXPECT_TRUE(handle_.is_initialized()); 527 EXPECT_TRUE(handle_.is_initialized());
528 ASSERT_TRUE(handle_.socket()); 528 ASSERT_TRUE(handle_.socket());
529 HttpProxyClientSocket* tunnel_socket = 529 StreamSocket* tunnel_socket = handle_.socket();
530 static_cast<HttpProxyClientSocket*>(handle_.socket());
531 EXPECT_TRUE(tunnel_socket->IsConnected()); 530 EXPECT_TRUE(tunnel_socket->IsConnected());
Ryan Hamilton 2015/02/24 05:39:30 You could also inline this to be handle_.socket()-
532 proxy_delegate->VerifyOnTunnelRequestCompleted( 531 proxy_delegate->VerifyOnTunnelRequestCompleted(
533 "www.google.com:443", 532 "www.google.com:443",
534 proxy_host_port.c_str()); 533 proxy_host_port.c_str());
535 } 534 }
536 535
537 // Make sure that HttpProxyConnectJob passes on its priority to its 536 // Make sure that HttpProxyConnectJob passes on its priority to its
538 // SPDY session's socket request on Init (if applicable). 537 // SPDY session's socket request on Init (if applicable).
539 TEST_P(HttpProxyClientSocketPoolTest, 538 TEST_P(HttpProxyClientSocketPoolTest,
540 SetSpdySessionSocketRequestPriorityOnInit) { 539 SetSpdySessionSocketRequestPriorityOnInit) {
541 if (GetParam().proxy_type != SPDY) 540 if (GetParam().proxy_type != SPDY)
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 EXPECT_TRUE(headers->IsRedirect(&location)); 842 EXPECT_TRUE(headers->IsRedirect(&location));
844 EXPECT_EQ(location, redirectTarget); 843 EXPECT_EQ(location, redirectTarget);
845 } 844 }
846 } 845 }
847 846
848 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. 847 // It would be nice to also test the timeouts in HttpProxyClientSocketPool.
849 848
850 } // namespace 849 } // namespace
851 850
852 } // namespace net 851 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698