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

Unified Diff: net/base/mapped_host_resolver_unittest.cc

Issue 848006: Generalize the net module's LoadLog facility from a passive container, to an event stream (NetLog). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Split up RequestTracker into ConnectJobTracker+RequestTracker+RequestTrackerBase, address comments Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/mapped_host_resolver.cc ('k') | net/base/mock_host_resolver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/mapped_host_resolver_unittest.cc
===================================================================
--- net/base/mapped_host_resolver_unittest.cc (revision 41560)
+++ net/base/mapped_host_resolver_unittest.cc (working copy)
@@ -6,6 +6,7 @@
#include "net/base/mock_host_resolver.h"
#include "net/base/net_errors.h"
+#include "net/base/net_log.h"
#include "net/base/net_util.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -31,7 +32,7 @@
// Try resolving "www.google.com:80". There are no mappings yet, so this
// hits |resolver_impl| and fails.
rv = resolver->Resolve(HostResolver::RequestInfo("www.google.com", 80),
- &address_list, NULL, NULL, NULL);
+ &address_list, NULL, NULL, BoundNetLog());
EXPECT_EQ(ERR_NAME_NOT_RESOLVED, rv);
// Remap *.google.com to baz.com.
@@ -39,7 +40,7 @@
// Try resolving "www.google.com:80". Should be remapped to "baz.com:80".
rv = resolver->Resolve(HostResolver::RequestInfo("www.google.com", 80),
- &address_list, NULL, NULL, NULL);
+ &address_list, NULL, NULL, BoundNetLog());
EXPECT_EQ(OK, rv);
EXPECT_EQ("192.168.1.5", NetAddressToString(address_list.head()));
EXPECT_EQ(80, address_list.GetPort());
@@ -47,7 +48,7 @@
// Try resolving "foo.com:77". This will NOT be remapped, so result
// is "foo.com:77".
rv = resolver->Resolve(HostResolver::RequestInfo("foo.com", 77),
- &address_list, NULL, NULL, NULL);
+ &address_list, NULL, NULL, BoundNetLog());
EXPECT_EQ(OK, rv);
EXPECT_EQ("192.168.1.8", NetAddressToString(address_list.head()));
EXPECT_EQ(77, address_list.GetPort());
@@ -57,7 +58,7 @@
// Try resolving "chromium.org:61". Should be remapped to "proxy:99".
rv = resolver->Resolve(HostResolver::RequestInfo("chromium.org", 61),
- &address_list, NULL, NULL, NULL);
+ &address_list, NULL, NULL, BoundNetLog());
EXPECT_EQ(OK, rv);
EXPECT_EQ("192.168.1.11", NetAddressToString(address_list.head()));
EXPECT_EQ(99, address_list.GetPort());
@@ -85,14 +86,14 @@
// Try resolving "www.google.com". Should not be remapped due to exclusion).
rv = resolver->Resolve(HostResolver::RequestInfo("www.google.com", 80),
- &address_list, NULL, NULL, NULL);
+ &address_list, NULL, NULL, BoundNetLog());
EXPECT_EQ(OK, rv);
EXPECT_EQ("192.168.1.3", NetAddressToString(address_list.head()));
EXPECT_EQ(80, address_list.GetPort());
// Try resolving "chrome.com:80". Should be remapped to "baz:80".
rv = resolver->Resolve(HostResolver::RequestInfo("chrome.com", 80),
- &address_list, NULL, NULL, NULL);
+ &address_list, NULL, NULL, BoundNetLog());
EXPECT_EQ(OK, rv);
EXPECT_EQ("192.168.1.5", NetAddressToString(address_list.head()));
EXPECT_EQ(80, address_list.GetPort());
@@ -116,14 +117,14 @@
// Try resolving "www.google.com". Should be remapped to "baz".
rv = resolver->Resolve(HostResolver::RequestInfo("www.google.com", 80),
- &address_list, NULL, NULL, NULL);
+ &address_list, NULL, NULL, BoundNetLog());
EXPECT_EQ(OK, rv);
EXPECT_EQ("192.168.1.7", NetAddressToString(address_list.head()));
EXPECT_EQ(80, address_list.GetPort());
// Try resolving "chrome.net:80". Should be remapped to "bar:60".
rv = resolver->Resolve(HostResolver::RequestInfo("chrome.net", 80),
- &address_list, NULL, NULL, NULL);
+ &address_list, NULL, NULL, BoundNetLog());
EXPECT_EQ(OK, rv);
EXPECT_EQ("192.168.1.9", NetAddressToString(address_list.head()));
EXPECT_EQ(60, address_list.GetPort());
« no previous file with comments | « net/base/mapped_host_resolver.cc ('k') | net/base/mock_host_resolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698