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

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

Issue 3123009: More uninitialized class member vars.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 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/socket/tcp_client_socket_unittest.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/ref_counted.h" 5 #include "base/ref_counted.h"
6 #include "base/trace_event.h" 6 #include "base/trace_event.h"
7 #include "net/base/address_list.h" 7 #include "net/base/address_list.h"
8 #include "net/base/host_resolver.h" 8 #include "net/base/host_resolver.h"
9 #include "net/base/listen_socket.h" 9 #include "net/base/listen_socket.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
11 #include "net/base/winsock_init.h" 11 #include "net/base/winsock_init.h"
12 #include "net/socket/tcp_client_socket.h" 12 #include "net/socket/tcp_client_socket.h"
13 #include "net/socket/tcp_pinger.h" 13 #include "net/socket/tcp_pinger.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 #include "testing/platform_test.h" 15 #include "testing/platform_test.h"
16 16
17 class TCPPingerTest 17 class TCPPingerTest
18 : public PlatformTest, public ListenSocket::ListenSocketDelegate { 18 : public PlatformTest, public ListenSocket::ListenSocketDelegate {
19 public: 19 public:
20 TCPPingerTest() { 20 TCPPingerTest() : listen_port_(0) {
21 } 21 }
22 22
23 // Implement ListenSocketDelegate methods 23 // Implement ListenSocketDelegate methods
24 virtual void DidAccept(ListenSocket* server, ListenSocket* connection) { 24 virtual void DidAccept(ListenSocket* server, ListenSocket* connection) {
25 // This callback doesn't seem to happen 25 // This callback doesn't seem to happen
26 // right away, so this handler may not be called at all 26 // right away, so this handler may not be called at all
27 // during connect-only tests. 27 // during connect-only tests.
28 LOG(INFO) << "TCPPinger accepted connection"; 28 LOG(INFO) << "TCPPinger accepted connection";
29 connected_sock_ = connection; 29 connected_sock_ = connection;
30 } 30 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 listen_sock_ = NULL; 86 listen_sock_ = NULL;
87 87
88 net::HostResolver::RequestInfo info("localhost", listen_port_); 88 net::HostResolver::RequestInfo info("localhost", listen_port_);
89 int rv = resolver->Resolve(info, &addr, NULL, NULL, net::BoundNetLog()); 89 int rv = resolver->Resolve(info, &addr, NULL, NULL, net::BoundNetLog());
90 EXPECT_EQ(rv, net::OK); 90 EXPECT_EQ(rv, net::OK);
91 91
92 net::TCPPinger pinger(addr); 92 net::TCPPinger pinger(addr);
93 rv = pinger.Ping(base::TimeDelta::FromMilliseconds(100), 1); 93 rv = pinger.Ping(base::TimeDelta::FromMilliseconds(100), 1);
94 EXPECT_NE(rv, net::OK); 94 EXPECT_NE(rv, net::OK);
95 } 95 }
OLDNEW
« no previous file with comments | « net/socket/tcp_client_socket_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698