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

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

Issue 10491007: fixed issue 128383 - replace GetPeerAddress(AddressList* address) with GetPeerAddress(IPEndPoint* a… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix according to review Created 8 years, 6 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/spdy/spdy_proxy_client_socket_spdy2_unittest.cc ('k') | net/spdy/spdy_session.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/spdy/spdy_proxy_client_socket.h" 5 #include "net/spdy/spdy_proxy_client_socket.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "net/base/address_list.h" 10 #include "net/base/address_list.h"
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 }; 547 };
548 548
549 scoped_ptr<SpdyFrame> resp(ConstructConnectReplyFrame()); 549 scoped_ptr<SpdyFrame> resp(ConstructConnectReplyFrame());
550 MockRead reads[] = { 550 MockRead reads[] = {
551 CreateMockRead(*resp, 1, ASYNC), 551 CreateMockRead(*resp, 1, ASYNC),
552 MockRead(ASYNC, 0, 2), // EOF 552 MockRead(ASYNC, 0, 2), // EOF
553 }; 553 };
554 554
555 Initialize(reads, arraysize(reads), writes, arraysize(writes)); 555 Initialize(reads, arraysize(reads), writes, arraysize(writes));
556 556
557 net::AddressList addr; 557 net::IPEndPoint addr;
558 EXPECT_EQ(ERR_SOCKET_NOT_CONNECTED, sock_->GetPeerAddress(&addr)); 558 EXPECT_EQ(ERR_SOCKET_NOT_CONNECTED, sock_->GetPeerAddress(&addr));
559 559
560 AssertConnectSucceeds(); 560 AssertConnectSucceeds();
561 EXPECT_TRUE(sock_->IsConnected()); 561 EXPECT_TRUE(sock_->IsConnected());
562 EXPECT_EQ(OK, sock_->GetPeerAddress(&addr)); 562 EXPECT_EQ(OK, sock_->GetPeerAddress(&addr));
563 563
564 Run(1); 564 Run(1);
565 565
566 EXPECT_FALSE(sock_->IsConnected()); 566 EXPECT_FALSE(sock_->IsConnected());
567 EXPECT_EQ(ERR_SOCKET_NOT_CONNECTED, sock_->GetPeerAddress(&addr)); 567 EXPECT_EQ(ERR_SOCKET_NOT_CONNECTED, sock_->GetPeerAddress(&addr));
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
1309 write_callback_.callback())); 1309 write_callback_.callback()));
1310 1310
1311 Run(2); 1311 Run(2);
1312 1312
1313 EXPECT_FALSE(sock_.get()); 1313 EXPECT_FALSE(sock_.get());
1314 EXPECT_TRUE(read_callback.have_result()); 1314 EXPECT_TRUE(read_callback.have_result());
1315 EXPECT_FALSE(write_callback_.have_result()); 1315 EXPECT_FALSE(write_callback_.have_result());
1316 } 1316 }
1317 1317
1318 } // namespace net 1318 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_proxy_client_socket_spdy2_unittest.cc ('k') | net/spdy/spdy_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698