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

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

Issue 8915024: Retry 114494 - Remove BindStateHolder and have Bind() return a Callback<> object directly." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years 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/web_socket_server_socket.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "net/base/address_list.h" 8 #include "net/base/address_list.h"
9 #include "net/base/net_log.h" 9 #include "net/base/net_log.h"
10 #include "net/base/net_log_unittest.h" 10 #include "net/base/net_log_unittest.h"
(...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1269 1269
1270 AssertConnectSucceeds(); 1270 AssertConnectSucceeds();
1271 1271
1272 EXPECT_TRUE(sock_->IsConnected()); 1272 EXPECT_TRUE(sock_->IsConnected());
1273 1273
1274 DeleteSockCallback read_callback(&sock_); 1274 DeleteSockCallback read_callback(&sock_);
1275 1275
1276 scoped_refptr<IOBuffer> read_buf(new IOBuffer(kLen1)); 1276 scoped_refptr<IOBuffer> read_buf(new IOBuffer(kLen1));
1277 ASSERT_EQ(ERR_IO_PENDING, 1277 ASSERT_EQ(ERR_IO_PENDING,
1278 sock_->Read(read_buf, kLen1, 1278 sock_->Read(read_buf, kLen1,
1279 base::Bind(&DeleteSockCallback::Run<int>, 1279 base::Bind(&OldCompletionCallbackAdapter,
1280 base::Unretained(&read_callback)))); 1280 &read_callback)));
1281 1281
1282 scoped_refptr<IOBufferWithSize> write_buf(CreateBuffer(kMsg1, kLen1)); 1282 scoped_refptr<IOBufferWithSize> write_buf(CreateBuffer(kMsg1, kLen1));
1283 EXPECT_EQ(ERR_IO_PENDING, sock_->Write(write_buf, write_buf->size(), 1283 EXPECT_EQ(ERR_IO_PENDING, sock_->Write(write_buf, write_buf->size(),
1284 write_callback_.callback())); 1284 write_callback_.callback()));
1285 1285
1286 Run(2); 1286 Run(2);
1287 1287
1288 EXPECT_FALSE(sock_.get()); 1288 EXPECT_FALSE(sock_.get());
1289 EXPECT_TRUE(read_callback.have_result()); 1289 EXPECT_TRUE(read_callback.have_result());
1290 EXPECT_FALSE(write_callback_.have_result()); 1290 EXPECT_FALSE(write_callback_.have_result());
1291 } 1291 }
1292 1292
1293 } // namespace net 1293 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/web_socket_server_socket.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698