| OLD | NEW |
| 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 "net/base/address_list.h" | 5 #include "net/base/address_list.h" |
| 6 #include "net/base/client_socket_factory.h" | 6 #include "net/base/client_socket_factory.h" |
| 7 #include "net/base/host_resolver.h" | 7 #include "net/base/host_resolver.h" |
| 8 #include "net/base/host_resolver_unittest.h" | |
| 9 #include "net/base/net_errors.h" | 8 #include "net/base/net_errors.h" |
| 10 #include "net/base/ssl_client_socket.h" | 9 #include "net/base/ssl_client_socket.h" |
| 11 #include "net/base/ssl_config_service.h" | 10 #include "net/base/ssl_config_service.h" |
| 12 #include "net/base/ssl_test_util.h" | 11 #include "net/base/ssl_test_util.h" |
| 13 #include "net/base/tcp_client_socket.h" | 12 #include "net/base/tcp_client_socket.h" |
| 14 #include "net/base/test_completion_callback.h" | 13 #include "net/base/test_completion_callback.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 16 #include "testing/platform_test.h" | 15 #include "testing/platform_test.h" |
| 17 | 16 |
| 18 //----------------------------------------------------------------------------- | 17 //----------------------------------------------------------------------------- |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 // Do a partial read and then exit. This test should not crash! | 301 // Do a partial read and then exit. This test should not crash! |
| 303 char buf[512]; | 302 char buf[512]; |
| 304 rv = sock->Read(buf, sizeof(buf), &callback); | 303 rv = sock->Read(buf, sizeof(buf), &callback); |
| 305 EXPECT_TRUE(rv >= 0 || rv == net::ERR_IO_PENDING); | 304 EXPECT_TRUE(rv >= 0 || rv == net::ERR_IO_PENDING); |
| 306 | 305 |
| 307 if (rv == net::ERR_IO_PENDING) | 306 if (rv == net::ERR_IO_PENDING) |
| 308 rv = callback.WaitForResult(); | 307 rv = callback.WaitForResult(); |
| 309 | 308 |
| 310 EXPECT_NE(rv, 0); | 309 EXPECT_NE(rv, 0); |
| 311 } | 310 } |
| OLD | NEW |