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

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

Issue 45026: Prevent making real DNS lookups by chrome tests. (Closed)
Patch Set: simplified Created 11 years, 9 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
« no previous file with comments | « net/base/host_resolver_unittest.h ('k') | net/http/http_network_layer_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 "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
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 }
OLDNEW
« no previous file with comments | « net/base/host_resolver_unittest.h ('k') | net/http/http_network_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698