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

Unified Diff: net/socket/socks5_client_socket_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/socket/socks5_client_socket.cc ('k') | net/socket/socks_client_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/socks5_client_socket_unittest.cc
diff --git a/net/socket/socks5_client_socket_unittest.cc b/net/socket/socks5_client_socket_unittest.cc
index b6b6e2104396d2bd7f72841795f84451731b49f3..6a14f994f9bc0cb179d0f36ff7f610d420a80d1d 100644
--- a/net/socket/socks5_client_socket_unittest.cc
+++ b/net/socket/socks5_client_socket_unittest.cc
@@ -16,6 +16,7 @@
#include "net/base/winsock_init.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/log/test_net_log_util.h"
@@ -157,7 +158,7 @@ TEST_F(SOCKS5ClientSocketTest, CompleteHandshake) {
TestNetLogEntry::List net_log_entries;
net_log_.GetEntries(&net_log_entries);
EXPECT_TRUE(LogContainsBeginEvent(net_log_entries, 0,
- NetLog::TYPE_SOCKS5_CONNECT));
+ NetLogEventType::SOCKS5_CONNECT));
rv = callback_.WaitForResult();
@@ -166,7 +167,7 @@ TEST_F(SOCKS5ClientSocketTest, CompleteHandshake) {
net_log_.GetEntries(&net_log_entries);
EXPECT_TRUE(LogContainsEndEvent(net_log_entries, -1,
- NetLog::TYPE_SOCKS5_CONNECT));
+ NetLogEventType::SOCKS5_CONNECT));
scoped_refptr<IOBuffer> buffer(new IOBuffer(payload_write.size()));
memcpy(buffer->data(), payload_write.data(), payload_write.size());
@@ -281,7 +282,7 @@ TEST_F(SOCKS5ClientSocketTest, PartialReadWrites) {
TestNetLogEntry::List net_log_entries;
net_log_.GetEntries(&net_log_entries);
EXPECT_TRUE(LogContainsBeginEvent(net_log_entries, 0,
- NetLog::TYPE_SOCKS5_CONNECT));
+ NetLogEventType::SOCKS5_CONNECT));
rv = callback_.WaitForResult();
EXPECT_THAT(rv, IsOk());
@@ -289,7 +290,7 @@ TEST_F(SOCKS5ClientSocketTest, PartialReadWrites) {
net_log_.GetEntries(&net_log_entries);
EXPECT_TRUE(LogContainsEndEvent(net_log_entries, -1,
- NetLog::TYPE_SOCKS5_CONNECT));
+ NetLogEventType::SOCKS5_CONNECT));
}
// Test for partial greet response read
@@ -312,13 +313,13 @@ TEST_F(SOCKS5ClientSocketTest, PartialReadWrites) {
TestNetLogEntry::List net_log_entries;
net_log_.GetEntries(&net_log_entries);
EXPECT_TRUE(LogContainsBeginEvent(net_log_entries, 0,
- NetLog::TYPE_SOCKS5_CONNECT));
+ NetLogEventType::SOCKS5_CONNECT));
rv = callback_.WaitForResult();
EXPECT_THAT(rv, IsOk());
EXPECT_TRUE(user_sock_->IsConnected());
net_log_.GetEntries(&net_log_entries);
EXPECT_TRUE(LogContainsEndEvent(net_log_entries, -1,
- NetLog::TYPE_SOCKS5_CONNECT));
+ NetLogEventType::SOCKS5_CONNECT));
}
// Test for partial handshake request write.
@@ -341,13 +342,13 @@ TEST_F(SOCKS5ClientSocketTest, PartialReadWrites) {
TestNetLogEntry::List net_log_entries;
net_log_.GetEntries(&net_log_entries);
EXPECT_TRUE(LogContainsBeginEvent(net_log_entries, 0,
- NetLog::TYPE_SOCKS5_CONNECT));
+ NetLogEventType::SOCKS5_CONNECT));
rv = callback_.WaitForResult();
EXPECT_THAT(rv, IsOk());
EXPECT_TRUE(user_sock_->IsConnected());
net_log_.GetEntries(&net_log_entries);
EXPECT_TRUE(LogContainsEndEvent(net_log_entries, -1,
- NetLog::TYPE_SOCKS5_CONNECT));
+ NetLogEventType::SOCKS5_CONNECT));
}
// Test for partial handshake response read
@@ -372,13 +373,13 @@ TEST_F(SOCKS5ClientSocketTest, PartialReadWrites) {
TestNetLogEntry::List net_log_entries;
net_log_.GetEntries(&net_log_entries);
EXPECT_TRUE(LogContainsBeginEvent(net_log_entries, 0,
- NetLog::TYPE_SOCKS5_CONNECT));
+ NetLogEventType::SOCKS5_CONNECT));
rv = callback_.WaitForResult();
EXPECT_THAT(rv, IsOk());
EXPECT_TRUE(user_sock_->IsConnected());
net_log_.GetEntries(&net_log_entries);
EXPECT_TRUE(LogContainsEndEvent(net_log_entries, -1,
- NetLog::TYPE_SOCKS5_CONNECT));
+ NetLogEventType::SOCKS5_CONNECT));
}
}
« no previous file with comments | « net/socket/socks5_client_socket.cc ('k') | net/socket/socks_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698