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

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

Issue 9721002: [net/dns] Removes locking from DnsConfigServiceWin and adds local computer name. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Move lowercasing to ServeFromHosts, add test. Reorganize OnHostsRead. Created 8 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_impl.cc ('k') | net/dns/dns_config_service.h » ('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) 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/base/host_resolver_impl.h" 5 #include "net/base/host_resolver_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 1910 matching lines...) Expand 10 before | Expand all | Expand 10 after
1921 EXPECT_EQ("127.0.0.1:80", FirstAddressToString(req5.addrlist())); 1921 EXPECT_EQ("127.0.0.1:80", FirstAddressToString(req5.addrlist()));
1922 EXPECT_EQ(1u, NumberOfAddresses(req5.addrlist())); 1922 EXPECT_EQ(1u, NumberOfAddresses(req5.addrlist()));
1923 1923
1924 info.set_address_family(ADDRESS_FAMILY_IPV6); 1924 info.set_address_family(ADDRESS_FAMILY_IPV6);
1925 ResolveRequest req6(host_resolver.get(), info); 1925 ResolveRequest req6(host_resolver.get(), info);
1926 EXPECT_EQ(OK, req6.result()); 1926 EXPECT_EQ(OK, req6.result());
1927 ipv6string = FirstAddressToString(req6.addrlist()); 1927 ipv6string = FirstAddressToString(req6.addrlist());
1928 if (ipv6string != "UNSUPPORTED") 1928 if (ipv6string != "UNSUPPORTED")
1929 EXPECT_EQ("[::1]:80", ipv6string); 1929 EXPECT_EQ("[::1]:80", ipv6string);
1930 EXPECT_EQ(1u, NumberOfAddresses(req6.addrlist())); 1930 EXPECT_EQ(1u, NumberOfAddresses(req6.addrlist()));
1931
1932 // Request with upper case.
1933 ResolveRequest req7(host_resolver.get(), "er_IPV4", 80);
1934 EXPECT_EQ(OK, req7.result());
1935 EXPECT_EQ("127.0.0.1:80", FirstAddressToString(req7.addrlist()));
1931 } 1936 }
1932 1937
1933 } // namespace net 1938 } // namespace net
OLDNEW
« no previous file with comments | « net/base/host_resolver_impl.cc ('k') | net/dns/dns_config_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698