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

Unified Diff: net/socket/tcp_client_socket_unittest.cc

Issue 4118004: Update NetLog to be thread safe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Add short test description Created 10 years, 1 month 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
===================================================================
--- net/socket/tcp_client_socket_unittest.cc (revision 66783)
+++ net/socket/tcp_client_socket_unittest.cc (working copy)
@@ -105,10 +105,13 @@
EXPECT_FALSE(sock_->IsConnected());
int rv = sock_->Connect(&callback);
+
+ net::CapturingNetLog::EntryList net_log_entries;
+ net_log_.GetEntries(&net_log_entries);
EXPECT_TRUE(net::LogContainsBeginEvent(
- net_log_.entries(), 0, net::NetLog::TYPE_SOCKET_ALIVE));
+ net_log_entries, 0, net::NetLog::TYPE_SOCKET_ALIVE));
EXPECT_TRUE(net::LogContainsBeginEvent(
- net_log_.entries(), 1, net::NetLog::TYPE_TCP_CONNECT));
+ net_log_entries, 1, net::NetLog::TYPE_TCP_CONNECT));
if (rv != OK) {
ASSERT_EQ(rv, ERR_IO_PENDING);
rv = callback.WaitForResult();
@@ -116,8 +119,9 @@
}
EXPECT_TRUE(sock_->IsConnected());
+ net_log_.GetEntries(&net_log_entries);
EXPECT_TRUE(net::LogContainsEndEvent(
- net_log_.entries(), -1, net::NetLog::TYPE_TCP_CONNECT));
+ net_log_entries, -1, net::NetLog::TYPE_TCP_CONNECT));
sock_->Disconnect();
EXPECT_FALSE(sock_->IsConnected());

Powered by Google App Engine
This is Rietveld 408576698