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

Unified Diff: net/proxy/proxy_resolver_js_bindings_unittest.cc

Issue 10309002: Reimplements net::AddressList without struct addrinfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: get_canonical_name -> canonical_name. iterator to indexing Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/proxy/proxy_resolver_js_bindings.cc ('k') | net/socket/socket_test_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_resolver_js_bindings_unittest.cc
diff --git a/net/proxy/proxy_resolver_js_bindings_unittest.cc b/net/proxy/proxy_resolver_js_bindings_unittest.cc
index a1377a8d87ef24aeba0eb8012698f6132afdc866..8122ef09d347ef728bb9d0d02f341598d68b7850 100644
--- a/net/proxy/proxy_resolver_js_bindings_unittest.cc
+++ b/net/proxy/proxy_resolver_js_bindings_unittest.cc
@@ -14,7 +14,6 @@
#include "net/base/net_log.h"
#include "net/base/net_log_unittest.h"
#include "net/base/net_util.h"
-#include "net/base/sys_addrinfo.h"
#include "net/base/test_completion_callback.h"
#include "net/proxy/proxy_resolver_request_context.h"
#include "net/proxy/sync_host_resolver.h"
@@ -168,11 +167,13 @@ TEST(ProxyResolverJSBindingsTest, RestrictAddressFamily) {
HostResolver::RequestInfo info(HostPortPair("foo", 80));
AddressList address_list;
EXPECT_EQ(OK, host_resolver->Resolve(info, &address_list, BoundNetLog()));
- EXPECT_EQ("192.168.2.1", NetAddressToString(address_list.head()));
+ ASSERT_FALSE(address_list.empty());
+ EXPECT_EQ("192.168.2.1", address_list.front().ToStringWithoutPort());
info.set_address_family(ADDRESS_FAMILY_IPV4);
EXPECT_EQ(OK, host_resolver->Resolve(info, &address_list, BoundNetLog()));
- EXPECT_EQ("192.168.1.1", NetAddressToString(address_list.head()));
+ ASSERT_FALSE(address_list.empty());
+ EXPECT_EQ("192.168.1.1", address_list.front().ToStringWithoutPort());
std::string ip_address;
// Now the actual test.
« no previous file with comments | « net/proxy/proxy_resolver_js_bindings.cc ('k') | net/socket/socket_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698