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

Side by Side Diff: net/proxy/proxy_resolver_js_bindings_unittest.cc

Issue 1629005: Revert 43826 - HostResolver now adds AI_CANONNAME to the hint flags if a requ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 8 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/base/mock_host_resolver.cc ('k') | net/socket/socket_test_util.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/scoped_ptr.h" 5 #include "base/scoped_ptr.h"
6 #include "net/base/address_list.h" 6 #include "net/base/address_list.h"
7 #include "net/base/mock_host_resolver.h" 7 #include "net/base/mock_host_resolver.h"
8 #include "net/base/net_errors.h" 8 #include "net/base/net_errors.h"
9 #include "net/base/net_log.h" 9 #include "net/base/net_log.h"
10 #include "net/base/net_util.h" 10 #include "net/base/net_util.h"
11 #include "net/base/sys_addrinfo.h" 11 #include "net/base/sys_addrinfo.h"
(...skipping 29 matching lines...) Expand all
41 virtual void Shutdown() {} 41 virtual void Shutdown() {}
42 42
43 private: 43 private:
44 ~MockHostResolverWithMultipleResults() {} 44 ~MockHostResolverWithMultipleResults() {}
45 45
46 // Resolves an IP literal to an address list. 46 // Resolves an IP literal to an address list.
47 AddressList ResolveIPLiteral(const char* ip_literal) { 47 AddressList ResolveIPLiteral(const char* ip_literal) {
48 AddressList result; 48 AddressList result;
49 int rv = SystemHostResolverProc(ip_literal, 49 int rv = SystemHostResolverProc(ip_literal,
50 ADDRESS_FAMILY_UNSPECIFIED, 50 ADDRESS_FAMILY_UNSPECIFIED,
51 0,
52 &result); 51 &result);
53 EXPECT_EQ(OK, rv); 52 EXPECT_EQ(OK, rv);
54 EXPECT_EQ(NULL, result.head()->ai_next); 53 EXPECT_EQ(NULL, result.head()->ai_next);
55 return result; 54 return result;
56 } 55 }
57 56
58 // Builds an AddressList that is |ip_literal| + |address_list|. 57 // Builds an AddressList that is |ip_literal| + |address_list|.
59 // |orig_list| must not be empty. 58 // |orig_list| must not be empty.
60 AddressList PrependAddressToList(const char* ip_literal, 59 AddressList PrependAddressToList(const char* ip_literal,
61 const AddressList& orig_list) { 60 const AddressList& orig_list) {
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 182
184 EXPECT_EQ("192.168.1.1;172.22.34.1;200.100.1.2", 183 EXPECT_EQ("192.168.1.1;172.22.34.1;200.100.1.2",
185 bindings->MyIpAddressEx()); 184 bindings->MyIpAddressEx());
186 185
187 EXPECT_EQ("192.168.1.1;172.22.34.1;200.100.1.2", 186 EXPECT_EQ("192.168.1.1;172.22.34.1;200.100.1.2",
188 bindings->DnsResolveEx("FOO")); 187 bindings->DnsResolveEx("FOO"));
189 } 188 }
190 189
191 } // namespace 190 } // namespace
192 } // namespace net 191 } // namespace net
OLDNEW
« no previous file with comments | « net/base/mock_host_resolver.cc ('k') | net/socket/socket_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698