summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmenke <mmenke@chromium.org>2015-04-24 16:00:56 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-24 23:01:48 +0000
commit16a7cbdd2de5af03e8eb9777a81d3f2d5613261f (patch)
treeb49acc972ccb97a54bdd4a0cb24f470ebf0f68d4
parentfb74da9cda4d943f453ad8e5de7b830174faf431 (diff)
downloadchromium_src-16a7cbdd2de5af03e8eb9777a81d3f2d5613261f.zip
chromium_src-16a7cbdd2de5af03e8eb9777a81d3f2d5613261f.tar.gz
chromium_src-16a7cbdd2de5af03e8eb9777a81d3f2d5613261f.tar.bz2
Get rid of TestNetLog::CapturedEntry[List] typedefs.
Replace them with CapturedNetLogEntry. BUG=none TBR=bengr@chromium.org Review URL: https://codereview.chromium.org/1109473003 Cr-Commit-Position: refs/heads/master@{#326924}
-rw-r--r--components/data_reduction_proxy/core/common/data_reduction_proxy_event_store_unittest.cc17
-rw-r--r--net/cert/multi_log_ct_verifier_unittest.cc7
-rw-r--r--net/http/http_auth_handler_unittest.cc3
-rw-r--r--net/http/http_cache_unittest.cc14
-rw-r--r--net/http/http_network_transaction_unittest.cc19
-rw-r--r--net/log/net_log_unittest.cc4
-rw-r--r--net/log/net_log_unittest.h29
-rw-r--r--net/log/test_net_log.cc12
-rw-r--r--net/log/test_net_log.h13
-rw-r--r--net/log/trace_net_log_observer_unittest.cc13
-rw-r--r--net/proxy/multi_threaded_proxy_resolver_unittest.cc10
-rw-r--r--net/proxy/proxy_resolver_v8_tracing_unittest.cc24
-rw-r--r--net/proxy/proxy_resolver_v8_unittest.cc4
-rw-r--r--net/proxy/proxy_script_decider_unittest.cc12
-rw-r--r--net/proxy/proxy_service_unittest.cc10
-rw-r--r--net/quic/quic_network_transaction_unittest.cc3
-rw-r--r--net/socket/client_socket_pool_base_unittest.cc18
-rw-r--r--net/socket/socks5_client_socket_unittest.cc12
-rw-r--r--net/socket/socks_client_socket_unittest.cc14
-rw-r--r--net/socket/ssl_client_socket_unittest.cc23
-rw-r--r--net/socket/transport_client_socket_unittest.cc4
-rw-r--r--net/spdy/spdy_network_transaction_unittest.cc4
-rw-r--r--net/spdy/spdy_proxy_client_socket_unittest.cc3
-rw-r--r--net/spdy/spdy_session_unittest.cc14
-rw-r--r--net/spdy/spdy_stream_unittest.cc4
-rw-r--r--net/udp/udp_socket_unittest.cc6
-rw-r--r--net/url_request/url_request_unittest.cc21
27 files changed, 176 insertions, 141 deletions
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store_unittest.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store_unittest.cc
index 05c996b..9f512d4 100644
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store_unittest.cc
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store_unittest.cc
@@ -11,6 +11,7 @@
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params_test_utils.h"
#include "net/http/http_status_code.h"
+#include "net/log/captured_net_log_entry.h"
#include "net/log/net_log.h"
#include "net/log/test_net_log.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -30,8 +31,8 @@ class DataReductionProxyEventStoreTest : public testing::Test {
new DataReductionProxyEventCreator(event_store_.get()));
}
- net::TestNetLog::CapturedEntry GetSingleEntry() const {
- net::TestNetLog::CapturedEntryList entries;
+ net::CapturedNetLogEntry GetSingleEntry() const {
+ net::CapturedNetLogEntry::List entries;
net_log_->GetEntries(&entries);
EXPECT_EQ(1u, entries.size());
return entries[0];
@@ -63,7 +64,7 @@ TEST_F(DataReductionProxyEventStoreTest, TestAddProxyEnabledEvent) {
TestDataReductionProxyParams::DefaultFallbackOrigin(),
TestDataReductionProxyParams::DefaultSSLOrigin());
EXPECT_EQ(1u, event_store()->stored_events_.size());
- net::TestNetLog::CapturedEntry entry = GetSingleEntry();
+ net::CapturedNetLogEntry entry = GetSingleEntry();
EXPECT_EQ(net::NetLog::TYPE_DATA_REDUCTION_PROXY_ENABLED,
entry.type);
}
@@ -72,7 +73,7 @@ TEST_F(DataReductionProxyEventStoreTest, TestAddProxyDisabledEvent) {
EXPECT_EQ(0u, event_store()->stored_events_.size());
event_creator()->AddProxyDisabledEvent(net_log());
EXPECT_EQ(1u, event_store()->stored_events_.size());
- net::TestNetLog::CapturedEntry entry = GetSingleEntry();
+ net::CapturedNetLogEntry entry = GetSingleEntry();
EXPECT_EQ(net::NetLog::TYPE_DATA_REDUCTION_PROXY_ENABLED,
entry.type);
}
@@ -83,7 +84,7 @@ TEST_F(DataReductionProxyEventStoreTest, TestAddBypassActionEvent) {
event_creator()->AddBypassActionEvent(bound_net_log(), "bypass", GURL(),
base::TimeDelta::FromMinutes(1));
EXPECT_EQ(1u, event_store()->stored_events_.size());
- net::TestNetLog::CapturedEntry entry = GetSingleEntry();
+ net::CapturedNetLogEntry entry = GetSingleEntry();
EXPECT_EQ(net::NetLog::TYPE_DATA_REDUCTION_PROXY_BYPASS_REQUESTED,
entry.type);
EXPECT_NE(nullptr, event_store()->last_bypass_event_.get());
@@ -96,7 +97,7 @@ TEST_F(DataReductionProxyEventStoreTest, TestAddBypassTypeEvent) {
GURL(), base::TimeDelta::FromMinutes(1));
EXPECT_EQ(1u, event_store()->stored_events_.size());
EXPECT_EQ(1u, net_log()->GetSize());
- net::TestNetLog::CapturedEntry entry = GetSingleEntry();
+ net::CapturedNetLogEntry entry = GetSingleEntry();
EXPECT_EQ(net::NetLog::TYPE_DATA_REDUCTION_PROXY_BYPASS_REQUESTED,
entry.type);
EXPECT_NE(nullptr, event_store()->last_bypass_event_.get());
@@ -109,7 +110,7 @@ TEST_F(DataReductionProxyEventStoreTest, TestBeginSecureProxyCheck) {
event_creator()->BeginSecureProxyCheck(bound_net_log(), GURL());
EXPECT_EQ(1u, event_store()->stored_events_.size());
EXPECT_EQ(1u, net_log()->GetSize());
- net::TestNetLog::CapturedEntry entry = GetSingleEntry();
+ net::CapturedNetLogEntry entry = GetSingleEntry();
EXPECT_EQ(net::NetLog::TYPE_DATA_REDUCTION_PROXY_CANARY_REQUEST,
entry.type);
EXPECT_EQ(DataReductionProxyEventStorageDelegate::CHECK_PENDING,
@@ -123,7 +124,7 @@ TEST_F(DataReductionProxyEventStoreTest, TestEndSecureProxyCheck) {
event_creator()->EndSecureProxyCheck(bound_net_log(), 0, net::HTTP_OK, true);
EXPECT_EQ(1u, event_store()->stored_events_.size());
EXPECT_EQ(1u, net_log()->GetSize());
- net::TestNetLog::CapturedEntry entry = GetSingleEntry();
+ net::CapturedNetLogEntry entry = GetSingleEntry();
EXPECT_EQ(net::NetLog::TYPE_DATA_REDUCTION_PROXY_CANARY_REQUEST,
entry.type);
EXPECT_EQ(DataReductionProxyEventStorageDelegate::CHECK_SUCCESS,
diff --git a/net/cert/multi_log_ct_verifier_unittest.cc b/net/cert/multi_log_ct_verifier_unittest.cc
index 9e1ea4d..6fa4477 100644
--- a/net/cert/multi_log_ct_verifier_unittest.cc
+++ b/net/cert/multi_log_ct_verifier_unittest.cc
@@ -21,6 +21,7 @@
#include "net/cert/sct_status_flags.h"
#include "net/cert/signed_certificate_timestamp.h"
#include "net/cert/x509_certificate.h"
+#include "net/log/captured_net_log_entry.h"
#include "net/log/net_log.h"
#include "net/log/test_net_log.h"
#include "net/test/cert_test_util.h"
@@ -72,19 +73,19 @@ class MultiLogCTVerifierTest : public ::testing::Test {
}
bool CheckForEmbeddedSCTInNetLog(TestNetLog& net_log) {
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
net_log.GetEntries(&entries);
if (entries.size() != 2)
return false;
- const TestNetLog::CapturedEntry& received = entries[0];
+ const CapturedNetLogEntry& received = entries[0];
std::string embedded_scts;
if (!received.GetStringValue("embedded_scts", &embedded_scts))
return false;
if (embedded_scts.empty())
return false;
- const TestNetLog::CapturedEntry& parsed = entries[1];
+ const CapturedNetLogEntry& parsed = entries[1];
base::ListValue* verified_scts;
if (!parsed.GetListValue("verified_scts", &verified_scts) ||
verified_scts->GetSize() != 1) {
diff --git a/net/http/http_auth_handler_unittest.cc b/net/http/http_auth_handler_unittest.cc
index a057d86..6ffd81b 100644
--- a/net/http/http_auth_handler_unittest.cc
+++ b/net/http/http_auth_handler_unittest.cc
@@ -11,6 +11,7 @@
#include "net/http/http_auth_challenge_tokenizer.h"
#include "net/http/http_auth_handler_mock.h"
#include "net/http/http_request_info.h"
+#include "net/log/captured_net_log_entry.h"
#include "net/log/net_log_unittest.h"
#include "net/log/test_net_log.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -50,7 +51,7 @@ TEST(HttpAuthHandlerTest, NetLog) {
if (async)
test_callback.WaitForResult();
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
capturing_net_log.GetEntries(&entries);
EXPECT_EQ(2u, entries.size());
diff --git a/net/http/http_cache_unittest.cc b/net/http/http_cache_unittest.cc
index d318e91..1da77d8d 100644
--- a/net/http/http_cache_unittest.cc
+++ b/net/http/http_cache_unittest.cc
@@ -34,7 +34,9 @@
#include "net/http/http_transaction_test_util.h"
#include "net/http/http_util.h"
#include "net/http/mock_http_cache.h"
+#include "net/log/captured_net_log_entry.h"
#include "net/log/net_log_unittest.h"
+#include "net/log/test_net_log.h"
#include "net/socket/client_socket_handle.h"
#include "net/ssl/ssl_cert_request_info.h"
#include "net/websockets/websocket_handshake_stream_base.h"
@@ -532,7 +534,7 @@ class FakeWebSocketHandshakeStreamCreateHelper
// Returns true if |entry| is not one of the log types paid attention to in this
// test. Note that TYPE_HTTP_CACHE_WRITE_INFO and TYPE_HTTP_CACHE_*_DATA are
// ignored.
-bool ShouldIgnoreLogEntry(const TestNetLog::CapturedEntry& entry) {
+bool ShouldIgnoreLogEntry(const CapturedNetLogEntry& entry) {
switch (entry.type) {
case NetLog::TYPE_HTTP_CACHE_GET_BACKEND:
case NetLog::TYPE_HTTP_CACHE_OPEN_ENTRY:
@@ -548,7 +550,7 @@ bool ShouldIgnoreLogEntry(const TestNetLog::CapturedEntry& entry) {
// Modifies |entries| to only include log entries created by the cache layer and
// asserted on in these tests.
-void FilterLogEntries(TestNetLog::CapturedEntryList* entries) {
+void FilterLogEntries(CapturedNetLogEntry::List* entries) {
entries->erase(std::remove_if(entries->begin(), entries->end(),
&ShouldIgnoreLogEntry),
entries->end());
@@ -556,7 +558,7 @@ void FilterLogEntries(TestNetLog::CapturedEntryList* entries) {
bool LogContainsEventType(const BoundTestNetLog& log,
NetLog::EventType expected) {
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
for (size_t i = 0; i < entries.size(); i++) {
if (entries[i].type == expected)
@@ -618,7 +620,7 @@ TEST(HttpCache, SimpleGETNoDiskCache) {
// Check that the NetLog was filled as expected.
// (We attempted to both Open and Create entries, but both failed).
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
FilterLogEntries(&entries);
@@ -783,7 +785,7 @@ TEST(HttpCache, SimpleGET_LoadOnlyFromCache_Hit) {
log.bound(), &load_timing_info);
// Check that the NetLog was filled as expected.
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
FilterLogEntries(&entries);
@@ -1141,7 +1143,7 @@ TEST(HttpCache, SimpleGET_LoadBypassCache) {
&load_timing_info);
// Check that the NetLog was filled as expected.
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
FilterLogEntries(&entries);
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc
index 44e200c..966dab9 100644
--- a/net/http/http_network_transaction_unittest.cc
+++ b/net/http/http_network_transaction_unittest.cc
@@ -50,6 +50,7 @@
#include "net/http/http_stream_factory.h"
#include "net/http/http_stream_parser.h"
#include "net/http/http_transaction_test_util.h"
+#include "net/log/captured_net_log_entry.h"
#include "net/log/net_log.h"
#include "net/log/net_log_unittest.h"
#include "net/log/test_net_log.h"
@@ -354,7 +355,7 @@ class HttpNetworkTransactionTest
rv = ReadTransaction(trans.get(), &out.response_data);
EXPECT_EQ(OK, rv);
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
size_t pos = ExpectLogContainsSomewhere(
entries, 0, NetLog::TYPE_HTTP_TRANSACTION_SEND_REQUEST_HEADERS,
@@ -2448,7 +2449,7 @@ TEST_P(HttpNetworkTransactionTest, BasicAuthProxyNoKeepAliveHttp10) {
rv = callback1.WaitForResult();
EXPECT_EQ(OK, rv);
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
size_t pos = ExpectLogContainsSomewhere(
entries, 0, NetLog::TYPE_HTTP_TRANSACTION_SEND_TUNNEL_HEADERS,
@@ -2567,7 +2568,7 @@ TEST_P(HttpNetworkTransactionTest, BasicAuthProxyNoKeepAliveHttp11) {
rv = callback1.WaitForResult();
EXPECT_EQ(OK, rv);
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
size_t pos = ExpectLogContainsSomewhere(
entries, 0, NetLog::TYPE_HTTP_TRANSACTION_SEND_TUNNEL_HEADERS,
@@ -2683,7 +2684,7 @@ TEST_P(HttpNetworkTransactionTest, BasicAuthProxyKeepAliveHttp10) {
rv = callback1.WaitForResult();
EXPECT_EQ(OK, rv);
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
size_t pos = ExpectLogContainsSomewhere(
entries, 0, NetLog::TYPE_HTTP_TRANSACTION_SEND_TUNNEL_HEADERS,
@@ -2788,7 +2789,7 @@ TEST_P(HttpNetworkTransactionTest, BasicAuthProxyKeepAliveHttp11) {
rv = callback1.WaitForResult();
EXPECT_EQ(OK, rv);
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
size_t pos = ExpectLogContainsSomewhere(
entries, 0, NetLog::TYPE_HTTP_TRANSACTION_SEND_TUNNEL_HEADERS,
@@ -3051,7 +3052,7 @@ TEST_P(HttpNetworkTransactionTest,
rv = callback1.WaitForResult();
EXPECT_EQ(ERR_UNEXPECTED_PROXY_AUTH, rv);
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
size_t pos = ExpectLogContainsSomewhere(
entries, 0, NetLog::TYPE_HTTP_TRANSACTION_SEND_TUNNEL_HEADERS,
@@ -6841,7 +6842,7 @@ TEST_P(HttpNetworkTransactionTest, BasicAuthSpdyProxy) {
rv = callback1.WaitForResult();
EXPECT_EQ(OK, rv);
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
size_t pos = ExpectLogContainsSomewhere(
entries, 0, NetLog::TYPE_HTTP_TRANSACTION_SEND_TUNNEL_HEADERS,
@@ -10905,7 +10906,7 @@ TEST_P(HttpNetworkTransactionTest, ProxyTunnelGet) {
rv = callback1.WaitForResult();
EXPECT_EQ(OK, rv);
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
size_t pos = ExpectLogContainsSomewhere(
entries, 0, NetLog::TYPE_HTTP_TRANSACTION_SEND_TUNNEL_HEADERS,
@@ -10979,7 +10980,7 @@ TEST_P(HttpNetworkTransactionTest, ProxyTunnelGetHangup) {
rv = callback1.WaitForResult();
EXPECT_EQ(ERR_EMPTY_RESPONSE, rv);
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
size_t pos = ExpectLogContainsSomewhere(
entries, 0, NetLog::TYPE_HTTP_TRANSACTION_SEND_TUNNEL_HEADERS,
diff --git a/net/log/net_log_unittest.cc b/net/log/net_log_unittest.cc
index 9fad152..9f1696b 100644
--- a/net/log/net_log_unittest.cc
+++ b/net/log/net_log_unittest.cc
@@ -30,7 +30,7 @@ base::Value* NetCaptureModeCallback(NetLogCaptureMode capture_mode) {
TEST(NetLogTest, Basic) {
TestNetLog net_log;
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
net_log.GetEntries(&entries);
EXPECT_EQ(0u, entries.size());
@@ -63,7 +63,7 @@ TEST(NetLogTest, CaptureModes) {
net_log.AddGlobalEntry(NetLog::TYPE_SOCKET_ALIVE,
base::Bind(NetCaptureModeCallback));
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
net_log.GetEntries(&entries);
ASSERT_EQ(1u, entries.size());
diff --git a/net/log/net_log_unittest.h b/net/log/net_log_unittest.h
index 1634e60..119d8cf 100644
--- a/net/log/net_log_unittest.h
+++ b/net/log/net_log_unittest.h
@@ -7,6 +7,7 @@
#include <cstddef>
+#include "net/log/captured_net_log_entry.h"
#include "net/log/test_net_log.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -20,7 +21,7 @@ inline base::TimeTicks MakeTime(int t) {
}
inline ::testing::AssertionResult LogContainsEventHelper(
- const TestNetLog::CapturedEntryList& entries,
+ const CapturedNetLogEntry::List& entries,
int i, // Negative indices are reverse indices.
const base::TimeTicks& expected_time,
bool check_time,
@@ -31,7 +32,7 @@ inline ::testing::AssertionResult LogContainsEventHelper(
: static_cast<size_t>(i);
if (j >= entries.size())
return ::testing::AssertionFailure() << j << " is out of bounds.";
- const TestNetLog::CapturedEntry& entry = entries[j];
+ const CapturedNetLogEntry& entry = entries[j];
if (expected_event != entry.type) {
return ::testing::AssertionFailure()
<< "Actual event: " << NetLog::EventTypeToString(entry.type)
@@ -54,7 +55,7 @@ inline ::testing::AssertionResult LogContainsEventHelper(
}
inline ::testing::AssertionResult LogContainsEventAtTime(
- const TestNetLog::CapturedEntryList& log,
+ const CapturedNetLogEntry::List& log,
int i, // Negative indices are reverse indices.
const base::TimeTicks& expected_time,
NetLog::EventType expected_event,
@@ -65,7 +66,7 @@ inline ::testing::AssertionResult LogContainsEventAtTime(
// Version without timestamp.
inline ::testing::AssertionResult LogContainsEvent(
- const TestNetLog::CapturedEntryList& log,
+ const CapturedNetLogEntry::List& log,
int i, // Negative indices are reverse indices.
NetLog::EventType expected_event,
NetLog::EventPhase expected_phase) {
@@ -75,7 +76,7 @@ inline ::testing::AssertionResult LogContainsEvent(
// Version for PHASE_BEGIN (and no timestamp).
inline ::testing::AssertionResult LogContainsBeginEvent(
- const TestNetLog::CapturedEntryList& log,
+ const CapturedNetLogEntry::List& log,
int i, // Negative indices are reverse indices.
NetLog::EventType expected_event) {
return LogContainsEvent(log, i, expected_event, NetLog::PHASE_BEGIN);
@@ -83,14 +84,14 @@ inline ::testing::AssertionResult LogContainsBeginEvent(
// Version for PHASE_END (and no timestamp).
inline ::testing::AssertionResult LogContainsEndEvent(
- const TestNetLog::CapturedEntryList& log,
+ const CapturedNetLogEntry::List& log,
int i, // Negative indices are reverse indices.
NetLog::EventType expected_event) {
return LogContainsEvent(log, i, expected_event, NetLog::PHASE_END);
}
inline ::testing::AssertionResult LogContainsEntryWithType(
- const TestNetLog::CapturedEntryList& entries,
+ const CapturedNetLogEntry::List& entries,
int i, // Negative indices are reverse indices.
NetLog::EventType type) {
// Negative indices are reverse indices.
@@ -98,7 +99,7 @@ inline ::testing::AssertionResult LogContainsEntryWithType(
: static_cast<size_t>(i);
if (j >= entries.size())
return ::testing::AssertionFailure() << j << " is out of bounds.";
- const TestNetLog::CapturedEntry& entry = entries[j];
+ const CapturedNetLogEntry& entry = entries[j];
if (entry.type != type)
return ::testing::AssertionFailure() << "Type does not match.";
return ::testing::AssertionSuccess();
@@ -107,7 +108,7 @@ inline ::testing::AssertionResult LogContainsEntryWithType(
// Check if the log contains any entry of the given type at |min_index| or
// after.
inline ::testing::AssertionResult LogContainsEntryWithTypeAfter(
- const TestNetLog::CapturedEntryList& entries,
+ const CapturedNetLogEntry::List& entries,
int min_index, // Negative indices are reverse indices.
NetLog::EventType type) {
// Negative indices are reverse indices.
@@ -116,7 +117,7 @@ inline ::testing::AssertionResult LogContainsEntryWithTypeAfter(
? static_cast<size_t>(static_cast<int>(entries.size()) + min_index)
: static_cast<size_t>(min_index);
for (size_t i = real_index; i < entries.size(); ++i) {
- const TestNetLog::CapturedEntry& entry = entries[i];
+ const CapturedNetLogEntry& entry = entries[i];
if (entry.type == type)
return ::testing::AssertionSuccess();
}
@@ -127,13 +128,13 @@ inline ::testing::AssertionResult LogContainsEntryWithTypeAfter(
// as long as the first index where it is found is at least |min_index|.
// Returns the position where the event was found.
inline size_t ExpectLogContainsSomewhere(
- const TestNetLog::CapturedEntryList& entries,
+ const CapturedNetLogEntry::List& entries,
size_t min_index,
NetLog::EventType expected_event,
NetLog::EventPhase expected_phase) {
size_t i = 0;
for (; i < entries.size(); ++i) {
- const TestNetLog::CapturedEntry& entry = entries[i];
+ const CapturedNetLogEntry& entry = entries[i];
if (entry.type == expected_event && entry.phase == expected_phase)
break;
}
@@ -146,13 +147,13 @@ inline size_t ExpectLogContainsSomewhere(
// as long as one index where it is found is at least |min_index|.
// Returns the first such position where the event was found.
inline size_t ExpectLogContainsSomewhereAfter(
- const TestNetLog::CapturedEntryList& entries,
+ const CapturedNetLogEntry::List& entries,
size_t min_index,
NetLog::EventType expected_event,
NetLog::EventPhase expected_phase) {
size_t i = min_index;
for (; i < entries.size(); ++i) {
- const TestNetLog::CapturedEntry& entry = entries[i];
+ const CapturedNetLogEntry& entry = entries[i];
if (entry.type == expected_event && entry.phase == expected_phase)
break;
}
diff --git a/net/log/test_net_log.cc b/net/log/test_net_log.cc
index a25d05d..2c38b2f 100644
--- a/net/log/test_net_log.cc
+++ b/net/log/test_net_log.cc
@@ -19,12 +19,13 @@ void TestNetLog::SetCaptureMode(NetLogCaptureMode capture_mode) {
SetObserverCaptureMode(&capturing_net_log_observer_, capture_mode);
}
-void TestNetLog::GetEntries(TestNetLog::CapturedEntryList* entry_list) const {
+void TestNetLog::GetEntries(CapturedNetLogEntry::List* entry_list) const {
capturing_net_log_observer_.GetEntries(entry_list);
}
-void TestNetLog::GetEntriesForSource(NetLog::Source source,
- CapturedEntryList* entry_list) const {
+void TestNetLog::GetEntriesForSource(
+ NetLog::Source source,
+ CapturedNetLogEntry::List* entry_list) const {
capturing_net_log_observer_.GetEntriesForSource(source, entry_list);
}
@@ -43,14 +44,13 @@ BoundTestNetLog::BoundTestNetLog()
BoundTestNetLog::~BoundTestNetLog() {
}
-void BoundTestNetLog::GetEntries(
- TestNetLog::CapturedEntryList* entry_list) const {
+void BoundTestNetLog::GetEntries(CapturedNetLogEntry::List* entry_list) const {
capturing_net_log_.GetEntries(entry_list);
}
void BoundTestNetLog::GetEntriesForSource(
NetLog::Source source,
- TestNetLog::CapturedEntryList* entry_list) const {
+ CapturedNetLogEntry::List* entry_list) const {
capturing_net_log_.GetEntriesForSource(source, entry_list);
}
diff --git a/net/log/test_net_log.h b/net/log/test_net_log.h
index 1526d82..3099ded 100644
--- a/net/log/test_net_log.h
+++ b/net/log/test_net_log.h
@@ -21,18 +21,15 @@ namespace net {
// net_test_support project.
class TestNetLog : public NetLog {
public:
- // TODO(mmenke): Get rid of these.
- typedef CapturedNetLogEntry CapturedEntry;
- typedef CapturedNetLogEntry::List CapturedEntryList;
-
TestNetLog();
~TestNetLog() override;
void SetCaptureMode(NetLogCaptureMode capture_mode);
// Below methods are forwarded to capturing_net_log_observer_.
- void GetEntries(CapturedEntryList* entry_list) const;
- void GetEntriesForSource(Source source, CapturedEntryList* entry_list) const;
+ void GetEntries(CapturedNetLogEntry::List* entry_list) const;
+ void GetEntriesForSource(Source source,
+ CapturedNetLogEntry::List* entry_list) const;
size_t GetSize() const;
void Clear();
@@ -56,11 +53,11 @@ class BoundTestNetLog {
BoundNetLog bound() const { return net_log_; }
// Fills |entry_list| with all entries in the log.
- void GetEntries(TestNetLog::CapturedEntryList* entry_list) const;
+ void GetEntries(CapturedNetLogEntry::List* entry_list) const;
// Fills |entry_list| with all entries in the log from the specified Source.
void GetEntriesForSource(NetLog::Source source,
- TestNetLog::CapturedEntryList* entry_list) const;
+ CapturedNetLogEntry::List* entry_list) const;
// Returns number of entries in the log.
size_t GetSize() const;
diff --git a/net/log/trace_net_log_observer_unittest.cc b/net/log/trace_net_log_observer_unittest.cc
index 2c2bb48..10d249f 100644
--- a/net/log/trace_net_log_observer_unittest.cc
+++ b/net/log/trace_net_log_observer_unittest.cc
@@ -17,6 +17,7 @@
#include "base/trace_event/trace_event.h"
#include "base/trace_event/trace_event_impl.h"
#include "base/values.h"
+#include "net/log/captured_net_log_entry.h"
#include "net/log/net_log.h"
#include "net/log/test_net_log.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -156,7 +157,7 @@ TEST_F(TraceNetLogObserverTest, TracingNotEnabled) {
}
TEST_F(TraceNetLogObserverTest, TraceEventCaptured) {
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
net_log()->GetEntries(&entries);
EXPECT_TRUE(entries.empty());
@@ -223,7 +224,7 @@ TEST_F(TraceNetLogObserverTest, EnableAndDisableTracing) {
EndTraceAndFlush();
trace_net_log_observer()->StopWatchForTraceStart();
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
net_log()->GetEntries(&entries);
EXPECT_EQ(3u, entries.size());
EXPECT_EQ(2u, trace_events()->GetSize());
@@ -263,7 +264,7 @@ TEST_F(TraceNetLogObserverTest, DestroyObserverWhileTracing) {
EndTraceAndFlush();
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
net_log()->GetEntries(&entries);
EXPECT_EQ(2u, entries.size());
EXPECT_EQ(1u, trace_events()->GetSize());
@@ -292,7 +293,7 @@ TEST_F(TraceNetLogObserverTest, DestroyObserverWhileNotTracing) {
EndTraceAndFlush();
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
net_log()->GetEntries(&entries);
EXPECT_EQ(3u, entries.size());
EXPECT_EQ(0u, trace_events()->GetSize());
@@ -310,7 +311,7 @@ TEST_F(TraceNetLogObserverTest, CreateObserverAfterTracingStarts) {
EndTraceAndFlush();
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
net_log()->GetEntries(&entries);
EXPECT_EQ(3u, entries.size());
EXPECT_EQ(0u, trace_events()->GetSize());
@@ -329,7 +330,7 @@ TEST_F(TraceNetLogObserverTest, EventsWithAndWithoutParameters) {
EndTraceAndFlush();
trace_net_log_observer()->StopWatchForTraceStart();
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
net_log()->GetEntries(&entries);
EXPECT_EQ(2u, entries.size());
EXPECT_EQ(2u, trace_events()->GetSize());
diff --git a/net/proxy/multi_threaded_proxy_resolver_unittest.cc b/net/proxy/multi_threaded_proxy_resolver_unittest.cc
index 618aa14..83e11ae 100644
--- a/net/proxy/multi_threaded_proxy_resolver_unittest.cc
+++ b/net/proxy/multi_threaded_proxy_resolver_unittest.cc
@@ -13,8 +13,10 @@
#include "base/threading/platform_thread.h"
#include "net/base/net_errors.h"
#include "net/base/test_completion_callback.h"
+#include "net/log/captured_net_log_entry.h"
#include "net/log/net_log.h"
#include "net/log/net_log_unittest.h"
+#include "net/log/test_net_log.h"
#include "net/proxy/mock_proxy_resolver.h"
#include "net/proxy/proxy_info.h"
#include "net/proxy/proxy_resolver_factory.h"
@@ -209,7 +211,7 @@ TEST(MultiThreadedProxyResolverTest, SingleThread_Basic) {
// on completion, this should have been copied into |log0|.
// We also have 1 log entry that was emitted by the
// MultiThreadedProxyResolver.
- TestNetLog::CapturedEntryList entries0;
+ CapturedNetLogEntry::List entries0;
log0.GetEntries(&entries0);
ASSERT_EQ(2u, entries0.size());
@@ -307,7 +309,7 @@ TEST(MultiThreadedProxyResolverTest,
EXPECT_EQ(0, callback0.WaitForResult());
EXPECT_EQ("PROXY request0:80", results0.ToPacString());
- TestNetLog::CapturedEntryList entries0;
+ CapturedNetLogEntry::List entries0;
log0.GetEntries(&entries0);
ASSERT_EQ(2u, entries0.size());
@@ -318,7 +320,7 @@ TEST(MultiThreadedProxyResolverTest,
EXPECT_EQ(1, callback1.WaitForResult());
EXPECT_EQ("PROXY request1:80", results1.ToPacString());
- TestNetLog::CapturedEntryList entries1;
+ CapturedNetLogEntry::List entries1;
log1.GetEntries(&entries1);
ASSERT_EQ(4u, entries1.size());
@@ -333,7 +335,7 @@ TEST(MultiThreadedProxyResolverTest,
EXPECT_EQ(2, callback2.WaitForResult());
EXPECT_EQ("PROXY request2:80", results2.ToPacString());
- TestNetLog::CapturedEntryList entries2;
+ CapturedNetLogEntry::List entries2;
log2.GetEntries(&entries2);
ASSERT_EQ(4u, entries2.size());
diff --git a/net/proxy/proxy_resolver_v8_tracing_unittest.cc b/net/proxy/proxy_resolver_v8_tracing_unittest.cc
index 13dfe62..7294937 100644
--- a/net/proxy/proxy_resolver_v8_tracing_unittest.cc
+++ b/net/proxy/proxy_resolver_v8_tracing_unittest.cc
@@ -18,8 +18,10 @@
#include "net/base/test_completion_callback.h"
#include "net/dns/host_cache.h"
#include "net/dns/mock_host_resolver.h"
+#include "net/log/captured_net_log_entry.h"
#include "net/log/net_log.h"
#include "net/log/net_log_unittest.h"
+#include "net/log/test_net_log.h"
#include "net/proxy/proxy_info.h"
#include "net/proxy/proxy_resolver_error_observer.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -152,12 +154,12 @@ TEST_F(ProxyResolverV8TracingTest, JavascriptError) {
// Check the NetLogs -- there was 1 alert and 1 javascript error, and they
// were output to both the global log, and per-request log.
- TestNetLog::CapturedEntryList entries_list[2];
+ CapturedNetLogEntry::List entries_list[2];
log.GetEntries(&entries_list[0]);
request_log.GetEntries(&entries_list[1]);
for (size_t list_i = 0; list_i < arraysize(entries_list); list_i++) {
- const TestNetLog::CapturedEntryList& entries = entries_list[list_i];
+ const CapturedNetLogEntry::List& entries = entries_list[list_i];
EXPECT_EQ(2u, entries.size());
EXPECT_TRUE(
LogContainsEvent(entries, 0, NetLog::TYPE_PAC_JAVASCRIPT_ALERT,
@@ -206,12 +208,12 @@ TEST_F(ProxyResolverV8TracingTest, TooManyAlerts) {
// Check the NetLogs -- the script generated 50 alerts, which were mirrored
// to both the global and per-request logs.
- TestNetLog::CapturedEntryList entries_list[2];
+ CapturedNetLogEntry::List entries_list[2];
log.GetEntries(&entries_list[0]);
request_log.GetEntries(&entries_list[1]);
for (size_t list_i = 0; list_i < arraysize(entries_list); list_i++) {
- const TestNetLog::CapturedEntryList& entries = entries_list[list_i];
+ const CapturedNetLogEntry::List& entries = entries_list[list_i];
EXPECT_EQ(50u, entries.size());
for (size_t i = 0; i < entries.size(); ++i) {
ASSERT_TRUE(
@@ -254,12 +256,12 @@ TEST_F(ProxyResolverV8TracingTest, TooManyEmptyAlerts) {
// Check the NetLogs -- the script generated 50 alerts, which were mirrored
// to both the global and per-request logs.
- TestNetLog::CapturedEntryList entries_list[2];
+ CapturedNetLogEntry::List entries_list[2];
log.GetEntries(&entries_list[0]);
request_log.GetEntries(&entries_list[1]);
for (size_t list_i = 0; list_i < arraysize(entries_list); list_i++) {
- const TestNetLog::CapturedEntryList& entries = entries_list[list_i];
+ const CapturedNetLogEntry::List& entries = entries_list[list_i];
EXPECT_EQ(1000u, entries.size());
for (size_t i = 0; i < entries.size(); ++i) {
ASSERT_TRUE(
@@ -332,12 +334,12 @@ TEST_F(ProxyResolverV8TracingTest, Dns) {
// Check the NetLogs -- the script generated 1 alert, mirrored to both
// the per-request and global logs.
- TestNetLog::CapturedEntryList entries_list[2];
+ CapturedNetLogEntry::List entries_list[2];
log.GetEntries(&entries_list[0]);
request_log.GetEntries(&entries_list[1]);
for (size_t list_i = 0; list_i < arraysize(entries_list); list_i++) {
- const TestNetLog::CapturedEntryList& entries = entries_list[list_i];
+ const CapturedNetLogEntry::List& entries = entries_list[list_i];
EXPECT_EQ(1u, entries.size());
EXPECT_TRUE(
LogContainsEvent(entries, 0, NetLog::TYPE_PAC_JAVASCRIPT_ALERT,
@@ -441,12 +443,12 @@ TEST_F(ProxyResolverV8TracingTest, FallBackToSynchronous1) {
// Check the NetLogs -- the script generated 1 alert, mirrored to both
// the per-request and global logs.
- TestNetLog::CapturedEntryList entries_list[2];
+ CapturedNetLogEntry::List entries_list[2];
log.GetEntries(&entries_list[0]);
request_log.GetEntries(&entries_list[1]);
for (size_t list_i = 0; list_i < arraysize(entries_list); list_i++) {
- const TestNetLog::CapturedEntryList& entries = entries_list[list_i];
+ const CapturedNetLogEntry::List& entries = entries_list[list_i];
EXPECT_EQ(1u, entries.size());
EXPECT_TRUE(
LogContainsEvent(entries, 0, NetLog::TYPE_PAC_JAVASCRIPT_ALERT,
@@ -614,7 +616,7 @@ void DnsDuringInitHelper(bool synchronous_host_resolver) {
// Check the NetLogs -- the script generated 2 alerts during initialization.
EXPECT_EQ(0u, request_log.GetSize());
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
ASSERT_EQ(2u, entries.size());
diff --git a/net/proxy/proxy_resolver_v8_unittest.cc b/net/proxy/proxy_resolver_v8_unittest.cc
index a7696f3..1427225 100644
--- a/net/proxy/proxy_resolver_v8_unittest.cc
+++ b/net/proxy/proxy_resolver_v8_unittest.cc
@@ -9,7 +9,9 @@
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "net/base/net_errors.h"
+#include "net/log/captured_net_log_entry.h"
#include "net/log/net_log_unittest.h"
+#include "net/log/test_net_log.h"
#include "net/proxy/proxy_info.h"
#include "net/proxy/proxy_resolver_v8.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -155,7 +157,7 @@ TEST(ProxyResolverV8Test, Direct) {
EXPECT_EQ(0U, resolver.mock_js_bindings()->alerts.size());
EXPECT_EQ(0U, resolver.mock_js_bindings()->errors.size());
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
// No bindings were called, so no log entries.
EXPECT_EQ(0u, entries.size());
diff --git a/net/proxy/proxy_script_decider_unittest.cc b/net/proxy/proxy_script_decider_unittest.cc
index 383c159..d92dfc2 100644
--- a/net/proxy/proxy_script_decider_unittest.cc
+++ b/net/proxy/proxy_script_decider_unittest.cc
@@ -14,8 +14,10 @@
#include "net/base/net_errors.h"
#include "net/base/test_completion_callback.h"
#include "net/dns/mock_host_resolver.h"
+#include "net/log/captured_net_log_entry.h"
#include "net/log/net_log.h"
#include "net/log/net_log_unittest.h"
+#include "net/log/test_net_log.h"
#include "net/proxy/dhcp_proxy_script_fetcher.h"
#include "net/proxy/mock_proxy_script_fetcher.h"
#include "net/proxy/proxy_config.h"
@@ -195,7 +197,7 @@ TEST(ProxyScriptDeciderTest, CustomPacSucceeds) {
EXPECT_EQ(rule.text(), decider.script_data()->utf16());
// Check the NetLog was filled correctly.
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_EQ(4u, entries.size());
@@ -232,7 +234,7 @@ TEST(ProxyScriptDeciderTest, CustomPacFails1) {
EXPECT_EQ(NULL, decider.script_data());
// Check the NetLog was filled correctly.
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_EQ(4u, entries.size());
@@ -492,7 +494,7 @@ TEST(ProxyScriptDeciderTest, AutodetectFailCustomSuccess2) {
// Check the NetLog was filled correctly.
// (Note that various states are repeated since both WPAD and custom
// PAC scripts are tried).
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_EQ(10u, entries.size());
@@ -592,7 +594,7 @@ TEST(ProxyScriptDeciderTest, CustomPacFails1_WithPositiveDelay) {
EXPECT_EQ(NULL, decider.script_data());
// Check the NetLog was filled correctly.
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_EQ(6u, entries.size());
@@ -632,7 +634,7 @@ TEST(ProxyScriptDeciderTest, CustomPacFails1_WithNegativeDelay) {
EXPECT_EQ(NULL, decider.script_data());
// Check the NetLog was filled correctly.
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_EQ(4u, entries.size());
diff --git a/net/proxy/proxy_service_unittest.cc b/net/proxy/proxy_service_unittest.cc
index 4f15690..6b757df 100644
--- a/net/proxy/proxy_service_unittest.cc
+++ b/net/proxy/proxy_service_unittest.cc
@@ -14,8 +14,10 @@
#include "net/base/net_errors.h"
#include "net/base/network_delegate_impl.h"
#include "net/base/test_completion_callback.h"
+#include "net/log/captured_net_log_entry.h"
#include "net/log/net_log.h"
#include "net/log/net_log_unittest.h"
+#include "net/log/test_net_log.h"
#include "net/proxy/dhcp_proxy_script_fetcher.h"
#include "net/proxy/mock_proxy_resolver.h"
#include "net/proxy/mock_proxy_script_fetcher.h"
@@ -260,7 +262,7 @@ TEST_F(ProxyServiceTest, Direct) {
EXPECT_TRUE(info.proxy_resolve_end_time().is_null());
// Check the NetLog was filled correctly.
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_EQ(3u, entries.size());
@@ -412,7 +414,7 @@ TEST_F(ProxyServiceTest, PAC) {
EXPECT_LE(info.proxy_resolve_start_time(), info.proxy_resolve_end_time());
// Check the NetLog was filled correctly.
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_EQ(5u, entries.size());
@@ -1919,7 +1921,7 @@ TEST_F(ProxyServiceTest, CancelWhilePACFetching) {
EXPECT_FALSE(callback1.have_result()); // Cancelled.
EXPECT_FALSE(callback2.have_result()); // Cancelled.
- TestNetLog::CapturedEntryList entries1;
+ CapturedNetLogEntry::List entries1;
log1.GetEntries(&entries1);
// Check the NetLog for request 1 (which was cancelled) got filled properly.
@@ -2466,7 +2468,7 @@ TEST_F(ProxyServiceTest, NetworkChangeTriggersPacRefetch) {
// Check that the expected events were output to the log stream. In particular
// PROXY_CONFIG_CHANGED should have only been emitted once (for the initial
// setup), and NOT a second time when the IP address changed.
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_TRUE(LogContainsEntryWithType(entries, 0,
diff --git a/net/quic/quic_network_transaction_unittest.cc b/net/quic/quic_network_transaction_unittest.cc
index c312993..6142070 100644
--- a/net/quic/quic_network_transaction_unittest.cc
+++ b/net/quic/quic_network_transaction_unittest.cc
@@ -19,6 +19,7 @@
#include "net/http/http_stream_factory.h"
#include "net/http/http_transaction_test_util.h"
#include "net/http/transport_security_state.h"
+#include "net/log/captured_net_log_entry.h"
#include "net/log/net_log_unittest.h"
#include "net/log/test_net_log.h"
#include "net/proxy/proxy_config_service_fixed.h"
@@ -412,7 +413,7 @@ TEST_P(QuicNetworkTransactionTest, ForceQuic) {
SendRequestAndExpectQuicResponse("hello!");
// Check that the NetLog was filled reasonably.
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
net_log_.GetEntries(&entries);
EXPECT_LT(0u, entries.size());
diff --git a/net/socket/client_socket_pool_base_unittest.cc b/net/socket/client_socket_pool_base_unittest.cc
index 2c50266..f989a46 100644
--- a/net/socket/client_socket_pool_base_unittest.cc
+++ b/net/socket/client_socket_pool_base_unittest.cc
@@ -24,8 +24,10 @@
#include "net/base/request_priority.h"
#include "net/base/test_completion_callback.h"
#include "net/http/http_response_headers.h"
+#include "net/log/captured_net_log_entry.h"
#include "net/log/net_log.h"
#include "net/log/net_log_unittest.h"
+#include "net/log/test_net_log.h"
#include "net/socket/client_socket_factory.h"
#include "net/socket/client_socket_handle.h"
#include "net/socket/socket_test_util.h"
@@ -772,7 +774,7 @@ TEST_F(ClientSocketPoolBaseTest, ConnectJob_TimedOut) {
base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(1));
EXPECT_EQ(ERR_TIMED_OUT, delegate.WaitForResult());
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_EQ(6u, entries.size());
@@ -814,7 +816,7 @@ TEST_F(ClientSocketPoolBaseTest, BasicSynchronous) {
handle.Reset();
TestLoadTimingInfoNotConnected(handle);
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_EQ(4u, entries.size());
@@ -855,7 +857,7 @@ TEST_F(ClientSocketPoolBaseTest, InitConnectionFailure) {
EXPECT_TRUE(handle.ssl_error_response_info().headers.get() == NULL);
TestLoadTimingInfoNotConnected(handle);
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_EQ(3u, entries.size());
@@ -1690,7 +1692,7 @@ TEST_F(ClientSocketPoolBaseTest, BasicAsynchronous) {
handle.Reset();
TestLoadTimingInfoNotConnected(handle);
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_EQ(4u, entries.size());
@@ -1730,7 +1732,7 @@ TEST_F(ClientSocketPoolBaseTest,
EXPECT_FALSE(handle.is_ssl_error());
EXPECT_TRUE(handle.ssl_error_response_info().headers.get() == NULL);
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_EQ(3u, entries.size());
@@ -2244,7 +2246,7 @@ TEST_F(ClientSocketPoolBaseTest, DisableCleanupTimerReuse) {
EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
EXPECT_EQ(1, pool_->NumActiveSocketsInGroup("a"));
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_TRUE(LogContainsEntryWithType(
entries, 1, NetLog::TYPE_SOCKET_POOL_REUSED_AN_EXISTING_SOCKET));
@@ -2326,7 +2328,7 @@ TEST_F(ClientSocketPoolBaseTest, DisableCleanupTimerNoReuse) {
EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
EXPECT_EQ(1, pool_->NumActiveSocketsInGroup("a"));
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_FALSE(LogContainsEntryWithType(
entries, 1, NetLog::TYPE_SOCKET_POOL_REUSED_AN_EXISTING_SOCKET));
@@ -2398,7 +2400,7 @@ TEST_F(ClientSocketPoolBaseTest, CleanupTimedOutIdleSockets) {
EXPECT_EQ(OK, rv);
EXPECT_TRUE(handle.is_reused());
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_TRUE(LogContainsEntryWithType(
entries, 1, NetLog::TYPE_SOCKET_POOL_REUSED_AN_EXISTING_SOCKET));
diff --git a/net/socket/socks5_client_socket_unittest.cc b/net/socket/socks5_client_socket_unittest.cc
index 4ee9681..775ba8c 100644
--- a/net/socket/socks5_client_socket_unittest.cc
+++ b/net/socket/socks5_client_socket_unittest.cc
@@ -13,8 +13,10 @@
#include "net/base/test_completion_callback.h"
#include "net/base/winsock_init.h"
#include "net/dns/mock_host_resolver.h"
+#include "net/log/captured_net_log_entry.h"
#include "net/log/net_log.h"
#include "net/log/net_log_unittest.h"
+#include "net/log/test_net_log.h"
#include "net/socket/client_socket_factory.h"
#include "net/socket/socket_test_util.h"
#include "net/socket/tcp_client_socket.h"
@@ -146,7 +148,7 @@ TEST_F(SOCKS5ClientSocketTest, CompleteHandshake) {
EXPECT_EQ(ERR_IO_PENDING, rv);
EXPECT_FALSE(user_sock_->IsConnected());
- TestNetLog::CapturedEntryList net_log_entries;
+ CapturedNetLogEntry::List net_log_entries;
net_log_.GetEntries(&net_log_entries);
EXPECT_TRUE(LogContainsBeginEvent(net_log_entries, 0,
NetLog::TYPE_SOCKS5_CONNECT));
@@ -270,7 +272,7 @@ TEST_F(SOCKS5ClientSocketTest, PartialReadWrites) {
int rv = user_sock_->Connect(callback_.callback());
EXPECT_EQ(ERR_IO_PENDING, rv);
- TestNetLog::CapturedEntryList net_log_entries;
+ CapturedNetLogEntry::List net_log_entries;
net_log_.GetEntries(&net_log_entries);
EXPECT_TRUE(LogContainsBeginEvent(net_log_entries, 0,
NetLog::TYPE_SOCKS5_CONNECT));
@@ -301,7 +303,7 @@ TEST_F(SOCKS5ClientSocketTest, PartialReadWrites) {
int rv = user_sock_->Connect(callback_.callback());
EXPECT_EQ(ERR_IO_PENDING, rv);
- TestNetLog::CapturedEntryList net_log_entries;
+ CapturedNetLogEntry::List net_log_entries;
net_log_.GetEntries(&net_log_entries);
EXPECT_TRUE(LogContainsBeginEvent(net_log_entries, 0,
NetLog::TYPE_SOCKS5_CONNECT));
@@ -330,7 +332,7 @@ TEST_F(SOCKS5ClientSocketTest, PartialReadWrites) {
hostname, 80, &net_log_);
int rv = user_sock_->Connect(callback_.callback());
EXPECT_EQ(ERR_IO_PENDING, rv);
- TestNetLog::CapturedEntryList net_log_entries;
+ CapturedNetLogEntry::List net_log_entries;
net_log_.GetEntries(&net_log_entries);
EXPECT_TRUE(LogContainsBeginEvent(net_log_entries, 0,
NetLog::TYPE_SOCKS5_CONNECT));
@@ -361,7 +363,7 @@ TEST_F(SOCKS5ClientSocketTest, PartialReadWrites) {
hostname, 80, &net_log_);
int rv = user_sock_->Connect(callback_.callback());
EXPECT_EQ(ERR_IO_PENDING, rv);
- TestNetLog::CapturedEntryList net_log_entries;
+ CapturedNetLogEntry::List net_log_entries;
net_log_.GetEntries(&net_log_entries);
EXPECT_TRUE(LogContainsBeginEvent(net_log_entries, 0,
NetLog::TYPE_SOCKS5_CONNECT));
diff --git a/net/socket/socks_client_socket_unittest.cc b/net/socket/socks_client_socket_unittest.cc
index ea7f82e..7f8e7d4 100644
--- a/net/socket/socks_client_socket_unittest.cc
+++ b/net/socket/socks_client_socket_unittest.cc
@@ -10,8 +10,10 @@
#include "net/base/winsock_init.h"
#include "net/dns/host_resolver.h"
#include "net/dns/mock_host_resolver.h"
+#include "net/log/captured_net_log_entry.h"
#include "net/log/net_log.h"
#include "net/log/net_log_unittest.h"
+#include "net/log/test_net_log.h"
#include "net/socket/client_socket_factory.h"
#include "net/socket/socket_test_util.h"
#include "net/socket/tcp_client_socket.h"
@@ -159,7 +161,7 @@ TEST_F(SOCKSClientSocketTest, CompleteHandshake) {
int rv = user_sock_->Connect(callback_.callback());
EXPECT_EQ(ERR_IO_PENDING, rv);
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_TRUE(
LogContainsBeginEvent(entries, 0, NetLog::TYPE_SOCKS_CONNECT));
@@ -231,7 +233,7 @@ TEST_F(SOCKSClientSocketTest, HandshakeFailures) {
int rv = user_sock_->Connect(callback_.callback());
EXPECT_EQ(ERR_IO_PENDING, rv);
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_TRUE(LogContainsBeginEvent(
entries, 0, NetLog::TYPE_SOCKS_CONNECT));
@@ -267,7 +269,7 @@ TEST_F(SOCKSClientSocketTest, PartialServerReads) {
int rv = user_sock_->Connect(callback_.callback());
EXPECT_EQ(ERR_IO_PENDING, rv);
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_TRUE(LogContainsBeginEvent(
entries, 0, NetLog::TYPE_SOCKS_CONNECT));
@@ -305,7 +307,7 @@ TEST_F(SOCKSClientSocketTest, PartialClientWrites) {
int rv = user_sock_->Connect(callback_.callback());
EXPECT_EQ(ERR_IO_PENDING, rv);
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_TRUE(LogContainsBeginEvent(
entries, 0, NetLog::TYPE_SOCKS_CONNECT));
@@ -337,7 +339,7 @@ TEST_F(SOCKSClientSocketTest, FailedSocketRead) {
int rv = user_sock_->Connect(callback_.callback());
EXPECT_EQ(ERR_IO_PENDING, rv);
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_TRUE(LogContainsBeginEvent(
entries, 0, NetLog::TYPE_SOCKS_CONNECT));
@@ -367,7 +369,7 @@ TEST_F(SOCKSClientSocketTest, FailedDNS) {
int rv = user_sock_->Connect(callback_.callback());
EXPECT_EQ(ERR_IO_PENDING, rv);
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_TRUE(LogContainsBeginEvent(
entries, 0, NetLog::TYPE_SOCKS_CONNECT));
diff --git a/net/socket/ssl_client_socket_unittest.cc b/net/socket/ssl_client_socket_unittest.cc
index 9267abd5..81b3430 100644
--- a/net/socket/ssl_client_socket_unittest.cc
+++ b/net/socket/ssl_client_socket_unittest.cc
@@ -19,8 +19,10 @@
#include "net/cert/test_root_certs.h"
#include "net/dns/host_resolver.h"
#include "net/http/transport_security_state.h"
+#include "net/log/captured_net_log_entry.h"
#include "net/log/net_log.h"
#include "net/log/net_log_unittest.h"
+#include "net/log/test_net_log.h"
#include "net/socket/client_socket_factory.h"
#include "net/socket/client_socket_handle.h"
#include "net/socket/socket_test_util.h"
@@ -969,9 +971,8 @@ class SSLClientSocketChannelIDTest : public SSLClientSocketTest {
// they'll give up waiting for application data and send the Finished after a
// timeout. This means that an SSL connect end event may appear as a socket
// write.
-static bool LogContainsSSLConnectEndEvent(
- const TestNetLog::CapturedEntryList& log,
- int i) {
+static bool LogContainsSSLConnectEndEvent(const CapturedNetLogEntry::List& log,
+ int i) {
return LogContainsEndEvent(log, i, NetLog::TYPE_SSL_CONNECT) ||
LogContainsEvent(
log, i, NetLog::TYPE_SOCKET_BYTES_SENT, NetLog::PHASE_NONE);
@@ -1014,7 +1015,7 @@ TEST_F(SSLClientSocketTest, Connect) {
rv = sock->Connect(callback.callback());
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_TRUE(LogContainsBeginEvent(entries, 5, NetLog::TYPE_SSL_CONNECT));
if (rv == ERR_IO_PENDING)
@@ -1056,7 +1057,7 @@ TEST_F(SSLClientSocketTest, ConnectExpired) {
rv = sock->Connect(callback.callback());
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_TRUE(LogContainsBeginEvent(entries, 5, NetLog::TYPE_SSL_CONNECT));
if (rv == ERR_IO_PENDING)
@@ -1100,7 +1101,7 @@ TEST_F(SSLClientSocketTest, ConnectMismatched) {
rv = sock->Connect(callback.callback());
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_TRUE(LogContainsBeginEvent(entries, 5, NetLog::TYPE_SSL_CONNECT));
if (rv == ERR_IO_PENDING)
@@ -1144,7 +1145,7 @@ TEST_F(SSLClientSocketTest, ConnectClientAuthCertRequested) {
rv = sock->Connect(callback.callback());
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_TRUE(LogContainsBeginEvent(entries, 5, NetLog::TYPE_SSL_CONNECT));
if (rv == ERR_IO_PENDING)
@@ -1209,7 +1210,7 @@ TEST_F(SSLClientSocketTest, ConnectClientAuthSendNullCert) {
// TODO(davidben): Add a test which requires them and verify the error.
rv = sock->Connect(callback.callback());
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_TRUE(LogContainsBeginEvent(entries, 5, NetLog::TYPE_SSL_CONNECT));
if (rv == ERR_IO_PENDING)
@@ -2136,7 +2137,7 @@ TEST_F(SSLClientSocketTest, Read_FullLogging) {
rv = callback.WaitForResult();
EXPECT_EQ(static_cast<int>(arraysize(request_text) - 1), rv);
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
size_t last_index = ExpectLogContainsSomewhereAfter(
entries, 5, NetLog::TYPE_SSL_SOCKET_BYTES_SENT, NetLog::PHASE_NONE);
@@ -2248,7 +2249,7 @@ TEST_F(SSLClientSocketTest, CipherSuiteDisables) {
EXPECT_FALSE(sock->IsConnected());
rv = sock->Connect(callback.callback());
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_TRUE(LogContainsBeginEvent(entries, 5, NetLog::TYPE_SSL_CONNECT));
@@ -2542,7 +2543,7 @@ TEST_F(SSLClientSocketTest, VerifyReturnChainProperlyOrdered) {
EXPECT_FALSE(sock->IsConnected());
rv = sock->Connect(callback.callback());
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_TRUE(LogContainsBeginEvent(entries, 5, NetLog::TYPE_SSL_CONNECT));
if (rv == ERR_IO_PENDING)
diff --git a/net/socket/transport_client_socket_unittest.cc b/net/socket/transport_client_socket_unittest.cc
index 2add3dc..a4c1421 100644
--- a/net/socket/transport_client_socket_unittest.cc
+++ b/net/socket/transport_client_socket_unittest.cc
@@ -14,8 +14,10 @@
#include "net/base/net_errors.h"
#include "net/base/test_completion_callback.h"
#include "net/dns/mock_host_resolver.h"
+#include "net/log/captured_net_log_entry.h"
#include "net/log/net_log.h"
#include "net/log/net_log_unittest.h"
+#include "net/log/test_net_log.h"
#include "net/socket/client_socket_factory.h"
#include "net/socket/tcp_client_socket.h"
#include "net/socket/tcp_server_socket.h"
@@ -233,7 +235,7 @@ TEST_P(TransportClientSocketTest, Connect) {
// Wait for |listen_sock_| to accept a connection.
connect_loop_.Run();
- TestNetLog::CapturedEntryList net_log_entries;
+ CapturedNetLogEntry::List net_log_entries;
net_log_.GetEntries(&net_log_entries);
EXPECT_TRUE(
LogContainsBeginEvent(net_log_entries, 0, NetLog::TYPE_SOCKET_ALIVE));
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc
index aad489b..5c90944 100644
--- a/net/spdy/spdy_network_transaction_unittest.cc
+++ b/net/spdy/spdy_network_transaction_unittest.cc
@@ -25,7 +25,9 @@
#include "net/http/http_network_transaction.h"
#include "net/http/http_server_properties.h"
#include "net/http/http_transaction_test_util.h"
+#include "net/log/captured_net_log_entry.h"
#include "net/log/net_log_unittest.h"
+#include "net/log/test_net_log.h"
#include "net/socket/client_socket_pool_base.h"
#include "net/socket/next_proto.h"
#include "net/spdy/buffered_spdy_framer.h"
@@ -3676,7 +3678,7 @@ TEST_P(SpdyNetworkTransactionTest, NetLog) {
// This test is intentionally non-specific about the exact ordering of the
// log; instead we just check to make sure that certain events exist, and that
// they are in the right order.
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_LT(0u, entries.size());
diff --git a/net/spdy/spdy_proxy_client_socket_unittest.cc b/net/spdy/spdy_proxy_client_socket_unittest.cc
index 2e6d614..8b24e43 100644
--- a/net/spdy/spdy_proxy_client_socket_unittest.cc
+++ b/net/spdy/spdy_proxy_client_socket_unittest.cc
@@ -13,6 +13,7 @@
#include "net/dns/mock_host_resolver.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_response_info.h"
+#include "net/log/captured_net_log_entry.h"
#include "net/log/net_log.h"
#include "net/log/net_log_unittest.h"
#include "net/log/test_net_log.h"
@@ -1274,7 +1275,7 @@ TEST_P(SpdyProxyClientSocketTest, NetLog) {
NetLog::Source sock_source = sock_->NetLog().source();
sock_.reset();
- TestNetLog::CapturedEntryList entry_list;
+ CapturedNetLogEntry::List entry_list;
net_log_.GetEntriesForSource(sock_source, &entry_list);
ASSERT_EQ(entry_list.size(), 10u);
diff --git a/net/spdy/spdy_session_unittest.cc b/net/spdy/spdy_session_unittest.cc
index 8e943ca..9371012 100644
--- a/net/spdy/spdy_session_unittest.cc
+++ b/net/spdy/spdy_session_unittest.cc
@@ -15,7 +15,9 @@
#include "net/base/request_priority.h"
#include "net/base/test_data_directory.h"
#include "net/base/test_data_stream.h"
+#include "net/log/captured_net_log_entry.h"
#include "net/log/net_log_unittest.h"
+#include "net/log/test_net_log.h"
#include "net/socket/client_socket_pool_manager.h"
#include "net/socket/next_proto.h"
#include "net/socket/socket_test_util.h"
@@ -1632,7 +1634,7 @@ TEST_P(SpdySessionTest, Initialize) {
// Flush the read completion task.
base::MessageLoop::current()->RunUntilIdle();
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_LT(0u, entries.size());
@@ -1641,7 +1643,7 @@ TEST_P(SpdySessionTest, Initialize) {
entries, 0, NetLog::TYPE_HTTP2_SESSION_INITIALIZED, NetLog::PHASE_NONE);
EXPECT_LT(0, pos);
- TestNetLog::CapturedEntry entry = entries[pos];
+ CapturedNetLogEntry entry = entries[pos];
NetLog::Source socket_source;
EXPECT_TRUE(NetLog::Source::FromEventParameters(entry.params.get(),
&socket_source));
@@ -1677,7 +1679,7 @@ TEST_P(SpdySessionTest, NetLogOnSessionGoaway) {
EXPECT_TRUE(session == NULL);
// Check that the NetLog was filled reasonably.
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_LT(0u, entries.size());
@@ -1686,7 +1688,7 @@ TEST_P(SpdySessionTest, NetLogOnSessionGoaway) {
entries, 0, NetLog::TYPE_HTTP2_SESSION_CLOSE, NetLog::PHASE_NONE);
if (pos < static_cast<int>(entries.size())) {
- TestNetLog::CapturedEntry entry = entries[pos];
+ CapturedNetLogEntry entry = entries[pos];
int error_code = 0;
ASSERT_TRUE(entry.GetNetErrorCode(&error_code));
EXPECT_EQ(OK, error_code);
@@ -1721,7 +1723,7 @@ TEST_P(SpdySessionTest, NetLogOnSessionEOF) {
EXPECT_TRUE(session == NULL);
// Check that the NetLog was filled reasonably.
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_LT(0u, entries.size());
@@ -1730,7 +1732,7 @@ TEST_P(SpdySessionTest, NetLogOnSessionEOF) {
entries, 0, NetLog::TYPE_HTTP2_SESSION_CLOSE, NetLog::PHASE_NONE);
if (pos < static_cast<int>(entries.size())) {
- TestNetLog::CapturedEntry entry = entries[pos];
+ CapturedNetLogEntry entry = entries[pos];
int error_code = 0;
ASSERT_TRUE(entry.GetNetErrorCode(&error_code));
EXPECT_EQ(ERR_CONNECTION_CLOSED, error_code);
diff --git a/net/spdy/spdy_stream_unittest.cc b/net/spdy/spdy_stream_unittest.cc
index 3dbe0b1..2db76ed 100644
--- a/net/spdy/spdy_stream_unittest.cc
+++ b/net/spdy/spdy_stream_unittest.cc
@@ -12,7 +12,9 @@
#include "base/strings/string_piece.h"
#include "net/base/completion_callback.h"
#include "net/base/request_priority.h"
+#include "net/log/captured_net_log_entry.h"
#include "net/log/net_log_unittest.h"
+#include "net/log/test_net_log.h"
#include "net/socket/next_proto.h"
#include "net/socket/socket_test_util.h"
#include "net/spdy/buffered_spdy_framer.h"
@@ -293,7 +295,7 @@ TEST_P(SpdyStreamTest, StreamError) {
EXPECT_TRUE(data.at_write_eof());
// Check that the NetLog was filled reasonably.
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_LT(0u, entries.size());
diff --git a/net/udp/udp_socket_unittest.cc b/net/udp/udp_socket_unittest.cc
index d422e4a..f356cee 100644
--- a/net/udp/udp_socket_unittest.cc
+++ b/net/udp/udp_socket_unittest.cc
@@ -19,7 +19,9 @@
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
#include "net/base/test_completion_callback.h"
+#include "net/log/captured_net_log_entry.h"
#include "net/log/net_log_unittest.h"
+#include "net/log/test_net_log.h"
#include "net/test/net_test_suite.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -213,7 +215,7 @@ void UDPSocketTest::ConnectTest(bool use_nonblocking_io) {
client.reset();
// Check the server's log.
- TestNetLog::CapturedEntryList server_entries;
+ CapturedNetLogEntry::List server_entries;
server_log.GetEntries(&server_entries);
EXPECT_EQ(5u, server_entries.size());
EXPECT_TRUE(
@@ -228,7 +230,7 @@ void UDPSocketTest::ConnectTest(bool use_nonblocking_io) {
LogContainsEndEvent(server_entries, 4, NetLog::TYPE_SOCKET_ALIVE));
// Check the client's log.
- TestNetLog::CapturedEntryList client_entries;
+ CapturedNetLogEntry::List client_entries;
client_log.GetEntries(&client_entries);
EXPECT_EQ(7u, client_entries.size());
EXPECT_TRUE(
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index 18ec0f3..ded1f5cc 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -58,6 +58,7 @@
#include "net/http/http_request_headers.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_util.h"
+#include "net/log/captured_net_log_entry.h"
#include "net/log/net_log.h"
#include "net/log/net_log_unittest.h"
#include "net/log/test_net_log.h"
@@ -4163,7 +4164,7 @@ class AsyncDelegateLogger : public base::RefCounted<AsyncDelegateLogger> {
// DELEGATE_INFO NetLog events that an AsyncDelegateLogger should have
// recorded. Returns the index of entry after the expected number of
// events this logged, or entries.size() if there aren't enough entries.
- static size_t CheckDelegateInfo(const TestNetLog::CapturedEntryList& entries,
+ static size_t CheckDelegateInfo(const CapturedNetLogEntry::List& entries,
size_t log_position) {
// There should be 4 DELEGATE_INFO events: Two begins and two ends.
if (log_position + 3 >= entries.size()) {
@@ -4198,7 +4199,7 @@ class AsyncDelegateLogger : public base::RefCounted<AsyncDelegateLogger> {
// Find delegate request begin and end messages for OnBeforeNetworkStart.
// Returns the position of the end message.
static size_t ExpectBeforeNetworkEvents(
- const TestNetLog::CapturedEntryList& entries,
+ const CapturedNetLogEntry::List& entries,
size_t log_position) {
log_position =
ExpectLogContainsSomewhereAfter(entries,
@@ -4465,7 +4466,7 @@ TEST_F(URLRequestTestHTTP, DelegateInfoBeforeStart) {
EXPECT_EQ(URLRequestStatus::SUCCESS, r->status().status());
}
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
net_log_.GetEntries(&entries);
size_t log_position = ExpectLogContainsSomewhereAfter(
entries,
@@ -4510,7 +4511,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateInfo) {
EXPECT_EQ(1, network_delegate.destroyed_requests());
size_t log_position = 0;
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
net_log_.GetEntries(&entries);
for (size_t i = 0; i < 3; ++i) {
log_position = ExpectLogContainsSomewhereAfter(
@@ -4567,7 +4568,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateInfoRedirect) {
EXPECT_EQ(1, network_delegate.destroyed_requests());
size_t log_position = 0;
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
net_log_.GetEntries(&entries);
// The NetworkDelegate logged information in OnBeforeURLRequest,
// OnBeforeSendHeaders, and OnHeadersReceived.
@@ -4649,7 +4650,7 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateInfoAuth) {
EXPECT_EQ(1, network_delegate.destroyed_requests());
size_t log_position = 0;
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
net_log_.GetEntries(&entries);
// The NetworkDelegate should have logged information in OnBeforeURLRequest,
// OnBeforeSendHeaders, OnHeadersReceived, OnAuthRequired, and then again in
@@ -4706,7 +4707,7 @@ TEST_F(URLRequestTestHTTP, URLRequestDelegateInfo) {
EXPECT_EQ(URLRequestStatus::SUCCESS, r->status().status());
}
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
net_log_.GetEntries(&entries);
size_t log_position = 0;
@@ -4759,7 +4760,7 @@ TEST_F(URLRequestTestHTTP, URLRequestDelegateInfoOnRedirect) {
EXPECT_EQ(URLRequestStatus::SUCCESS, r->status().status());
}
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
net_log_.GetEntries(&entries);
// Delegate info should only have been logged in OnReceivedRedirect and
@@ -4821,7 +4822,7 @@ TEST_F(URLRequestTestHTTP, URLRequestDelegateOnRedirectCancelled) {
EXPECT_EQ(URLRequestStatus::CANCELED, r->status().status());
}
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
net_log.GetEntries(&entries);
// Delegate info is always logged in both OnReceivedRedirect and
@@ -7301,7 +7302,7 @@ TEST_F(HTTPSRequestTest, CipherFallbackTest) {
EXPECT_EQ(expected_version,
SSLConnectionStatusToVersion(r->ssl_info().connection_status));
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
net_log.GetEntries(&entries);
ExpectLogContainsSomewhere(entries, 0, NetLog::TYPE_SSL_CIPHER_FALLBACK,
NetLog::PHASE_NONE);