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

Side by Side Diff: net/curvecp/curvecp_transfer_unittest.cc

Issue 8824006: Migrate net/socket/socket.h, net/socket/stream_socket.h to base::Bind(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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/curvecp/curvecp_server_socket.cc ('k') | net/curvecp/messenger.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) 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 <poll.h> 5 #include <poll.h>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "net/base/net_test_suite.h" 10 #include "net/base/net_test_suite.h"
(...skipping 12 matching lines...) Expand all
23 public: 23 public:
24 CurveCPTransferTest() {} 24 CurveCPTransferTest() {}
25 }; 25 };
26 26
27 void RunEchoTest(int bytes) { 27 void RunEchoTest(int bytes) {
28 TestServer server; 28 TestServer server;
29 TestClient client; 29 TestClient client;
30 30
31 EXPECT_TRUE(server.Start(1234)); 31 EXPECT_TRUE(server.Start(1234));
32 HostPortPair server_address("localhost", 1234); 32 HostPortPair server_address("localhost", 1234);
33 TestOldCompletionCallback cb; 33 TestCompletionCallback cb;
34 EXPECT_TRUE(client.Start(server_address, bytes, &cb)); 34 EXPECT_TRUE(client.Start(server_address, bytes, cb.callback()));
35 35
36 int rv = cb.WaitForResult(); 36 int rv = cb.WaitForResult();
37 EXPECT_EQ(0, rv); 37 EXPECT_EQ(0, rv);
38 EXPECT_EQ(0, server.error_count()); 38 EXPECT_EQ(0, server.error_count());
39 EXPECT_EQ(0, client.error_count()); 39 EXPECT_EQ(0, client.error_count());
40 } 40 }
41 41
42 /* 42 /*
43 TEST_F(CurveCPTransferTest, Echo_50B_Of_Data) { 43 TEST_F(CurveCPTransferTest, Echo_50B_Of_Data) {
44 RunEchoTest(50); 44 RunEchoTest(50);
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 304
305 */ 305 */
306 306
307 } // namespace net 307 } // namespace net
308 308
309 int main(int argc, char**argv) { 309 int main(int argc, char**argv) {
310 base::StatisticsRecorder recorder; 310 base::StatisticsRecorder recorder;
311 NetTestSuite test_suite(argc, argv); 311 NetTestSuite test_suite(argc, argv);
312 return test_suite.Run(); 312 return test_suite.Run();
313 } 313 }
OLDNEW
« no previous file with comments | « net/curvecp/curvecp_server_socket.cc ('k') | net/curvecp/messenger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698