| OLD | NEW |
| 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/socket/tcp_client_socket.h" | 5 #include "net/socket/tcp_client_socket.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "net/base/address_list.h" | 10 #include "net/base/address_list.h" |
| 11 #include "net/base/io_buffer.h" | 11 #include "net/base/io_buffer.h" |
| 12 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
| 13 #include "net/base/net_log.h" | 13 #include "net/base/net_log.h" |
| 14 #include "net/base/net_log_unittest.h" | 14 #include "net/base/net_log_unittest.h" |
| 15 #include "net/base/tcp_listen_socket.h" | |
| 16 #include "net/base/test_completion_callback.h" | 15 #include "net/base/test_completion_callback.h" |
| 17 #include "net/base/winsock_init.h" | 16 #include "net/base/winsock_init.h" |
| 18 #include "net/dns/mock_host_resolver.h" | 17 #include "net/dns/mock_host_resolver.h" |
| 19 #include "net/socket/client_socket_factory.h" | 18 #include "net/socket/client_socket_factory.h" |
| 19 #include "net/socket/tcp_listen_socket.h" |
| 20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
| 21 #include "testing/platform_test.h" | 21 #include "testing/platform_test.h" |
| 22 | 22 |
| 23 namespace net { | 23 namespace net { |
| 24 | 24 |
| 25 namespace { | 25 namespace { |
| 26 | 26 |
| 27 const char kServerReply[] = "HTTP/1.1 404 Not Found"; | 27 const char kServerReply[] = "HTTP/1.1 404 Not Found"; |
| 28 | 28 |
| 29 enum ClientSocketTestTypes { | 29 enum ClientSocketTestTypes { |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 | 438 |
| 439 // It's possible the read is blocked because it's already read all the data. | 439 // It's possible the read is blocked because it's already read all the data. |
| 440 // Close the server socket, so there will at least be a 0-byte read. | 440 // Close the server socket, so there will at least be a 0-byte read. |
| 441 CloseServerSocket(); | 441 CloseServerSocket(); |
| 442 | 442 |
| 443 rv = callback.WaitForResult(); | 443 rv = callback.WaitForResult(); |
| 444 EXPECT_GE(rv, 0); | 444 EXPECT_GE(rv, 0); |
| 445 } | 445 } |
| 446 | 446 |
| 447 } // namespace net | 447 } // namespace net |
| OLD | NEW |