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

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

Issue 1566012: HostResolver supports optional CNAME lookups. (Closed)
Patch Set: Added CNAME details to about:net-internals 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
« 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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,
51 &result); 52 &result);
52 EXPECT_EQ(OK, rv); 53 EXPECT_EQ(OK, rv);
53 EXPECT_EQ(NULL, result.head()->ai_next); 54 EXPECT_EQ(NULL, result.head()->ai_next);
54 return result; 55 return result;
55 } 56 }
56 57
57 // Builds an AddressList that is |ip_literal| + |address_list|. 58 // Builds an AddressList that is |ip_literal| + |address_list|.
58 // |orig_list| must not be empty. 59 // |orig_list| must not be empty.
59 AddressList PrependAddressToList(const char* ip_literal, 60 AddressList PrependAddressToList(const char* ip_literal,
60 const AddressList& orig_list) { 61 const AddressList& orig_list) {
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 183
183 EXPECT_EQ("192.168.1.1;172.22.34.1;200.100.1.2", 184 EXPECT_EQ("192.168.1.1;172.22.34.1;200.100.1.2",
184 bindings->MyIpAddressEx()); 185 bindings->MyIpAddressEx());
185 186
186 EXPECT_EQ("192.168.1.1;172.22.34.1;200.100.1.2", 187 EXPECT_EQ("192.168.1.1;172.22.34.1;200.100.1.2",
187 bindings->DnsResolveEx("FOO")); 188 bindings->DnsResolveEx("FOO"));
188 } 189 }
189 190
190 } // namespace 191 } // namespace
191 } // namespace net 192 } // 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