diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-22 00:38:25 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-22 00:38:25 +0000 |
commit | d3c0fe8bb3b20f03eaa7535daeddc15e83e9cea6 (patch) | |
tree | 4acbf33c522f0f60854c826651191afba3fd3cd1 /net/proxy/init_proxy_resolver_unittest.cc | |
parent | a02c37666ea431312f25cc8f5b98a895c4db4fd7 (diff) | |
download | chromium_src-d3c0fe8bb3b20f03eaa7535daeddc15e83e9cea6.zip chromium_src-d3c0fe8bb3b20f03eaa7535daeddc15e83e9cea6.tar.gz chromium_src-d3c0fe8bb3b20f03eaa7535daeddc15e83e9cea6.tar.bz2 |
Move some logging from LOG(INFO) to the LoadLog. These particular ones are for proxy initialization, and are enabled in passive mode since the data will be little.
Review URL: http://codereview.chromium.org/501162
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35123 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/init_proxy_resolver_unittest.cc')
-rw-r--r-- | net/proxy/init_proxy_resolver_unittest.cc | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/net/proxy/init_proxy_resolver_unittest.cc b/net/proxy/init_proxy_resolver_unittest.cc index 45fcc39..16af01a 100644 --- a/net/proxy/init_proxy_resolver_unittest.cc +++ b/net/proxy/init_proxy_resolver_unittest.cc @@ -6,6 +6,7 @@ #include "net/base/net_errors.h" #include "net/base/load_log.h" +#include "net/base/load_log_util.h" #include "net/base/load_log_unittest.h" #include "net/base/test_completion_callback.h" #include "net/proxy/init_proxy_resolver.h" @@ -177,18 +178,18 @@ TEST(InitProxyResolverTest, CustomPacSucceeds) { EXPECT_EQ(rule.bytes(), resolver.pac_bytes()); // Check the LoadLog was filled correctly. - EXPECT_EQ(6u, log->entries().size()); + EXPECT_EQ(9u, log->entries().size()); ExpectLogContains(log, 0, LoadLog::TYPE_INIT_PROXY_RESOLVER, LoadLog::PHASE_BEGIN); ExpectLogContains(log, 1, LoadLog::TYPE_INIT_PROXY_RESOLVER_FETCH_PAC_SCRIPT, LoadLog::PHASE_BEGIN); - ExpectLogContains(log, 2, LoadLog::TYPE_INIT_PROXY_RESOLVER_FETCH_PAC_SCRIPT, + ExpectLogContains(log, 4, LoadLog::TYPE_INIT_PROXY_RESOLVER_FETCH_PAC_SCRIPT, LoadLog::PHASE_END); - ExpectLogContains(log, 3, LoadLog::TYPE_INIT_PROXY_RESOLVER_SET_PAC_SCRIPT, + ExpectLogContains(log, 5, LoadLog::TYPE_INIT_PROXY_RESOLVER_SET_PAC_SCRIPT, LoadLog::PHASE_BEGIN); - ExpectLogContains(log, 4, LoadLog::TYPE_INIT_PROXY_RESOLVER_SET_PAC_SCRIPT, + ExpectLogContains(log, 7, LoadLog::TYPE_INIT_PROXY_RESOLVER_SET_PAC_SCRIPT, LoadLog::PHASE_END); - ExpectLogContains(log, 5, LoadLog::TYPE_INIT_PROXY_RESOLVER, + ExpectLogContains(log, 8, LoadLog::TYPE_INIT_PROXY_RESOLVER, LoadLog::PHASE_END); } @@ -210,14 +211,14 @@ TEST(InitProxyResolverTest, CustomPacFails1) { EXPECT_EQ("", resolver.pac_bytes()); // Check the LoadLog was filled correctly. - EXPECT_EQ(4u, log->entries().size()); + EXPECT_EQ(6u, log->entries().size()); ExpectLogContains(log, 0, LoadLog::TYPE_INIT_PROXY_RESOLVER, LoadLog::PHASE_BEGIN); ExpectLogContains(log, 1, LoadLog::TYPE_INIT_PROXY_RESOLVER_FETCH_PAC_SCRIPT, LoadLog::PHASE_BEGIN); - ExpectLogContains(log, 2, LoadLog::TYPE_INIT_PROXY_RESOLVER_FETCH_PAC_SCRIPT, + ExpectLogContains(log, 4, LoadLog::TYPE_INIT_PROXY_RESOLVER_FETCH_PAC_SCRIPT, LoadLog::PHASE_END); - ExpectLogContains(log, 3, LoadLog::TYPE_INIT_PROXY_RESOLVER, + ExpectLogContains(log, 5, LoadLog::TYPE_INIT_PROXY_RESOLVER, LoadLog::PHASE_END); } @@ -310,26 +311,26 @@ TEST(InitProxyResolverTest, AutodetectFailCustomSuccess2) { // Check the LoadLog was filled correctly. // (Note that the Fetch and Set states are repeated since both WPAD and custom // PAC scripts are tried). - EXPECT_EQ(10u, log->entries().size()); + EXPECT_EQ(17u, log->entries().size()); ExpectLogContains(log, 0, LoadLog::TYPE_INIT_PROXY_RESOLVER, LoadLog::PHASE_BEGIN); ExpectLogContains(log, 1, LoadLog::TYPE_INIT_PROXY_RESOLVER_FETCH_PAC_SCRIPT, LoadLog::PHASE_BEGIN); - ExpectLogContains(log, 2, LoadLog::TYPE_INIT_PROXY_RESOLVER_FETCH_PAC_SCRIPT, + ExpectLogContains(log, 4, LoadLog::TYPE_INIT_PROXY_RESOLVER_FETCH_PAC_SCRIPT, LoadLog::PHASE_END); - ExpectLogContains(log, 3, LoadLog::TYPE_INIT_PROXY_RESOLVER_SET_PAC_SCRIPT, + ExpectLogContains(log, 5, LoadLog::TYPE_INIT_PROXY_RESOLVER_SET_PAC_SCRIPT, LoadLog::PHASE_BEGIN); - ExpectLogContains(log, 4, LoadLog::TYPE_INIT_PROXY_RESOLVER_SET_PAC_SCRIPT, + ExpectLogContains(log, 7, LoadLog::TYPE_INIT_PROXY_RESOLVER_SET_PAC_SCRIPT, LoadLog::PHASE_END); - ExpectLogContains(log, 5, LoadLog::TYPE_INIT_PROXY_RESOLVER_FETCH_PAC_SCRIPT, + ExpectLogContains(log, 9, LoadLog::TYPE_INIT_PROXY_RESOLVER_FETCH_PAC_SCRIPT, LoadLog::PHASE_BEGIN); - ExpectLogContains(log, 6, LoadLog::TYPE_INIT_PROXY_RESOLVER_FETCH_PAC_SCRIPT, + ExpectLogContains(log, 12, LoadLog::TYPE_INIT_PROXY_RESOLVER_FETCH_PAC_SCRIPT, LoadLog::PHASE_END); - ExpectLogContains(log, 7, LoadLog::TYPE_INIT_PROXY_RESOLVER_SET_PAC_SCRIPT, + ExpectLogContains(log, 13, LoadLog::TYPE_INIT_PROXY_RESOLVER_SET_PAC_SCRIPT, LoadLog::PHASE_BEGIN); - ExpectLogContains(log, 8, LoadLog::TYPE_INIT_PROXY_RESOLVER_SET_PAC_SCRIPT, + ExpectLogContains(log, 15, LoadLog::TYPE_INIT_PROXY_RESOLVER_SET_PAC_SCRIPT, LoadLog::PHASE_END); - ExpectLogContains(log, 9, LoadLog::TYPE_INIT_PROXY_RESOLVER, + ExpectLogContains(log, 16, LoadLog::TYPE_INIT_PROXY_RESOLVER, LoadLog::PHASE_END); } |