Chromium Code Reviews| Index: net/proxy/proxy_service_unittest.cc |
| diff --git a/net/proxy/proxy_service_unittest.cc b/net/proxy/proxy_service_unittest.cc |
| index aacefbd6de1de96fcc282563eaf01b077225dfff..39ce10ae9a1271b8fc6a47bc207054038036913c 100644 |
| --- a/net/proxy/proxy_service_unittest.cc |
| +++ b/net/proxy/proxy_service_unittest.cc |
| @@ -19,6 +19,7 @@ |
| #include "net/base/proxy_delegate.h" |
| #include "net/base/test_completion_callback.h" |
| #include "net/log/net_log.h" |
| +#include "net/log/net_log_event_type.h" |
| #include "net/log/test_net_log.h" |
| #include "net/log/test_net_log_entry.h" |
| #include "net/log/test_net_log_util.h" |
| @@ -386,12 +387,12 @@ TEST_F(ProxyServiceTest, Direct) { |
| EXPECT_EQ(3u, entries.size()); |
| EXPECT_TRUE(LogContainsBeginEvent( |
| - entries, 0, NetLog::TYPE_PROXY_SERVICE)); |
| + entries, 0, NetLogEventType::PROXY_SERVICE)); |
| EXPECT_TRUE(LogContainsEvent( |
| - entries, 1, NetLog::TYPE_PROXY_SERVICE_RESOLVED_PROXY_LIST, |
| - NetLog::PHASE_NONE)); |
| + entries, 1, NetLogEventType::PROXY_SERVICE_RESOLVED_PROXY_LIST, |
| + NetLogEventPhase::NONE)); |
| EXPECT_TRUE(LogContainsEndEvent( |
| - entries, 2, NetLog::TYPE_PROXY_SERVICE)); |
| + entries, 2, NetLogEventType::PROXY_SERVICE)); |
| } |
| TEST_F(ProxyServiceTest, OnResolveProxyCallbackAddProxy) { |
| @@ -543,13 +544,13 @@ TEST_F(ProxyServiceTest, PAC) { |
| EXPECT_EQ(5u, entries.size()); |
| EXPECT_TRUE(LogContainsBeginEvent( |
| - entries, 0, NetLog::TYPE_PROXY_SERVICE)); |
| + entries, 0, NetLogEventType::PROXY_SERVICE)); |
| EXPECT_TRUE(LogContainsBeginEvent( |
| - entries, 1, NetLog::TYPE_PROXY_SERVICE_WAITING_FOR_INIT_PAC)); |
| + entries, 1, NetLogEventType::PROXY_SERVICE_WAITING_FOR_INIT_PAC)); |
| EXPECT_TRUE(LogContainsEndEvent( |
| - entries, 2, NetLog::TYPE_PROXY_SERVICE_WAITING_FOR_INIT_PAC)); |
| + entries, 2, NetLogEventType::PROXY_SERVICE_WAITING_FOR_INIT_PAC)); |
| EXPECT_TRUE(LogContainsEndEvent( |
| - entries, 4, NetLog::TYPE_PROXY_SERVICE)); |
| + entries, 4, NetLogEventType::PROXY_SERVICE)); |
| } |
| // Test that the proxy resolver does not see the URL's username/password |
| @@ -2245,15 +2246,15 @@ TEST_F(ProxyServiceTest, CancelWhilePACFetching) { |
| // Check the NetLog for request 1 (which was cancelled) got filled properly. |
| EXPECT_EQ(4u, entries1.size()); |
| EXPECT_TRUE(LogContainsBeginEvent( |
| - entries1, 0, NetLog::TYPE_PROXY_SERVICE)); |
| + entries1, 0, NetLogEventType::PROXY_SERVICE)); |
| EXPECT_TRUE(LogContainsBeginEvent( |
| - entries1, 1, NetLog::TYPE_PROXY_SERVICE_WAITING_FOR_INIT_PAC)); |
| + entries1, 1, NetLogEventType::PROXY_SERVICE_WAITING_FOR_INIT_PAC)); |
| // Note that TYPE_PROXY_SERVICE_WAITING_FOR_INIT_PAC is never completed before |
|
eroman
2016/09/06 19:32:20
Please update this comment.
mikecirone
2016/09/07 21:35:41
Done.
|
| // the cancellation occured. |
| EXPECT_TRUE(LogContainsEvent( |
| - entries1, 2, NetLog::TYPE_CANCELLED, NetLog::PHASE_NONE)); |
| + entries1, 2, NetLogEventType::CANCELLED, NetLogEventPhase::NONE)); |
| EXPECT_TRUE(LogContainsEndEvent( |
| - entries1, 3, NetLog::TYPE_PROXY_SERVICE)); |
| + entries1, 3, NetLogEventType::PROXY_SERVICE)); |
| } |
| // Test that if auto-detect fails, we fall-back to the custom pac. |
| @@ -2796,10 +2797,10 @@ TEST_F(ProxyServiceTest, NetworkChangeTriggersPacRefetch) { |
| log.GetEntries(&entries); |
| EXPECT_TRUE(LogContainsEntryWithType(entries, 0, |
| - NetLog::TYPE_PROXY_CONFIG_CHANGED)); |
| + NetLogEventType::PROXY_CONFIG_CHANGED)); |
| ASSERT_EQ(9u, entries.size()); |
| for (size_t i = 1; i < entries.size(); ++i) |
| - EXPECT_NE(NetLog::TYPE_PROXY_CONFIG_CHANGED, entries[i].type); |
| + EXPECT_NE(NetLogEventType::PROXY_CONFIG_CHANGED, entries[i].type); |
| } |
| // This test verifies that the PAC script specified by the settings is |