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

Unified Diff: net/proxy/proxy_service_mojo_unittest.cc

Issue 2315613002: Extracted NetLog class's inner enum types into their own enum classes and (Closed)
Patch Set: Ran "git cl format" on code. Much formatting ensued. Created 4 years, 3 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_service.cc ('k') | net/proxy/proxy_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_service_mojo_unittest.cc
diff --git a/net/proxy/proxy_service_mojo_unittest.cc b/net/proxy/proxy_service_mojo_unittest.cc
index 78d6715f588ea16a1493b92b899c043cc317ccec..58431d42156ee80afe56a15304f92d378975ff37 100644
--- a/net/proxy/proxy_service_mojo_unittest.cc
+++ b/net/proxy/proxy_service_mojo_unittest.cc
@@ -17,6 +17,7 @@
#include "net/base/test_completion_callback.h"
#include "net/dns/mock_host_resolver.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/proxy/dhcp_proxy_script_fetcher.h"
@@ -86,7 +87,7 @@ void CheckCapturedNetLogEntries(const TestNetLogEntry::List& entries) {
// ProxyService records its own NetLog entries, so skip forward until the
// expected event type.
while (i < entries.size() &&
- entries[i].type != NetLog::TYPE_PAC_JAVASCRIPT_ALERT) {
+ entries[i].type != NetLogEventType::PAC_JAVASCRIPT_ALERT) {
i++;
}
ASSERT_LT(i, entries.size());
@@ -96,7 +97,7 @@ void CheckCapturedNetLogEntries(const TestNetLogEntry::List& entries) {
ASSERT_FALSE(entries[i].params->HasKey("line_number"));
while (i < entries.size() &&
- entries[i].type != NetLog::TYPE_PAC_JAVASCRIPT_ERROR) {
+ entries[i].type != NetLogEventType::PAC_JAVASCRIPT_ERROR) {
i++;
}
message.clear();
@@ -115,7 +116,7 @@ class LoggingMockHostResolver : public MockHostResolver {
const CompletionCallback& callback,
std::unique_ptr<Request>* out_req,
const BoundNetLog& net_log) override {
- net_log.AddEvent(NetLog::TYPE_HOST_RESOLVER_IMPL_JOB);
+ net_log.AddEvent(NetLogEventType::HOST_RESOLVER_IMPL_JOB);
return MockHostResolver::Resolve(info, priority, addresses, callback,
out_req, net_log);
}
@@ -203,7 +204,7 @@ TEST_F(ProxyServiceMojoTest, DnsResolution) {
EXPECT_EQ(1, std::count_if(entries.begin(), entries.end(),
[](const TestNetLogEntry& entry) {
return entry.type ==
- NetLog::TYPE_HOST_RESOLVER_IMPL_JOB;
+ NetLogEventType::HOST_RESOLVER_IMPL_JOB;
}));
}
« no previous file with comments | « net/proxy/proxy_service.cc ('k') | net/proxy/proxy_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698