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

Unified Diff: net/socket/tcp_client_socket_unittest.cc

Issue 2333923004: Extracting NetLog inner classes into their own classes. (Closed)
Patch Set: Some nit fixes and better, impl-agnostic naming of net_log_parameters_callback_typedef.h -> net/log… Created 4 years, 2 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
Index: net/socket/tcp_client_socket_unittest.cc
diff --git a/net/socket/tcp_client_socket_unittest.cc b/net/socket/tcp_client_socket_unittest.cc
index fa61d3b9435e36e914a2ac19a6c71863b6bf9362..c774346657eabc8faa2ce0a2ac37f163d4fa7492 100644
--- a/net/socket/tcp_client_socket_unittest.cc
+++ b/net/socket/tcp_client_socket_unittest.cc
@@ -14,6 +14,7 @@
#include "net/base/ip_endpoint.h"
#include "net/base/net_errors.h"
#include "net/base/test_completion_callback.h"
+#include "net/log/net_log_source.h"
#include "net/socket/socket_performance_watcher.h"
#include "net/socket/tcp_server_socket.h"
#include "net/test/gtest_util.h"
@@ -36,13 +37,13 @@ namespace {
TEST(TCPClientSocketTest, BindLoopbackToLoopback) {
IPAddress lo_address = IPAddress::IPv4Localhost();
- TCPServerSocket server(NULL, NetLog::Source());
+ TCPServerSocket server(NULL, NetLogSource());
ASSERT_THAT(server.Listen(IPEndPoint(lo_address, 0), 1), IsOk());
IPEndPoint server_address;
ASSERT_THAT(server.GetLocalAddress(&server_address), IsOk());
TCPClientSocket socket(AddressList(server_address), NULL, NULL,
- NetLog::Source());
+ NetLogSource());
EXPECT_THAT(socket.Bind(IPEndPoint(lo_address, 0)), IsOk());
@@ -75,7 +76,7 @@ TEST(TCPClientSocketTest, BindLoopbackToLoopback) {
TEST(TCPClientSocketTest, BindLoopbackToExternal) {
IPAddress external_ip(72, 14, 213, 105);
TCPClientSocket socket(AddressList::CreateFromIPAddress(external_ip, 80),
- NULL, NULL, NetLog::Source());
+ NULL, NULL, NetLogSource());
EXPECT_THAT(socket.Bind(IPEndPoint(IPAddress::IPv4Localhost(), 0)), IsOk());
@@ -92,7 +93,7 @@ TEST(TCPClientSocketTest, BindLoopbackToExternal) {
// Bind a socket to the IPv4 loopback interface and try to connect to
// the IPv6 loopback interface, verify that connection fails.
TEST(TCPClientSocketTest, BindLoopbackToIPv6) {
- TCPServerSocket server(NULL, NetLog::Source());
+ TCPServerSocket server(NULL, NetLogSource());
int listen_result =
server.Listen(IPEndPoint(IPAddress::IPv6Localhost(), 0), 1);
if (listen_result != OK) {
@@ -104,7 +105,7 @@ TEST(TCPClientSocketTest, BindLoopbackToIPv6) {
IPEndPoint server_address;
ASSERT_THAT(server.GetLocalAddress(&server_address), IsOk());
TCPClientSocket socket(AddressList(server_address), NULL, NULL,
- NetLog::Source());
+ NetLogSource());
EXPECT_THAT(socket.Bind(IPEndPoint(IPAddress::IPv4Localhost(), 0)), IsOk());
@@ -156,7 +157,7 @@ TEST(TCPClientSocketTest, MAYBE_TestSocketPerformanceWatcher) {
TCPClientSocket socket(
AddressList::CreateFromIPAddressList(ip_list, "example.com"),
- std::move(watcher), NULL, NetLog::Source());
+ std::move(watcher), NULL, NetLogSource());
EXPECT_THAT(socket.Bind(IPEndPoint(IPAddress::IPv4Localhost(), 0)), IsOk());

Powered by Google App Engine
This is Rietveld 408576698