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

Side by Side Diff: net/base/tcp_client_socket_unittest.cc

Issue 13052: Cleanup: move base/platform_test.h -> testing/ (Closed)
Patch Set: fix mark's comment Created 12 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
« no previous file with comments | « net/base/ssl_client_socket_unittest.cc ('k') | net/base/telnet_server_unittest.cc » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/platform_test.h"
6 #include "net/base/address_list.h" 5 #include "net/base/address_list.h"
7 #include "net/base/host_resolver.h" 6 #include "net/base/host_resolver.h"
8 #include "net/base/net_errors.h" 7 #include "net/base/net_errors.h"
9 #include "net/base/scoped_host_mapper.h" 8 #include "net/base/scoped_host_mapper.h"
10 #include "net/base/tcp_client_socket.h" 9 #include "net/base/tcp_client_socket.h"
11 #include "net/base/test_completion_callback.h" 10 #include "net/base/test_completion_callback.h"
12 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "testing/platform_test.h"
13 13
14 class TCPClientSocketTest : public PlatformTest { 14 class TCPClientSocketTest : public PlatformTest {
15 public: 15 public:
16 TCPClientSocketTest() { 16 TCPClientSocketTest() {
17 // TODO(darin): kill this exception once we have a way to test out the 17 // TODO(darin): kill this exception once we have a way to test out the
18 // TCPClientSocket class using loopback connections. 18 // TCPClientSocket class using loopback connections.
19 host_mapper_.AddRule("www.google.com", "www.google.com"); 19 host_mapper_.AddRule("www.google.com", "www.google.com");
20 } 20 }
21 private: 21 private:
22 net::ScopedHostMapper host_mapper_; 22 net::ScopedHostMapper host_mapper_;
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // Do a partial read and then exit. This test should not crash! 164 // Do a partial read and then exit. This test should not crash!
165 char buf[512]; 165 char buf[512];
166 rv = sock.Read(buf, sizeof(buf), &callback); 166 rv = sock.Read(buf, sizeof(buf), &callback);
167 EXPECT_TRUE(rv >= 0 || rv == net::ERR_IO_PENDING); 167 EXPECT_TRUE(rv >= 0 || rv == net::ERR_IO_PENDING);
168 168
169 if (rv == net::ERR_IO_PENDING) 169 if (rv == net::ERR_IO_PENDING)
170 rv = callback.WaitForResult(); 170 rv = callback.WaitForResult();
171 171
172 EXPECT_NE(rv, 0); 172 EXPECT_NE(rv, 0);
173 } 173 }
OLDNEW
« no previous file with comments | « net/base/ssl_client_socket_unittest.cc ('k') | net/base/telnet_server_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698