Rename TestNetLog->RecordingTestNetLog and BoundTestNetLog->RecordingBoundTestNetLog
These names are more descriptive and also free up the name TestNetLog
for use in a future CL.
Bug: 177538
Change-Id: I46a0680a690e7868bb4c325cbe27c161c2e95b7d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1912783
Reviewed-by: Brandon Tolsch <[email protected]>
Reviewed-by: Gauthier Ambard <[email protected]>
Reviewed-by: Clark DuVall <[email protected]>
Reviewed-by: Eric Roman <[email protected]>
Commit-Queue: Matt Mueller <[email protected]>
Cr-Commit-Position: refs/heads/master@{#718950}
diff --git a/net/cert/multi_log_ct_verifier_unittest.cc b/net/cert/multi_log_ct_verifier_unittest.cc
index 95f6bc5..513bbaa 100644
--- a/net/cert/multi_log_ct_verifier_unittest.cc
+++ b/net/cert/multi_log_ct_verifier_unittest.cc
@@ -64,7 +64,7 @@
ASSERT_TRUE(embedded_sct_chain_.get());
}
- bool CheckForEmbeddedSCTInNetLog(const TestNetLog& net_log) {
+ bool CheckForEmbeddedSCTInNetLog(const RecordingTestNetLog& net_log) {
auto entries = net_log.GetEntries();
if (entries.size() != 2)
return false;
@@ -114,7 +114,7 @@
// |kLogDescription|.
bool CheckPrecertificateVerification(scoped_refptr<X509Certificate> chain) {
SignedCertificateTimestampAndStatusList scts;
- TestNetLog test_net_log;
+ RecordingTestNetLog test_net_log;
NetLogWithSource net_log = NetLogWithSource::Make(
&test_net_log, NetLogSourceType::SSL_CONNECT_JOB);
verifier_->Verify(kHostname, chain.get(), base::StringPiece(),
diff --git a/net/cookies/cookie_monster_unittest.cc b/net/cookies/cookie_monster_unittest.cc
index a0463cd..f862d7c 100644
--- a/net/cookies/cookie_monster_unittest.cc
+++ b/net/cookies/cookie_monster_unittest.cc
@@ -841,7 +841,7 @@
return false;
}
- TestNetLog net_log_;
+ RecordingTestNetLog net_log_;
};
using CookieMonsterTest = CookieMonsterTestBase<CookieMonsterTestTraits>;
diff --git a/net/dns/host_resolver_manager_fuzzer.cc b/net/dns/host_resolver_manager_fuzzer.cc
index b61f0bdb..2a2828c 100644
--- a/net/dns/host_resolver_manager_fuzzer.cc
+++ b/net/dns/host_resolver_manager_fuzzer.cc
@@ -201,7 +201,7 @@
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
{
FuzzedDataProvider data_provider(data, size);
- net::TestNetLog net_log;
+ net::RecordingTestNetLog net_log;
net::HostResolver::ManagerOptions options;
options.max_concurrent_resolves =
diff --git a/net/dns/host_resolver_manager_unittest.cc b/net/dns/host_resolver_manager_unittest.cc
index dea126f6..7d465e2 100644
--- a/net/dns/host_resolver_manager_unittest.cc
+++ b/net/dns/host_resolver_manager_unittest.cc
@@ -2352,7 +2352,7 @@
nullptr /* net_log */);
// Verify that two consecutive calls return the same value.
- TestNetLog test_net_log;
+ RecordingTestNetLog test_net_log;
NetLogWithSource net_log =
NetLogWithSource::Make(&test_net_log, NetLogSourceType::NONE);
bool result1 = IsIPv6Reachable(net_log);
diff --git a/net/extras/sqlite/sqlite_persistent_cookie_store_unittest.cc b/net/extras/sqlite/sqlite_persistent_cookie_store_unittest.cc
index cc45ba6..51c933b 100644
--- a/net/extras/sqlite/sqlite_persistent_cookie_store_unittest.cc
+++ b/net/extras/sqlite/sqlite_persistent_cookie_store_unittest.cc
@@ -217,7 +217,7 @@
base::ScopedTempDir temp_dir_;
scoped_refptr<SQLitePersistentCookieStore> store_;
std::unique_ptr<CookieCryptor> cookie_crypto_delegate_;
- BoundTestNetLog net_log_;
+ RecordingBoundTestNetLog net_log_;
};
TEST_F(SQLitePersistentCookieStoreTest, TestInvalidMetaTableRecovery) {
@@ -388,7 +388,7 @@
background_task_runner_->PostTask(
FROM_HERE, base::BindOnce(&SQLitePersistentCookieStoreTest::WaitOnDBEvent,
base::Unretained(this)));
- BoundTestNetLog net_log;
+ RecordingBoundTestNetLog net_log;
store_->Load(base::BindOnce(&SQLitePersistentCookieStoreTest::OnLoaded,
base::Unretained(this)),
net_log.bound());
diff --git a/net/http/bidirectional_stream_unittest.cc b/net/http/bidirectional_stream_unittest.cc
index 0e8e18c3c..70e734b1 100644
--- a/net/http/bidirectional_stream_unittest.cc
+++ b/net/http/bidirectional_stream_unittest.cc
@@ -438,7 +438,7 @@
session_ = CreateSpdySession(http_session_.get(), key, net_log_.bound());
}
- BoundTestNetLog net_log_;
+ RecordingBoundTestNetLog net_log_;
SpdyTestUtil spdy_util_;
SpdySessionDependencies session_deps_;
const GURL default_url_;
diff --git a/net/http/http_auth_controller_unittest.cc b/net/http/http_auth_controller_unittest.cc
index 0ffbd99..1f78cacf 100644
--- a/net/http/http_auth_controller_unittest.cc
+++ b/net/http/http_auth_controller_unittest.cc
@@ -137,7 +137,7 @@
// Verify that the controller logs appropriate lifetime events.
TEST(HttpAuthControllerTest, Logging) {
base::test::TaskEnvironment task_environment;
- BoundTestNetLog net_log;
+ RecordingBoundTestNetLog net_log;
RunSingleRoundAuthTest(RUN_HANDLER_SYNC, OK, OK, SCHEME_IS_ENABLED,
net_log.bound());
diff --git a/net/http/http_auth_gssapi_posix_unittest.cc b/net/http/http_auth_gssapi_posix_unittest.cc
index 9f07f64..b921148 100644
--- a/net/http/http_auth_gssapi_posix_unittest.cc
+++ b/net/http/http_auth_gssapi_posix_unittest.cc
@@ -89,7 +89,7 @@
} // namespace
TEST(HttpAuthGSSAPIPOSIXTest, GSSAPIStartup) {
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
// TODO(ahendrickson): Manipulate the libraries and paths to test each of the
// libraries we expect, and also whether or not they have the interface
// functions we want.
@@ -115,7 +115,7 @@
}
TEST(HttpAuthGSSAPIPOSIXTest, CustomLibraryMissing) {
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
std::unique_ptr<GSSAPILibrary> gssapi(
new GSSAPISharedLibrary("/this/library/does/not/exist"));
@@ -131,7 +131,7 @@
}
TEST(HttpAuthGSSAPIPOSIXTest, CustomLibraryExists) {
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
base::FilePath module;
ASSERT_TRUE(base::PathService::Get(base::DIR_MODULE, &module));
auto basename = base::GetNativeLibraryName("test_gssapi");
@@ -151,7 +151,7 @@
}
TEST(HttpAuthGSSAPIPOSIXTest, CustomLibraryMethodsMissing) {
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
base::FilePath module;
ASSERT_TRUE(base::PathService::Get(base::DIR_MODULE, &module));
auto basename = base::GetNativeLibraryName("test_badgssapi");
@@ -277,7 +277,7 @@
}
TEST(HttpAuthGSSAPITest, ParseChallenge_TwoRounds) {
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
// The first round should just have "Negotiate", and the second round should
// have a valid base64 token associated with it.
test::MockGSSAPILibrary mock_library;
diff --git a/net/http/http_auth_handler_unittest.cc b/net/http/http_auth_handler_unittest.cc
index aeca24a..fed5814 100644
--- a/net/http/http_auth_handler_unittest.cc
+++ b/net/http/http_auth_handler_unittest.cc
@@ -36,7 +36,7 @@
TestCompletionCallback test_callback;
HttpAuthChallengeTokenizer tokenizer(challenge.begin(), challenge.end());
HttpAuthHandlerMock mock_handler;
- BoundTestNetLog test_net_log;
+ RecordingBoundTestNetLog test_net_log;
// set_connection_based(true) indicates that the HandleAnotherChallenge()
// call after GenerateAuthToken() is expected and does not result in
diff --git a/net/http/http_auth_sspi_win_unittest.cc b/net/http/http_auth_sspi_win_unittest.cc
index ee05ee1a..09ddf1d 100644
--- a/net/http/http_auth_sspi_win_unittest.cc
+++ b/net/http/http_auth_sspi_win_unittest.cc
@@ -215,7 +215,7 @@
// Test NetLogs produced while going through a full Negotiate handshake.
TEST(HttpAuthSSPITest, GenerateAuthToken_FullHandshake_AmbientCreds_Logging) {
- BoundTestNetLog net_log;
+ RecordingBoundTestNetLog net_log;
MockSSPILibrary mock_library{NEGOSSP_NAME};
HttpAuthSSPI auth_sspi(&mock_library, HttpAuth::AUTH_SCHEME_NEGOTIATE);
std::string first_challenge_text = "Negotiate";
diff --git a/net/http/http_cache_unittest.cc b/net/http/http_cache_unittest.cc
index 13000b0..68480625 100644
--- a/net/http/http_cache_unittest.cc
+++ b/net/http/http_cache_unittest.cc
@@ -709,13 +709,13 @@
// Gets the entries from |net_log| created by the cache layer and asserted on in
// these tests.
std::vector<NetLogEntry> GetFilteredNetLogEntries(
- const BoundTestNetLog& net_log) {
+ const RecordingBoundTestNetLog& net_log) {
auto entries = net_log.GetEntries();
base::EraseIf(entries, ShouldIgnoreLogEntry);
return entries;
}
-bool LogContainsEventType(const BoundTestNetLog& log,
+bool LogContainsEventType(const RecordingBoundTestNetLog& log,
NetLogEventType expected) {
return !log.GetEntriesWithType(expected).empty();
}
@@ -806,7 +806,7 @@
TEST_F(HttpCacheTest, SimpleGET) {
MockHttpCache cache;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
LoadTimingInfo load_timing_info;
// Write to the cache.
@@ -872,7 +872,7 @@
cache.disk_cache()->set_fail_requests(true);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
LoadTimingInfo load_timing_info;
// Read from the network, and don't use the cache.
@@ -1040,7 +1040,7 @@
TEST_F(HttpCacheTest, SimpleGET_LoadOnlyFromCache_Hit) {
MockHttpCache cache;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
LoadTimingInfo load_timing_info;
// Write to the cache.
@@ -1204,7 +1204,7 @@
// the network again.
transaction.load_flags |= LOAD_SKIP_CACHE_VALIDATION;
transaction.request_headers = "Foo: none\r\n";
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
LoadTimingInfo load_timing_info;
RunTransactionTestAndGetTiming(cache.http_cache(), transaction, log.bound(),
&load_timing_info);
@@ -1231,7 +1231,7 @@
// Attempt to read from the cache... we will still load it from network,
// since Vary: * doesn't match.
transaction.load_flags |= LOAD_SKIP_CACHE_VALIDATION;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
LoadTimingInfo load_timing_info;
RunTransactionTestAndGetTiming(cache.http_cache(), transaction, log.bound(),
&load_timing_info);
@@ -1373,7 +1373,7 @@
MockTransaction transaction(kSimpleGET_Transaction);
transaction.load_flags |= LOAD_BYPASS_CACHE;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
LoadTimingInfo load_timing_info;
// Write to the cache.
@@ -1455,7 +1455,7 @@
transaction.load_flags |= LOAD_VALIDATE_CACHE;
HttpResponseInfo response_info;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
LoadTimingInfo load_timing_info;
RunTransactionTestWithResponseInfoAndGetTiming(
cache.http_cache(), transaction, &response_info, log.bound(),
@@ -1497,7 +1497,7 @@
// A normal load does not have |unused_since_prefetch| set.
RunTransactionTestWithResponseInfoAndGetTiming(
cache.http_cache(), kSimpleGET_Transaction, &response_info,
- BoundTestNetLog().bound(), nullptr);
+ RecordingBoundTestNetLog().bound(), nullptr);
EXPECT_FALSE(response_info.unused_since_prefetch);
EXPECT_FALSE(response_info.was_cached);
@@ -1506,28 +1506,28 @@
prefetch_transaction.load_flags |= LOAD_PREFETCH;
RunTransactionTestWithResponseInfoAndGetTiming(
cache.http_cache(), prefetch_transaction, &response_info,
- BoundTestNetLog().bound(), nullptr);
+ RecordingBoundTestNetLog().bound(), nullptr);
EXPECT_FALSE(response_info.unused_since_prefetch);
EXPECT_TRUE(response_info.was_cached);
// A duplicated prefetch has |unused_since_prefetch| set.
RunTransactionTestWithResponseInfoAndGetTiming(
cache.http_cache(), prefetch_transaction, &response_info,
- BoundTestNetLog().bound(), nullptr);
+ RecordingBoundTestNetLog().bound(), nullptr);
EXPECT_TRUE(response_info.unused_since_prefetch);
EXPECT_TRUE(response_info.was_cached);
// |unused_since_prefetch| is still true after two prefetches in a row.
RunTransactionTestWithResponseInfoAndGetTiming(
cache.http_cache(), kSimpleGET_Transaction, &response_info,
- BoundTestNetLog().bound(), nullptr);
+ RecordingBoundTestNetLog().bound(), nullptr);
EXPECT_TRUE(response_info.unused_since_prefetch);
EXPECT_TRUE(response_info.was_cached);
// The resource has now been used, back to normal behavior.
RunTransactionTestWithResponseInfoAndGetTiming(
cache.http_cache(), kSimpleGET_Transaction, &response_info,
- BoundTestNetLog().bound(), nullptr);
+ RecordingBoundTestNetLog().bound(), nullptr);
EXPECT_FALSE(response_info.unused_since_prefetch);
EXPECT_TRUE(response_info.was_cached);
}
@@ -1543,7 +1543,7 @@
// A normal load does not have |restricted_prefetch| set.
RunTransactionTestWithResponseInfoAndGetTiming(
cache.http_cache(), kTypicalGET_Transaction, &response_info,
- BoundTestNetLog().bound(), nullptr);
+ RecordingBoundTestNetLog().bound(), nullptr);
EXPECT_FALSE(response_info.restricted_prefetch);
EXPECT_FALSE(response_info.was_cached);
EXPECT_TRUE(response_info.network_accessed);
@@ -1554,7 +1554,7 @@
prefetch_transaction.load_flags |= LOAD_RESTRICTED_PREFETCH;
RunTransactionTestWithResponseInfoAndGetTiming(
cache.http_cache(), prefetch_transaction, &response_info,
- BoundTestNetLog().bound(), nullptr);
+ RecordingBoundTestNetLog().bound(), nullptr);
EXPECT_TRUE(response_info.restricted_prefetch);
EXPECT_FALSE(response_info.was_cached);
EXPECT_TRUE(response_info.network_accessed);
@@ -1568,7 +1568,7 @@
LOAD_CAN_USE_RESTRICTED_PREFETCH;
RunTransactionTestWithResponseInfoAndGetTiming(
cache.http_cache(), can_use_restricted_prefetch_transaction,
- &response_info, BoundTestNetLog().bound(), nullptr);
+ &response_info, RecordingBoundTestNetLog().bound(), nullptr);
EXPECT_TRUE(response_info.restricted_prefetch);
EXPECT_TRUE(response_info.was_cached);
EXPECT_FALSE(response_info.network_accessed);
@@ -1576,7 +1576,7 @@
// Later reuse is still no longer marked restricted.
RunTransactionTestWithResponseInfoAndGetTiming(
cache.http_cache(), kSimpleGET_Transaction, &response_info,
- BoundTestNetLog().bound(), nullptr);
+ RecordingBoundTestNetLog().bound(), nullptr);
EXPECT_FALSE(response_info.restricted_prefetch);
EXPECT_TRUE(response_info.was_cached);
EXPECT_FALSE(response_info.network_accessed);
@@ -1592,7 +1592,7 @@
prefetch_transaction.load_flags |= LOAD_RESTRICTED_PREFETCH;
RunTransactionTestWithResponseInfoAndGetTiming(
cache.http_cache(), prefetch_transaction, &response_info,
- BoundTestNetLog().bound(), nullptr);
+ RecordingBoundTestNetLog().bound(), nullptr);
EXPECT_TRUE(response_info.restricted_prefetch);
EXPECT_FALSE(response_info.was_cached);
EXPECT_TRUE(response_info.network_accessed);
@@ -1602,7 +1602,7 @@
// |restricted_prefetch|.
RunTransactionTestWithResponseInfoAndGetTiming(
cache.http_cache(), kSimpleGET_Transaction, &response_info,
- BoundTestNetLog().bound(), nullptr);
+ RecordingBoundTestNetLog().bound(), nullptr);
EXPECT_FALSE(response_info.restricted_prefetch);
EXPECT_FALSE(response_info.was_cached);
EXPECT_TRUE(response_info.network_accessed);
@@ -1612,7 +1612,7 @@
// an unrestricted one.
RunTransactionTestWithResponseInfoAndGetTiming(
cache.http_cache(), kSimpleGET_Transaction, &response_info,
- BoundTestNetLog().bound(), nullptr);
+ RecordingBoundTestNetLog().bound(), nullptr);
EXPECT_FALSE(response_info.restricted_prefetch);
EXPECT_TRUE(response_info.was_cached);
EXPECT_FALSE(response_info.network_accessed);
@@ -1627,7 +1627,7 @@
prefetch_transaction.load_flags |= LOAD_PREFETCH;
RunTransactionTestWithResponseInfoAndGetTiming(
cache.http_cache(), prefetch_transaction, &response_info,
- BoundTestNetLog().bound(), nullptr);
+ RecordingBoundTestNetLog().bound(), nullptr);
EXPECT_TRUE(response_info.unused_since_prefetch);
EXPECT_FALSE(response_info.was_cached);
@@ -1635,7 +1635,7 @@
cache.disk_cache()->set_soft_failures_mask(MockDiskEntry::FAIL_WRITE);
RunTransactionTestWithResponseInfoAndGetTiming(
cache.http_cache(), kSimpleGET_Transaction, &response_info,
- BoundTestNetLog().bound(), nullptr);
+ RecordingBoundTestNetLog().bound(), nullptr);
}
static void PreserveRequestHeaders_Handler(const HttpRequestInfo* request,
@@ -5133,7 +5133,7 @@
// Get the same URL again, but this time we expect it to result
// in a conditional request.
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
LoadTimingInfo load_timing_info;
RunTransactionTestAndGetTiming(cache.http_cache(), kTypicalGET_Transaction,
log.bound(), &load_timing_info);
@@ -5171,7 +5171,7 @@
// in a conditional request.
transaction.load_flags = LOAD_VALIDATE_CACHE;
transaction.handler = ETagGet_ConditionalRequest_Handler;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
LoadTimingInfo load_timing_info;
IPEndPoint remote_endpoint;
RunTransactionTestAndGetTimingAndConnectedSocketAddress(
@@ -5249,7 +5249,7 @@
// Read from the cache.
RevalidationServer server;
transaction.handler = server.Handler;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
LoadTimingInfo load_timing_info;
RunTransactionTestAndGetTiming(cache.http_cache(), transaction, log.bound(),
&load_timing_info);
@@ -5283,7 +5283,7 @@
RevalidationServer server;
transaction.handler = server.Handler;
transaction.request_headers = "Foo: none\r\n";
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
LoadTimingInfo load_timing_info;
RunTransactionTestAndGetTiming(cache.http_cache(), transaction, log.bound(),
&load_timing_info);
@@ -5315,7 +5315,7 @@
// Read from the cache and revalidate the entry.
RevalidationServer server;
transaction.handler = server.Handler;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
LoadTimingInfo load_timing_info;
RunTransactionTestAndGetTiming(cache.http_cache(), transaction, log.bound(),
&load_timing_info);
@@ -5348,7 +5348,7 @@
RevalidationServer server;
transaction.handler = server.Handler;
transaction.request_headers = "Foo: none\r\n";
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
LoadTimingInfo load_timing_info;
RunTransactionTestAndGetTiming(cache.http_cache(), transaction, log.bound(),
&load_timing_info);
@@ -7054,7 +7054,7 @@
TEST_F(HttpCacheTest, SimpleGET_DoesntLogHeaders) {
MockHttpCache cache;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
RunTransactionTestWithLog(cache.http_cache(), kSimpleGET_Transaction,
log.bound());
@@ -7065,7 +7065,7 @@
TEST_F(HttpCacheTest, RangeGET_LogsHeaders) {
MockHttpCache cache;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
RunTransactionTestWithLog(cache.http_cache(), kRangeGET_Transaction,
log.bound());
@@ -7076,7 +7076,7 @@
TEST_F(HttpCacheTest, ExternalValidation_LogsHeaders) {
MockHttpCache cache;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
MockTransaction transaction(kSimpleGET_Transaction);
transaction.request_headers = "If-None-Match: foo\r\n" EXTRA_HEADER;
RunTransactionTestWithLog(cache.http_cache(), transaction, log.bound());
@@ -7088,7 +7088,7 @@
TEST_F(HttpCacheTest, SpecialHeaders_LogsHeaders) {
MockHttpCache cache;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
MockTransaction transaction(kSimpleGET_Transaction);
transaction.request_headers = "cache-control: no-cache\r\n" EXTRA_HEADER;
RunTransactionTestWithLog(cache.http_cache(), transaction, log.bound());
@@ -7205,7 +7205,7 @@
RunTransactionTest(cache.http_cache(), transaction);
// Now verify that the cached data is not used.
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
RunTransactionTestWithLog(cache.http_cache(), kRangeGET_TransactionOK,
log.bound());
@@ -7382,7 +7382,7 @@
// Write and read from the cache (20-59).
transaction.request_headers = "Range: bytes = 20-59\r\n" EXTRA_HEADER;
transaction.data = "rg: 20-29 rg: 30-39 rg: 40-49 rg: 50-59 ";
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
LoadTimingInfo load_timing_info;
RunTransactionTestWithResponseAndGetTiming(
cache.http_cache(), transaction, &headers, log.bound(),
@@ -7473,7 +7473,7 @@
// Write and read from the cache (20-59).
transaction.request_headers = "Range: bytes = 20-59\r\n" EXTRA_HEADER;
transaction.data = "rg: 20-29 rg: 30-39 rg: 40-49 rg: 50-59 ";
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
LoadTimingInfo load_timing_info;
RunTransactionTestWithResponseAndGetTiming(
cache.http_cache(), transaction, &headers, log.bound(),
@@ -7540,7 +7540,7 @@
EXPECT_EQ(1, cache.disk_cache()->create_count());
// Read from the cache (40-49).
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
LoadTimingInfo load_timing_info;
RunTransactionTestWithResponseAndGetTiming(
cache.http_cache(), transaction, &headers, log.bound(),
@@ -8039,7 +8039,7 @@
MockHttpCache cache;
AddMockTransaction(&kRangeGET_TransactionOK);
std::string headers;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
LoadTimingInfo load_timing_info;
// Write to the cache (40-49).
@@ -8078,7 +8078,7 @@
MockTransaction transaction(kRangeGET_TransactionOK);
AddMockTransaction(&transaction);
std::string headers;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
LoadTimingInfo load_timing_info;
// Write to the cache (0-9).
@@ -8148,7 +8148,7 @@
transaction2.data = "Not a range";
RangeTransactionServer handler;
handler.set_modified(true);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
LoadTimingInfo load_timing_info;
RunTransactionTestWithResponseAndGetTiming(
cache.http_cache(), transaction2, &headers, log.bound(),
@@ -8195,7 +8195,7 @@
// Now see that we don't use the stored entry.
std::string headers;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
LoadTimingInfo load_timing_info;
RunTransactionTestWithResponseAndGetTiming(
cache.http_cache(), kSimpleGET_Transaction, &headers, log.bound(),
@@ -8806,7 +8806,7 @@
RangeTransactionServer handler;
handler.set_bad_200(true);
transaction.data = "Not a range";
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
RunTransactionTestWithLog(cache.http_cache(), transaction, log.bound());
EXPECT_EQ(3, cache.network_layer()->transaction_count());
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc
index 484535b1..24f707e 100644
--- a/net/http/http_network_transaction_unittest.cc
+++ b/net/http/http_network_transaction_unittest.cc
@@ -451,7 +451,7 @@
request.traffic_annotation =
net::MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
@@ -1634,7 +1634,7 @@
request.traffic_annotation =
net::MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS);
- TestNetLog net_log;
+ RecordingTestNetLog net_log;
session_deps_.net_log = &net_log;
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -1724,7 +1724,7 @@
request.traffic_annotation =
net::MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS);
- TestNetLog net_log;
+ RecordingTestNetLog net_log;
session_deps_.net_log = &net_log;
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -2150,7 +2150,7 @@
request.traffic_annotation =
net::MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS);
- TestNetLog net_log;
+ RecordingTestNetLog net_log;
session_deps_.net_log = &net_log;
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -2574,7 +2574,7 @@
request.traffic_annotation =
net::MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS);
- TestNetLog log;
+ RecordingTestNetLog log;
session_deps_.net_log = &log;
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
@@ -2680,7 +2680,7 @@
request.traffic_annotation =
net::MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS);
- TestNetLog log;
+ RecordingTestNetLog log;
MockHostResolver* resolver = new MockHostResolver();
session_deps_.net_log = &log;
session_deps_.host_resolver.reset(resolver);
@@ -2794,7 +2794,7 @@
request.traffic_annotation =
net::MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS);
- TestNetLog log;
+ RecordingTestNetLog log;
session_deps_.net_log = &log;
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
@@ -2914,7 +2914,7 @@
request.traffic_annotation =
net::MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS);
- TestNetLog log;
+ RecordingTestNetLog log;
session_deps_.net_log = &log;
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -3250,7 +3250,7 @@
session_deps_.proxy_resolution_service =
ProxyResolutionService::CreateFixedFromPacResult(
"PROXY myproxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -3383,7 +3383,7 @@
session_deps_.proxy_resolution_service =
ProxyResolutionService::CreateFixedFromPacResult(
"PROXY myproxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -3512,7 +3512,7 @@
session_deps_.proxy_resolution_service =
ProxyResolutionService::CreateFixed("myproxy:70",
TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -3624,7 +3624,7 @@
session_deps_.proxy_resolution_service =
ProxyResolutionService::CreateFixed("myproxy:70",
TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -3733,7 +3733,7 @@
session_deps_.proxy_resolution_service =
ProxyResolutionService::CreateFixedFromPacResult(
"PROXY myproxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -4007,7 +4007,7 @@
session_deps_.proxy_resolution_service =
ProxyResolutionService::CreateFixedFromPacResult(
"PROXY myproxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -4161,7 +4161,7 @@
session_deps_.proxy_resolution_service =
ProxyResolutionService::CreateFixedFromPacResult(
"PROXY myproxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
session_deps_.key_auth_cache_server_entries_by_network_isolation_key = true;
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -4412,7 +4412,7 @@
session_deps_.proxy_resolution_service =
ProxyResolutionService::CreateFixedFromPacResult(
"HTTPS myproxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
session_deps_.key_auth_cache_server_entries_by_network_isolation_key = true;
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -4782,7 +4782,7 @@
session_deps_.proxy_resolution_service = ProxyResolutionService::CreateFixed(
"myproxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -5817,7 +5817,7 @@
// Configure against proxy server "myproxy:70".
session_deps_.proxy_resolution_service = ProxyResolutionService::CreateFixed(
"myproxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -5921,7 +5921,7 @@
session_deps_.proxy_resolution_service =
ProxyResolutionService::CreateFixedFromPacResult(
"PROXY myproxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -6057,7 +6057,7 @@
// Configure against https proxy server "proxy:70".
session_deps_.proxy_resolution_service = ProxyResolutionService::CreateFixed(
"https://proxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -6120,7 +6120,7 @@
// Configure against https proxy server "proxy:70".
session_deps_.proxy_resolution_service = ProxyResolutionService::CreateFixed(
"https://proxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -6182,7 +6182,7 @@
// Configure SPDY proxy server "proxy:70".
session_deps_.proxy_resolution_service = ProxyResolutionService::CreateFixed(
"https://proxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -6253,7 +6253,7 @@
// Configure against https proxy server "myproxy:70".
session_deps_.proxy_resolution_service = ProxyResolutionService::CreateFixed(
"https://myproxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -6350,7 +6350,7 @@
// Configure against https proxy server "proxy:70".
session_deps_.proxy_resolution_service = ProxyResolutionService::CreateFixed(
"https://proxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -6436,7 +6436,7 @@
// Configure against https proxy server "proxy:70".
session_deps_.proxy_resolution_service = ProxyResolutionService::CreateFixed(
"https://proxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -6528,7 +6528,7 @@
// Configure against https proxy server "proxy:70".
session_deps_.proxy_resolution_service = ProxyResolutionService::CreateFixed(
"https://proxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -6748,7 +6748,7 @@
// Configure against https proxy server "proxy:70".
session_deps_.proxy_resolution_service = ProxyResolutionService::CreateFixed(
"https://proxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(
SpdySessionDependencies::SpdyCreateSession(&session_deps_));
@@ -6886,7 +6886,7 @@
// Configure against https proxy server "proxy:70".
session_deps_.proxy_resolution_service = ProxyResolutionService::CreateFixed(
"https://proxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(
SpdySessionDependencies::SpdyCreateSession(&session_deps_));
@@ -7013,7 +7013,7 @@
// Configure against https proxy server "proxy:70".
session_deps_.proxy_resolution_service = ProxyResolutionService::CreateFixed(
"https://proxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(
SpdySessionDependencies::SpdyCreateSession(&session_deps_));
@@ -7392,7 +7392,7 @@
// Configure against https proxy server "myproxy:70".
session_deps_.proxy_resolution_service = ProxyResolutionService::CreateFixed(
"https://myproxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -10359,7 +10359,7 @@
session_deps_.proxy_resolution_service =
ProxyResolutionService::CreateFixedFromPacResult(
"HTTPS proxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- TestNetLog net_log;
+ RecordingTestNetLog net_log;
session_deps_.net_log = &net_log;
HttpRequestInfo request;
@@ -10424,7 +10424,7 @@
session_deps_.proxy_resolution_service =
ProxyResolutionService::CreateFixedFromPacResult(
"HTTPS proxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- TestNetLog net_log;
+ RecordingTestNetLog net_log;
session_deps_.net_log = &net_log;
const base::TimeDelta kTimeIncrement = base::TimeDelta::FromSeconds(4);
@@ -10492,7 +10492,7 @@
session_deps_.proxy_resolution_service =
ProxyResolutionService::CreateFixedFromPacResult(
"HTTPS proxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- TestNetLog net_log;
+ RecordingTestNetLog net_log;
session_deps_.net_log = &net_log;
HttpRequestInfo request;
@@ -10540,7 +10540,7 @@
session_deps_.proxy_resolution_service =
ProxyResolutionService::CreateFixedFromAutoDetectedPacResult(
"HTTPS proxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- TestNetLog net_log;
+ RecordingTestNetLog net_log;
session_deps_.net_log = &net_log;
HttpRequestInfo request;
@@ -10587,7 +10587,7 @@
base::HistogramTester histograms;
session_deps_.proxy_resolution_service = ProxyResolutionService::CreateFixed(
"https://proxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- TestNetLog net_log;
+ RecordingTestNetLog net_log;
session_deps_.net_log = &net_log;
const base::TimeDelta kTimeIncrement = base::TimeDelta::FromSeconds(4);
@@ -10767,7 +10767,7 @@
session_deps_.proxy_resolution_service =
ProxyResolutionService::CreateFixedFromPacResult(
"HTTPS myproxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -10916,7 +10916,7 @@
session_deps_.proxy_resolution_service =
ProxyResolutionService::CreateFixedFromPacResult(
"HTTPS myproxy:443", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
session_deps_.proxy_resolution_service->SetProxyDelegate(
@@ -11032,7 +11032,7 @@
session_deps_.proxy_resolution_service = ProxyResolutionService::CreateFixed(
"https://myproxy:443", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
// Enable cross-origin push.
@@ -11117,7 +11117,7 @@
// Configure against https proxy server "myproxy:70".
session_deps_.proxy_resolution_service = ProxyResolutionService::CreateFixed(
"https://myproxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
// Enable cross-origin push.
@@ -11704,7 +11704,7 @@
session_deps_.proxy_resolution_service =
ProxyResolutionService::CreateFixedFromPacResult(
"SOCKS myproxy:1080", TRAFFIC_ANNOTATION_FOR_TESTS);
- TestNetLog net_log;
+ RecordingTestNetLog net_log;
session_deps_.net_log = &net_log;
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -11761,7 +11761,7 @@
session_deps_.proxy_resolution_service =
ProxyResolutionService::CreateFixedFromPacResult(
"SOCKS myproxy:1080", TRAFFIC_ANNOTATION_FOR_TESTS);
- TestNetLog net_log;
+ RecordingTestNetLog net_log;
session_deps_.net_log = &net_log;
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -11822,7 +11822,7 @@
session_deps_.proxy_resolution_service = ProxyResolutionService::CreateFixed(
"socks4://myproxy:1080", TRAFFIC_ANNOTATION_FOR_TESTS);
- TestNetLog net_log;
+ RecordingTestNetLog net_log;
session_deps_.net_log = &net_log;
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -11878,7 +11878,7 @@
session_deps_.proxy_resolution_service =
ProxyResolutionService::CreateFixedFromPacResult(
"SOCKS5 myproxy:1080", TRAFFIC_ANNOTATION_FOR_TESTS);
- TestNetLog net_log;
+ RecordingTestNetLog net_log;
session_deps_.net_log = &net_log;
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -11949,7 +11949,7 @@
session_deps_.proxy_resolution_service =
ProxyResolutionService::CreateFixedFromPacResult(
"SOCKS5 myproxy:1080", TRAFFIC_ANNOTATION_FOR_TESTS);
- TestNetLog net_log;
+ RecordingTestNetLog net_log;
session_deps_.net_log = &net_log;
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -14114,7 +14114,7 @@
auto proxy_resolver_factory = std::make_unique<CapturingProxyResolverFactory>(
&capturing_proxy_resolver);
- TestNetLog net_log;
+ RecordingTestNetLog net_log;
session_deps_.proxy_resolution_service =
std::make_unique<ProxyResolutionService>(
@@ -14201,7 +14201,7 @@
std::make_unique<CapturingProxyResolverFactory>(
&capturing_proxy_resolver),
nullptr);
- TestNetLog net_log;
+ RecordingTestNetLog net_log;
session_deps_.net_log = &net_log;
HttpRequestInfo request;
@@ -15676,7 +15676,7 @@
TestCompletionCallback callback;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
int rv = trans->Start(&request, callback.callback(), log.bound());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
trans.reset(); // Cancel the transaction here.
@@ -15740,7 +15740,7 @@
session_deps_.proxy_resolution_service =
ProxyResolutionService::CreateFixedFromPacResult(
"PROXY myproxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -15807,7 +15807,7 @@
session_deps_.proxy_resolution_service =
ProxyResolutionService::CreateFixedFromPacResult(
"PROXY myproxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -15891,7 +15891,7 @@
session_deps_.proxy_resolution_service =
ProxyResolutionService::CreateFixedFromPacResult(
"PROXY myproxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -15967,7 +15967,7 @@
TEST_F(HttpNetworkTransactionTest, ProxyTunnelGetHangup) {
session_deps_.proxy_resolution_service = ProxyResolutionService::CreateFixed(
"myproxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -16336,7 +16336,7 @@
TEST_F(HttpNetworkTransactionTest, ClientAuthCertCache_Proxy_Fail) {
session_deps_.proxy_resolution_service = ProxyResolutionService::CreateFixed(
"https://proxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
auto cert_request = base::MakeRefCounted<SSLCertRequestInfo>();
@@ -16826,7 +16826,7 @@
net::MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS);
HttpNetworkTransaction trans2(DEFAULT_PRIORITY, session.get());
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
rv = trans2.Start(&request2, callback.callback(), log.bound());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -16952,7 +16952,7 @@
net::MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS);
HttpNetworkTransaction trans2(DEFAULT_PRIORITY, session.get());
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
rv = trans2.Start(&request2, callback.callback(), log.bound());
EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
rv = callback.WaitForResult();
@@ -17471,7 +17471,7 @@
session_deps_.proxy_resolution_service =
ProxyResolutionService::CreateFixedFromPacResult(
"HTTPS proxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- TestNetLog log;
+ RecordingTestNetLog log;
session_deps_.net_log = &log;
SSLSocketDataProvider ssl1(ASYNC, OK); // to the proxy
ssl1.next_proto = kProtoHTTP2;
@@ -19565,7 +19565,7 @@
session_deps_.proxy_resolution_service =
ProxyResolutionService::CreateFixedFromPacResult(
"PROXY myproxy:70", TRAFFIC_ANNOTATION_FOR_TESTS);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
session_deps_.net_log = log.bound().net_log();
std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
@@ -20275,7 +20275,7 @@
auto trans2 =
std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
rv = trans2->Start(&request2, callback.callback(), log.bound());
EXPECT_THAT(callback.GetResult(rv), IsOk());
diff --git a/net/http/http_proxy_client_socket_fuzzer.cc b/net/http/http_proxy_client_socket_fuzzer.cc
index 9221e49..a173b38 100644
--- a/net/http/http_proxy_client_socket_fuzzer.cc
+++ b/net/http/http_proxy_client_socket_fuzzer.cc
@@ -36,7 +36,7 @@
// class for details.
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
// Use a test NetLog, to exercise logging code.
- net::TestNetLog test_net_log;
+ net::RecordingTestNetLog test_net_log;
FuzzedDataProvider data_provider(data, size);
diff --git a/net/http/http_stream_factory_job_controller_unittest.cc b/net/http/http_stream_factory_job_controller_unittest.cc
index 21ff3a07..0aa0b37 100644
--- a/net/http/http_stream_factory_job_controller_unittest.cc
+++ b/net/http/http_stream_factory_job_controller_unittest.cc
@@ -321,7 +321,7 @@
void TestMainJobFailsAfterAltJobSucceeded(
bool alt_job_retried_on_non_default_network);
- BoundTestNetLog net_log_;
+ RecordingBoundTestNetLog net_log_;
TestJobFactory job_factory_;
MockHttpStreamRequestDelegate request_delegate_;
MockQuicContext quic_context_;
diff --git a/net/http/http_stream_parser_fuzzer.cc b/net/http/http_stream_parser_fuzzer.cc
index bb5543a..03c2727 100644
--- a/net/http/http_stream_parser_fuzzer.cc
+++ b/net/http/http_stream_parser_fuzzer.cc
@@ -33,7 +33,7 @@
// |data| is used to create a FuzzedSocket.
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
net::TestCompletionCallback callback;
- net::BoundTestNetLog bound_test_net_log;
+ net::RecordingBoundTestNetLog bound_test_net_log;
FuzzedDataProvider data_provider(data, size);
net::FuzzedSocket fuzzed_socket(&data_provider,
bound_test_net_log.bound().net_log());
diff --git a/net/log/net_log_unittest.cc b/net/log/net_log_unittest.cc
index bd7b0f7..8dfef14 100644
--- a/net/log/net_log_unittest.cc
+++ b/net/log/net_log_unittest.cc
@@ -36,7 +36,7 @@
}
TEST(NetLogTest, Basic) {
- TestNetLog net_log;
+ RecordingTestNetLog net_log;
auto entries = net_log.GetEntries();
EXPECT_EQ(0u, entries.size());
@@ -60,7 +60,7 @@
NetLogCaptureMode::kEverything,
};
- TestNetLog net_log;
+ RecordingTestNetLog net_log;
for (NetLogCaptureMode mode : kModes) {
net_log.SetObserverCaptureMode(mode);
diff --git a/net/log/net_log_util_unittest.cc b/net/log/net_log_util_unittest.cc
index a40d6c7d..87c554c 100644
--- a/net/log/net_log_util_unittest.cc
+++ b/net/log/net_log_util_unittest.cc
@@ -78,7 +78,7 @@
}
std::set<URLRequestContext*> contexts;
contexts.insert(&context);
- TestNetLog test_net_log;
+ RecordingTestNetLog test_net_log;
CreateNetLogEntriesForActiveObjects(contexts, test_net_log.GetObserver());
auto entry_list = test_net_log.GetEntries();
ASSERT_EQ(num_requests, entry_list.size());
@@ -109,7 +109,7 @@
contexts[i]->CreateRequest(GURL("about:hats"), DEFAULT_PRIORITY,
&delegate, TRAFFIC_ANNOTATION_FOR_TESTS));
}
- TestNetLog test_net_log;
+ RecordingTestNetLog test_net_log;
CreateNetLogEntriesForActiveObjects(context_set,
test_net_log.GetObserver());
auto entry_list = test_net_log.GetEntries();
diff --git a/net/log/test_net_log.cc b/net/log/test_net_log.cc
index 0bb9ab1..b531f6b 100644
--- a/net/log/test_net_log.cc
+++ b/net/log/test_net_log.cc
@@ -14,15 +14,15 @@
namespace net {
-TestNetLog::TestNetLog() {
+RecordingTestNetLog::RecordingTestNetLog() {
AddObserver(this, NetLogCaptureMode::kIncludeSensitive);
}
-TestNetLog::~TestNetLog() {
+RecordingTestNetLog::~RecordingTestNetLog() {
RemoveObserver(this);
}
-std::vector<NetLogEntry> TestNetLog::GetEntries() const {
+std::vector<NetLogEntry> RecordingTestNetLog::GetEntries() const {
base::AutoLock lock(lock_);
std::vector<NetLogEntry> result;
for (const auto& entry : entry_list_)
@@ -30,7 +30,7 @@
return result;
}
-std::vector<NetLogEntry> TestNetLog::GetEntriesForSource(
+std::vector<NetLogEntry> RecordingTestNetLog::GetEntriesForSource(
NetLogSource source) const {
base::AutoLock lock(lock_);
std::vector<NetLogEntry> result;
@@ -41,7 +41,7 @@
return result;
}
-std::vector<NetLogEntry> TestNetLog::GetEntriesWithType(
+std::vector<NetLogEntry> RecordingTestNetLog::GetEntriesWithType(
NetLogEventType type) const {
base::AutoLock lock(lock_);
std::vector<NetLogEntry> result;
@@ -52,17 +52,17 @@
return result;
}
-size_t TestNetLog::GetSize() const {
+size_t RecordingTestNetLog::GetSize() const {
base::AutoLock lock(lock_);
return entry_list_.size();
}
-void TestNetLog::Clear() {
+void RecordingTestNetLog::Clear() {
base::AutoLock lock(lock_);
entry_list_.clear();
}
-void TestNetLog::OnAddEntry(const NetLogEntry& entry) {
+void RecordingTestNetLog::OnAddEntry(const NetLogEntry& entry) {
base::Value params = entry.params.Clone();
auto time = base::TimeTicks::Now();
@@ -72,44 +72,46 @@
std::move(params));
}
-NetLog::ThreadSafeObserver* TestNetLog::GetObserver() {
+NetLog::ThreadSafeObserver* RecordingTestNetLog::GetObserver() {
return this;
}
-void TestNetLog::SetObserverCaptureMode(NetLogCaptureMode capture_mode) {
+void RecordingTestNetLog::SetObserverCaptureMode(
+ NetLogCaptureMode capture_mode) {
RemoveObserver(this);
AddObserver(this, capture_mode);
}
-BoundTestNetLog::BoundTestNetLog()
+RecordingBoundTestNetLog::RecordingBoundTestNetLog()
: net_log_(NetLogWithSource::Make(&test_net_log_, NetLogSourceType::NONE)) {
}
-BoundTestNetLog::~BoundTestNetLog() = default;
+RecordingBoundTestNetLog::~RecordingBoundTestNetLog() = default;
-std::vector<NetLogEntry> BoundTestNetLog::GetEntries() const {
+std::vector<NetLogEntry> RecordingBoundTestNetLog::GetEntries() const {
return test_net_log_.GetEntries();
}
-std::vector<NetLogEntry> BoundTestNetLog::GetEntriesForSource(
+std::vector<NetLogEntry> RecordingBoundTestNetLog::GetEntriesForSource(
NetLogSource source) const {
return test_net_log_.GetEntriesForSource(source);
}
-std::vector<NetLogEntry> BoundTestNetLog::GetEntriesWithType(
+std::vector<NetLogEntry> RecordingBoundTestNetLog::GetEntriesWithType(
NetLogEventType type) const {
return test_net_log_.GetEntriesWithType(type);
}
-size_t BoundTestNetLog::GetSize() const {
+size_t RecordingBoundTestNetLog::GetSize() const {
return test_net_log_.GetSize();
}
-void BoundTestNetLog::Clear() {
+void RecordingBoundTestNetLog::Clear() {
test_net_log_.Clear();
}
-void BoundTestNetLog::SetObserverCaptureMode(NetLogCaptureMode capture_mode) {
+void RecordingBoundTestNetLog::SetObserverCaptureMode(
+ NetLogCaptureMode capture_mode) {
test_net_log_.SetObserverCaptureMode(capture_mode);
}
diff --git a/net/log/test_net_log.h b/net/log/test_net_log.h
index 96ba8ea..20b8f28 100644
--- a/net/log/test_net_log.h
+++ b/net/log/test_net_log.h
@@ -25,10 +25,10 @@
// SetObserverCaptureMode().
//
// This class is for testing only.
-class TestNetLog : public NetLog, public NetLog::ThreadSafeObserver {
+class RecordingTestNetLog : public NetLog, public NetLog::ThreadSafeObserver {
public:
- TestNetLog();
- ~TestNetLog() override;
+ RecordingTestNetLog();
+ ~RecordingTestNetLog() override;
void SetObserverCaptureMode(NetLogCaptureMode capture_mode);
@@ -59,18 +59,18 @@
mutable base::Lock lock_;
std::vector<NetLogEntry> entry_list_;
- DISALLOW_COPY_AND_ASSIGN(TestNetLog);
+ DISALLOW_COPY_AND_ASSIGN(RecordingTestNetLog);
};
// Helper class that exposes a similar API as NetLogWithSource, but uses a
-// TestNetLog rather than the more generic NetLog.
+// RecordingTestNetLog rather than the more generic NetLog.
//
-// A BoundTestNetLog can easily be converted to a NetLogWithSource using the
-// bound() method.
-class BoundTestNetLog {
+// A RecordingBoundTestNetLog can easily be converted to a NetLogWithSource
+// using the bound() method.
+class RecordingBoundTestNetLog {
public:
- BoundTestNetLog();
- ~BoundTestNetLog();
+ RecordingBoundTestNetLog();
+ ~RecordingBoundTestNetLog();
// The returned NetLogWithSource is only valid while |this| is alive.
NetLogWithSource bound() const { return net_log_; }
@@ -89,14 +89,14 @@
void Clear();
- // Sets the observer capture mode of the underlying TestNetLog.
+ // Sets the observer capture mode of the underlying RecordingTestNetLog.
void SetObserverCaptureMode(NetLogCaptureMode capture_mode);
private:
- TestNetLog test_net_log_;
+ RecordingTestNetLog test_net_log_;
const NetLogWithSource net_log_;
- DISALLOW_COPY_AND_ASSIGN(BoundTestNetLog);
+ DISALLOW_COPY_AND_ASSIGN(RecordingBoundTestNetLog);
};
} // namespace net
diff --git a/net/log/trace_net_log_observer_unittest.cc b/net/log/trace_net_log_observer_unittest.cc
index aed7762..694e7e4 100644
--- a/net/log/trace_net_log_observer_unittest.cc
+++ b/net/log/trace_net_log_observer_unittest.cc
@@ -157,7 +157,7 @@
base::ListValue* trace_events() const { return trace_events_.get(); }
- TestNetLog* net_log() { return &net_log_; }
+ RecordingTestNetLog* net_log() { return &net_log_; }
TraceNetLogObserver* trace_net_log_observer() const {
return trace_net_log_observer_.get();
@@ -167,7 +167,7 @@
std::unique_ptr<base::ListValue> trace_events_;
base::trace_event::TraceResultBuffer trace_buffer_;
base::trace_event::TraceResultBuffer::SimpleOutput json_output_;
- TestNetLog net_log_;
+ RecordingTestNetLog net_log_;
std::unique_ptr<TraceNetLogObserver> trace_net_log_observer_;
};
diff --git a/net/nqe/event_creator_unittest.cc b/net/nqe/event_creator_unittest.cc
index 6bb8a49..cc0af6b 100644
--- a/net/nqe/event_creator_unittest.cc
+++ b/net/nqe/event_creator_unittest.cc
@@ -21,16 +21,14 @@
// Returns the number of entries in |net_log| that have type set to
// |NetLogEventType::NETWORK_QUALITY_CHANGED|.
-int GetNetworkQualityChangedEntriesCount(BoundTestNetLog* net_log) {
+int GetNetworkQualityChangedEntriesCount(RecordingBoundTestNetLog* net_log) {
return net_log->GetEntriesWithType(NetLogEventType::NETWORK_QUALITY_CHANGED)
.size();
}
// Verify that the net log events are recorded correctly.
TEST(NetworkQualityEstimatorEventCreatorTest, Notified) {
- // std::unique_ptr<BoundTestNetLog>
- // net_log(std::make_unique<BoundTestNetLog>());
- BoundTestNetLog net_log;
+ RecordingBoundTestNetLog net_log;
EventCreator event_creator(net_log.bound());
diff --git a/net/nqe/network_quality_estimator_test_util.cc b/net/nqe/network_quality_estimator_test_util.cc
index 25172ad..df53d17e 100644
--- a/net/nqe/network_quality_estimator_test_util.cc
+++ b/net/nqe/network_quality_estimator_test_util.cc
@@ -29,16 +29,17 @@
TestNetworkQualityEstimator::TestNetworkQualityEstimator(
const std::map<std::string, std::string>& variation_params)
- : TestNetworkQualityEstimator(variation_params,
- true,
- true,
- std::make_unique<BoundTestNetLog>()) {}
+ : TestNetworkQualityEstimator(
+ variation_params,
+ true,
+ true,
+ std::make_unique<RecordingBoundTestNetLog>()) {}
TestNetworkQualityEstimator::TestNetworkQualityEstimator(
const std::map<std::string, std::string>& variation_params,
bool allow_local_host_requests_for_tests,
bool allow_smaller_responses_for_tests,
- std::unique_ptr<BoundTestNetLog> net_log)
+ std::unique_ptr<RecordingBoundTestNetLog> net_log)
: TestNetworkQualityEstimator(variation_params,
allow_local_host_requests_for_tests,
allow_smaller_responses_for_tests,
@@ -50,7 +51,7 @@
bool allow_local_host_requests_for_tests,
bool allow_smaller_responses_for_tests,
bool suppress_notifications_for_testing,
- std::unique_ptr<BoundTestNetLog> net_log)
+ std::unique_ptr<RecordingBoundTestNetLog> net_log)
: NetworkQualityEstimator(
std::make_unique<NetworkQualityEstimatorParams>(variation_params),
net_log->bound().net_log()),
@@ -64,18 +65,18 @@
TestNetworkQualityEstimator::TestNetworkQualityEstimator(
std::unique_ptr<NetworkQualityEstimatorParams> params)
- : TestNetworkQualityEstimator(std::move(params),
- std::make_unique<BoundTestNetLog>()) {}
+ : TestNetworkQualityEstimator(
+ std::move(params),
+ std::make_unique<RecordingBoundTestNetLog>()) {}
TestNetworkQualityEstimator::TestNetworkQualityEstimator(
std::unique_ptr<NetworkQualityEstimatorParams> params,
- std::unique_ptr<BoundTestNetLog> net_log)
+ std::unique_ptr<RecordingBoundTestNetLog> net_log)
: NetworkQualityEstimator(std::move(params), net_log->bound().net_log()),
net_log_(std::move(net_log)),
current_network_type_(NetworkChangeNotifier::CONNECTION_UNKNOWN),
embedded_test_server_(base::FilePath(kTestFilePath)),
- suppress_notifications_for_testing_(false) {
-}
+ suppress_notifications_for_testing_(false) {}
TestNetworkQualityEstimator::~TestNetworkQualityEstimator() = default;
diff --git a/net/nqe/network_quality_estimator_test_util.h b/net/nqe/network_quality_estimator_test_util.h
index b4ea72f3..c0b715079 100644
--- a/net/nqe/network_quality_estimator_test_util.h
+++ b/net/nqe/network_quality_estimator_test_util.h
@@ -40,14 +40,14 @@
const std::map<std::string, std::string>& variation_params,
bool allow_local_host_requests_for_tests,
bool allow_smaller_responses_for_tests,
- std::unique_ptr<BoundTestNetLog> net_log);
+ std::unique_ptr<RecordingBoundTestNetLog> net_log);
TestNetworkQualityEstimator(
const std::map<std::string, std::string>& variation_params,
bool allow_local_host_requests_for_tests,
bool allow_smaller_responses_for_tests,
bool suppress_notifications_for_testing,
- std::unique_ptr<BoundTestNetLog> net_log);
+ std::unique_ptr<RecordingBoundTestNetLog> net_log);
explicit TestNetworkQualityEstimator(
std::unique_ptr<NetworkQualityEstimatorParams> params);
@@ -233,7 +233,7 @@
TestNetworkQualityEstimator(
std::unique_ptr<NetworkQualityEstimatorParams> params,
- std::unique_ptr<BoundTestNetLog> net_log);
+ std::unique_ptr<RecordingBoundTestNetLog> net_log);
void RecordSpdyPingLatency(const HostPortPair& host_port_pair,
base::TimeDelta rtt) override;
@@ -246,7 +246,7 @@
base::Optional<net::EffectiveConnectionType> GetOverrideECT() const override;
// Net log provided to network quality estimator.
- std::unique_ptr<net::BoundTestNetLog> net_log_;
+ std::unique_ptr<net::RecordingBoundTestNetLog> net_log_;
// If set, GetEffectiveConnectionType() and GetRecentEffectiveConnectionType()
// would return the set values, respectively.
diff --git a/net/nqe/network_quality_estimator_unittest.cc b/net/nqe/network_quality_estimator_unittest.cc
index 6b95d86..7dd538e 100644
--- a/net/nqe/network_quality_estimator_unittest.cc
+++ b/net/nqe/network_quality_estimator_unittest.cc
@@ -779,8 +779,9 @@
TestRTTObserver rtt_observer;
TestThroughputObserver throughput_observer;
std::map<std::string, std::string> variation_params;
- TestNetworkQualityEstimator estimator(variation_params, false, false,
- std::make_unique<BoundTestNetLog>());
+ TestNetworkQualityEstimator estimator(
+ variation_params, false, false,
+ std::make_unique<RecordingBoundTestNetLog>());
// Default observations should be added when constructing the |estimator|.
histogram_tester.ExpectBucketCount(
@@ -920,8 +921,9 @@
// Negative variation value should not be used.
variation_params["2G.DefaultMedianTransportRTTMsec"] = "-5";
- TestNetworkQualityEstimator estimator(variation_params, false, false,
- std::make_unique<BoundTestNetLog>());
+ TestNetworkQualityEstimator estimator(
+ variation_params, false, false,
+ std::make_unique<RecordingBoundTestNetLog>());
estimator.SimulateNetworkChange(
NetworkChangeNotifier::ConnectionType::CONNECTION_UNKNOWN, "unknown-1");
@@ -1443,10 +1445,10 @@
};
for (const auto& test : tests) {
- TestNetworkQualityEstimator estimator(variation_params,
- test.allow_small_localhost_requests,
- test.allow_small_localhost_requests,
- std::make_unique<BoundTestNetLog>());
+ TestNetworkQualityEstimator estimator(
+ variation_params, test.allow_small_localhost_requests,
+ test.allow_small_localhost_requests,
+ std::make_unique<RecordingBoundTestNetLog>());
base::TimeDelta rtt;
EXPECT_FALSE(
@@ -2162,8 +2164,9 @@
std::map<std::string, std::string> variation_params;
variation_params["persistent_cache_reading_enabled"] = "true";
variation_params["throughput_min_requests_in_flight"] = "1";
- TestNetworkQualityEstimator estimator(variation_params, true, true,
- std::make_unique<BoundTestNetLog>());
+ TestNetworkQualityEstimator estimator(
+ variation_params, true, true,
+ std::make_unique<RecordingBoundTestNetLog>());
estimator.SetTickClockForTesting(&tick_clock);
estimator.SimulateNetworkChange(
NetworkChangeNotifier::ConnectionType::CONNECTION_2G, "test");
@@ -2547,8 +2550,9 @@
variation_params["add_default_platform_observations"] = "false";
// Disable default platform values so that the effect of cached estimates
// at the time of startup can be studied in isolation.
- TestNetworkQualityEstimator estimator(variation_params, true, true,
- std::make_unique<BoundTestNetLog>());
+ TestNetworkQualityEstimator estimator(
+ variation_params, true, true,
+ std::make_unique<RecordingBoundTestNetLog>());
// Add observers.
TestRTTObserver rtt_observer;
@@ -2658,8 +2662,9 @@
// Disable default platform values so that the effect of cached estimates
// at the time of startup can be studied in isolation.
- TestNetworkQualityEstimator estimator(variation_params, true, true,
- std::make_unique<BoundTestNetLog>());
+ TestNetworkQualityEstimator estimator(
+ variation_params, true, true,
+ std::make_unique<RecordingBoundTestNetLog>());
// Add observers.
TestRTTObserver rtt_observer;
@@ -2748,8 +2753,9 @@
variation_params["add_default_platform_observations"] = "false";
// Disable default platform values so that the effect of cached estimates
// at the time of startup can be studied in isolation.
- TestNetworkQualityEstimator estimator(variation_params, true, true,
- std::make_unique<BoundTestNetLog>());
+ TestNetworkQualityEstimator estimator(
+ variation_params, true, true,
+ std::make_unique<RecordingBoundTestNetLog>());
// Add observers.
TestRTTObserver rtt_observer;
diff --git a/net/nqe/network_quality_estimator_util_unittest.cc b/net/nqe/network_quality_estimator_util_unittest.cc
index 3659ef0..dac7d5dd 100644
--- a/net/nqe/network_quality_estimator_util_unittest.cc
+++ b/net/nqe/network_quality_estimator_util_unittest.cc
@@ -35,8 +35,6 @@
TEST(NetworkQualityEstimatorUtilTest, ReservedHost) {
base::test::TaskEnvironment task_environment;
- std::unique_ptr<BoundTestNetLog> net_log =
- std::make_unique<BoundTestNetLog>();
MockCachingHostResolver mock_host_resolver;
scoped_refptr<net::RuleBasedHostResolverProc> rules(
@@ -92,8 +90,6 @@
TEST(NetworkQualityEstimatorUtilTest, ReservedHostUncached) {
base::test::TaskEnvironment task_environment;
- std::unique_ptr<BoundTestNetLog> net_log =
- std::make_unique<BoundTestNetLog>();
MockCachingHostResolver mock_host_resolver;
scoped_refptr<net::RuleBasedHostResolverProc> rules(
@@ -135,8 +131,6 @@
base::test::TaskEnvironment task_environment;
- std::unique_ptr<BoundTestNetLog> net_log =
- std::make_unique<BoundTestNetLog>();
MockCachingHostResolver mock_host_resolver;
scoped_refptr<net::RuleBasedHostResolverProc> rules(
@@ -176,9 +170,9 @@
TEST(NetworkQualityEstimatorUtilTest, Localhost) {
base::test::TaskEnvironment task_environment;
- std::unique_ptr<BoundTestNetLog> net_log =
- std::make_unique<BoundTestNetLog>();
- BoundTestNetLog* net_log_ptr = net_log.get();
+ std::unique_ptr<RecordingBoundTestNetLog> net_log =
+ std::make_unique<RecordingBoundTestNetLog>();
+ RecordingBoundTestNetLog* net_log_ptr = net_log.get();
// Use actual HostResolver since MockCachingHostResolver does not determine
// the correct answer for localhosts.
diff --git a/net/nqe/throughput_analyzer_unittest.cc b/net/nqe/throughput_analyzer_unittest.cc
index 0f50e4a..259b80c 100644
--- a/net/nqe/throughput_analyzer_unittest.cc
+++ b/net/nqe/throughput_analyzer_unittest.cc
@@ -63,7 +63,7 @@
&TestThroughputAnalyzer::OnNewThroughputObservationAvailable,
base::Unretained(this)),
tick_clock,
- std::make_unique<BoundTestNetLog>()->bound()),
+ std::make_unique<RecordingBoundTestNetLog>()->bound()),
throughput_observations_received_(0),
bits_received_(0) {}
diff --git a/net/proxy_resolution/multi_threaded_proxy_resolver_unittest.cc b/net/proxy_resolution/multi_threaded_proxy_resolver_unittest.cc
index 40ae0fb..2a7150a 100644
--- a/net/proxy_resolution/multi_threaded_proxy_resolver_unittest.cc
+++ b/net/proxy_resolution/multi_threaded_proxy_resolver_unittest.cc
@@ -274,7 +274,7 @@
// Start request 0.
int rv;
TestCompletionCallback callback0;
- BoundTestNetLog log0;
+ RecordingBoundTestNetLog log0;
ProxyInfo results0;
rv = resolver().GetProxyForURL(GURL("http://request0"), NetworkIsolationKey(),
&results0, callback0.callback(), nullptr,
@@ -350,7 +350,7 @@
std::unique_ptr<ProxyResolver::Request> request0;
TestCompletionCallback callback0;
ProxyInfo results0;
- BoundTestNetLog log0;
+ RecordingBoundTestNetLog log0;
rv = resolver().GetProxyForURL(GURL("http://request0"), NetworkIsolationKey(),
&results0, callback0.callback(), &request0,
log0.bound());
@@ -360,7 +360,7 @@
TestCompletionCallback callback1;
ProxyInfo results1;
- BoundTestNetLog log1;
+ RecordingBoundTestNetLog log1;
rv = resolver().GetProxyForURL(GURL("http://request1"), NetworkIsolationKey(),
&results1, callback1.callback(), nullptr,
log1.bound());
@@ -369,7 +369,7 @@
std::unique_ptr<ProxyResolver::Request> request2;
TestCompletionCallback callback2;
ProxyInfo results2;
- BoundTestNetLog log2;
+ RecordingBoundTestNetLog log2;
rv = resolver().GetProxyForURL(GURL("http://request2"), NetworkIsolationKey(),
&results2, callback2.callback(), &request2,
log2.bound());
diff --git a/net/proxy_resolution/pac_file_decider_unittest.cc b/net/proxy_resolution/pac_file_decider_unittest.cc
index 87b3cb34..800f8ee 100644
--- a/net/proxy_resolution/pac_file_decider_unittest.cc
+++ b/net/proxy_resolution/pac_file_decider_unittest.cc
@@ -208,7 +208,7 @@
Rules::Rule rule = rules.AddSuccessRule("http://custom/proxy.pac");
TestCompletionCallback callback;
- TestNetLog log;
+ RecordingTestNetLog log;
PacFileDecider decider(&fetcher, &dhcp_fetcher, &log);
EXPECT_THAT(decider.Start(ProxyConfigWithAnnotation(
config, TRAFFIC_ANNOTATION_FOR_TESTS),
@@ -246,7 +246,7 @@
rules.AddFailDownloadRule("http://custom/proxy.pac");
TestCompletionCallback callback;
- TestNetLog log;
+ RecordingTestNetLog log;
PacFileDecider decider(&fetcher, &dhcp_fetcher, &log);
EXPECT_THAT(decider.Start(ProxyConfigWithAnnotation(
config, TRAFFIC_ANNOTATION_FOR_TESTS),
@@ -525,7 +525,7 @@
Rules::Rule rule = rules.AddSuccessRule("http://custom/proxy.pac");
TestCompletionCallback callback;
- TestNetLog log;
+ RecordingTestNetLog log;
PacFileDecider decider(&fetcher, &dhcp_fetcher, &log);
EXPECT_THAT(decider.Start(ProxyConfigWithAnnotation(
@@ -636,7 +636,7 @@
rules.AddFailDownloadRule("http://custom/proxy.pac");
TestCompletionCallback callback;
- TestNetLog log;
+ RecordingTestNetLog log;
PacFileDecider decider(&fetcher, &dhcp_fetcher, &log);
EXPECT_THAT(
decider.Start(
@@ -679,7 +679,7 @@
rules.AddFailDownloadRule("http://custom/proxy.pac");
TestCompletionCallback callback;
- TestNetLog log;
+ RecordingTestNetLog log;
PacFileDecider decider(&fetcher, &dhcp_fetcher, &log);
EXPECT_THAT(
decider.Start(
diff --git a/net/proxy_resolution/proxy_resolution_service_unittest.cc b/net/proxy_resolution/proxy_resolution_service_unittest.cc
index c147938..4cfa4c7 100644
--- a/net/proxy_resolution/proxy_resolution_service_unittest.cc
+++ b/net/proxy_resolution/proxy_resolution_service_unittest.cc
@@ -397,7 +397,7 @@
ProxyInfo info;
TestCompletionCallback callback;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
std::unique_ptr<ProxyResolutionService::Request> request;
int rv =
service.ResolveProxy(url, std::string(), NetworkIsolationKey(), &info,
@@ -436,7 +436,7 @@
ProxyInfo info;
TestCompletionCallback callback;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
// First, warm up the ProxyResolutionService and fake an error to mark the
// first server as bad.
@@ -502,7 +502,7 @@
ProxyInfo info;
TestCompletionCallback callback;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
// First, warm up the ProxyResolutionService.
std::unique_ptr<ProxyResolutionService::Request> request;
@@ -808,7 +808,7 @@
ProxyInfo info;
TestCompletionCallback callback;
std::unique_ptr<ProxyResolutionService::Request> request;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
int rv;
{
@@ -898,7 +898,7 @@
ProxyInfo info;
TestCompletionCallback callback;
std::unique_ptr<ProxyResolutionService::Request> request;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
int rv =
service.ResolveProxy(url, std::string(), NetworkIsolationKey(), &info,
@@ -2472,7 +2472,7 @@
ProxyInfo info1;
TestCompletionCallback callback1;
std::unique_ptr<ProxyResolutionService::Request> request1;
- BoundTestNetLog log1;
+ RecordingBoundTestNetLog log1;
int rv = service.ResolveProxy(GURL("http://request1"), std::string(),
NetworkIsolationKey(), &info1,
callback1.callback(), &request1, log1.bound());
@@ -2977,7 +2977,7 @@
MockAsyncProxyResolverFactory* factory =
new MockAsyncProxyResolverFactory(true);
- TestNetLog log;
+ RecordingTestNetLog log;
ProxyResolutionService service(base::WrapUnique(config_service),
base::WrapUnique(factory), &log);
diff --git a/net/quic/bidirectional_stream_quic_impl_unittest.cc b/net/quic/bidirectional_stream_quic_impl_unittest.cc
index f8703ef1..cb4506c0 100644
--- a/net/quic/bidirectional_stream_quic_impl_unittest.cc
+++ b/net/quic/bidirectional_stream_quic_impl_unittest.cc
@@ -818,7 +818,7 @@
ExpectLoadTimingHasOnlyConnectionTimes(load_timing_info);
}
- const BoundTestNetLog& net_log() const { return net_log_; }
+ const RecordingBoundTestNetLog& net_log() const { return net_log_; }
QuicChromiumClientSession* session() const { return session_.get(); }
@@ -841,7 +841,7 @@
QuicFlagSaver saver_;
const quic::ParsedQuicVersion version_;
const bool client_headers_include_h2_stream_dependency_;
- BoundTestNetLog net_log_;
+ RecordingBoundTestNetLog net_log_;
scoped_refptr<TestTaskRunner> runner_;
std::unique_ptr<MockWrite[]> mock_writes_;
quic::MockClock clock_;
diff --git a/net/quic/quic_chromium_client_session_test.cc b/net/quic/quic_chromium_client_session_test.cc
index 4b91f17..78622bd 100644
--- a/net/quic/quic_chromium_client_session_test.cc
+++ b/net/quic/quic_chromium_client_session_test.cc
@@ -259,8 +259,8 @@
const bool client_headers_include_h2_stream_dependency_;
QuicFlagSaver flags_; // Save/restore all QUIC flag values.
quic::QuicCryptoClientConfig crypto_config_;
- TestNetLog net_log_;
- BoundTestNetLog bound_test_net_log_;
+ RecordingTestNetLog net_log_;
+ RecordingBoundTestNetLog bound_test_net_log_;
MockClientSocketFactory socket_factory_;
std::unique_ptr<MockRead> default_read_;
std::unique_ptr<SequencedSocketData> socket_data_;
diff --git a/net/quic/quic_connectivity_probing_manager_test.cc b/net/quic/quic_connectivity_probing_manager_test.cc
index 425c00d..c29be701 100644
--- a/net/quic/quic_connectivity_probing_manager_test.cc
+++ b/net/quic/quic_connectivity_probing_manager_test.cc
@@ -140,8 +140,8 @@
quic::MockClock clock_;
MockClientSocketFactory socket_factory_;
- TestNetLog net_log_;
- BoundTestNetLog bound_test_net_log_;
+ RecordingTestNetLog net_log_;
+ RecordingBoundTestNetLog bound_test_net_log_;
DISALLOW_COPY_AND_ASSIGN(QuicConnectivityProbingManagerTest);
};
diff --git a/net/quic/quic_http_stream_test.cc b/net/quic/quic_http_stream_test.cc
index 2c6b177..1a058f9 100644
--- a/net/quic/quic_http_stream_test.cc
+++ b/net/quic/quic_http_stream_test.cc
@@ -698,7 +698,7 @@
const quic::ParsedQuicVersion version_;
const bool client_headers_include_h2_stream_dependency_;
- BoundTestNetLog net_log_;
+ RecordingBoundTestNetLog net_log_;
quic::test::MockSendAlgorithm* send_algorithm_;
scoped_refptr<TestTaskRunner> runner_;
std::unique_ptr<MockWrite[]> mock_writes_;
diff --git a/net/quic/quic_network_transaction_unittest.cc b/net/quic/quic_network_transaction_unittest.cc
index cff1ff4f..c21a2853 100644
--- a/net/quic/quic_network_transaction_unittest.cc
+++ b/net/quic/quic_network_transaction_unittest.cc
@@ -1047,7 +1047,7 @@
HttpNetworkSession::Params session_params_;
HttpNetworkSession::Context session_context_;
HttpRequestInfo request_;
- BoundTestNetLog net_log_;
+ RecordingBoundTestNetLog net_log_;
std::vector<std::unique_ptr<StaticSocketDataProvider>> hanging_data_;
SSLSocketDataProvider ssl_data_;
std::unique_ptr<ScopedMockNetworkChangeNotifier> scoped_mock_change_notifier_;
@@ -7583,7 +7583,7 @@
std::unique_ptr<ProxyResolutionService> proxy_resolution_service_;
std::unique_ptr<HttpAuthHandlerFactory> auth_handler_factory_;
HttpServerProperties http_server_properties_;
- BoundTestNetLog net_log_;
+ RecordingBoundTestNetLog net_log_;
MockCryptoClientStreamFactory crypto_client_stream_factory_;
std::vector<std::unique_ptr<StaticSocketDataProvider>>
static_socket_data_provider_vector_;
diff --git a/net/quic/quic_proxy_client_socket_unittest.cc b/net/quic/quic_proxy_client_socket_unittest.cc
index 49ea31b..4779e78a 100644
--- a/net/quic/quic_proxy_client_socket_unittest.cc
+++ b/net/quic/quic_proxy_client_socket_unittest.cc
@@ -573,7 +573,7 @@
return std::string(buffer.get(), header_length);
}
- BoundTestNetLog net_log_;
+ RecordingBoundTestNetLog net_log_;
QuicFlagSaver saver_;
const quic::ParsedQuicVersion version_;
const quic::QuicStreamId client_data_stream_id1_;
diff --git a/net/server/http_server_fuzzer.cc b/net/server/http_server_fuzzer.cc
index 9f7aa9c1..0509bde4c 100644
--- a/net/server/http_server_fuzzer.cc
+++ b/net/server/http_server_fuzzer.cc
@@ -95,7 +95,7 @@
//
// |data| is used to create a FuzzedServerSocket.
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
- net::TestNetLog test_net_log;
+ net::RecordingTestNetLog test_net_log;
FuzzedDataProvider data_provider(data, size);
std::unique_ptr<net::ServerSocket> server_socket(
diff --git a/net/socket/client_socket_pool_base_unittest.cc b/net/socket/client_socket_pool_base_unittest.cc
index 9371ec4..6d7ee44 100644
--- a/net/socket/client_socket_pool_base_unittest.cc
+++ b/net/socket/client_socket_pool_base_unittest.cc
@@ -701,7 +701,7 @@
// synchronous completions are not registered by this count.
size_t completion_count() const { return test_base_.completion_count(); }
- TestNetLog net_log_;
+ RecordingTestNetLog net_log_;
bool connect_backup_jobs_enabled_;
MockClientSocketFactory client_socket_factory_;
TestConnectJobFactory* connect_job_factory_;
@@ -719,7 +719,7 @@
TestCompletionCallback callback;
ClientSocketHandle handle;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
TestLoadTimingInfoNotConnected(handle);
EXPECT_EQ(OK, handle.Init(
@@ -754,7 +754,7 @@
CreatePool(kDefaultMaxSockets, kDefaultMaxSocketsPerGroup);
connect_job_factory_->set_job_type(TestConnectJob::kMockFailingJob);
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
ClientSocketHandle handle;
TestCompletionCallback callback;
@@ -1896,7 +1896,7 @@
CreatePool(kDefaultMaxSockets, kDefaultMaxSocketsPerGroup);
ClientSocketHandle handle;
TestCompletionCallback callback;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
int rv = handle.Init(
TestGroupId("a"), params_, base::nullopt, LOWEST, SocketTag(),
ClientSocketPool::RespectLimits::ENABLED, callback.callback(),
@@ -1910,7 +1910,7 @@
TEST_F(ClientSocketPoolBaseTest, CloseIdleSocketsInGroupForced) {
CreatePool(kDefaultMaxSockets, kDefaultMaxSocketsPerGroup);
TestCompletionCallback callback;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
ClientSocketHandle handle1;
int rv = handle1.Init(
TestGroupId("a"), params_, base::nullopt, LOWEST, SocketTag(),
@@ -1940,7 +1940,7 @@
CreatePool(kDefaultMaxSockets, kDefaultMaxSocketsPerGroup);
ClientSocketHandle handle;
TestCompletionCallback callback;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
int rv = handle.Init(
TestGroupId("a"), params_, base::nullopt, LOWEST, SocketTag(),
ClientSocketPool::RespectLimits::ENABLED, callback.callback(),
@@ -2007,7 +2007,7 @@
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
ClientSocketHandle handle;
TestCompletionCallback callback;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
int rv = handle.Init(
TestGroupId("a"), params_, base::nullopt, LOWEST, SocketTag(),
ClientSocketPool::RespectLimits::ENABLED, callback.callback(),
@@ -2048,7 +2048,7 @@
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingFailingJob);
ClientSocketHandle handle;
TestCompletionCallback callback;
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
// Set the additional error state members to ensure that they get cleared.
handle.set_is_ssl_error(true);
handle.set_ssl_cert_request_info(base::MakeRefCounted<SSLCertRequestInfo>());
@@ -2112,7 +2112,7 @@
SocketTag(), ClientSocketPool::RespectLimits::ENABLED,
callback.callback(), ClientSocketPool::ProxyAuthCallback(),
pool_.get(), NetLogWithSource()));
- BoundTestNetLog log2;
+ RecordingBoundTestNetLog log2;
EXPECT_EQ(
ERR_IO_PENDING,
handle2.Init(TestGroupId("a"), params_, base::nullopt, DEFAULT_PRIORITY,
@@ -2534,7 +2534,7 @@
// Request a new socket. This should reuse the old socket and complete
// synchronously.
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
rv = handle.Init(
TestGroupId("a"), params_, base::nullopt, LOWEST, SocketTag(),
ClientSocketPool::RespectLimits::ENABLED, CompletionOnceCallback(),
@@ -2610,7 +2610,7 @@
// Request a new socket. This should cleanup the unused and timed out ones.
// A new socket will be created rather than reusing the idle one.
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
TestCompletionCallback callback3;
rv = handle.Init(TestGroupId("a"), params_, base::nullopt, LOWEST,
SocketTag(), ClientSocketPool::RespectLimits::ENABLED,
diff --git a/net/socket/connect_job_unittest.cc b/net/socket/connect_job_unittest.cc
index 208e8579..242cd9a 100644
--- a/net/socket/connect_job_unittest.cc
+++ b/net/socket/connect_job_unittest.cc
@@ -109,7 +109,7 @@
protected:
base::test::TaskEnvironment task_environment_;
- TestNetLog net_log_;
+ RecordingTestNetLog net_log_;
const CommonConnectJobParams common_connect_job_params_;
TestConnectJobDelegate delegate_;
};
diff --git a/net/socket/socks5_client_socket_fuzzer.cc b/net/socket/socks5_client_socket_fuzzer.cc
index 1437ede..6e79976 100644
--- a/net/socket/socks5_client_socket_fuzzer.cc
+++ b/net/socket/socks5_client_socket_fuzzer.cc
@@ -26,7 +26,7 @@
// class for details.
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
// Use a test NetLog, to exercise logging code.
- net::TestNetLog test_net_log;
+ net::RecordingTestNetLog test_net_log;
FuzzedDataProvider data_provider(data, size);
diff --git a/net/socket/socks5_client_socket_unittest.cc b/net/socket/socks5_client_socket_unittest.cc
index 3d790701..51e10310 100644
--- a/net/socket/socks5_client_socket_unittest.cc
+++ b/net/socket/socks5_client_socket_unittest.cc
@@ -57,7 +57,7 @@
protected:
const uint16_t kNwPort;
- TestNetLog net_log_;
+ RecordingTestNetLog net_log_;
std::unique_ptr<SOCKS5ClientSocket> user_sock_;
AddressList address_list_;
// Filled in by BuildMockSocket() and owned by its return value
@@ -359,7 +359,7 @@
TEST_F(SOCKS5ClientSocketTest, Tag) {
StaticSocketDataProvider data;
- TestNetLog log;
+ RecordingTestNetLog log;
MockTaggingStreamSocket* tagging_sock =
new MockTaggingStreamSocket(std::unique_ptr<StreamSocket>(
new MockTCPClientSocket(address_list_, &log, &data)));
diff --git a/net/socket/socks_client_socket_fuzzer.cc b/net/socket/socks_client_socket_fuzzer.cc
index 8b6c05a..ebf9849 100644
--- a/net/socket/socks_client_socket_fuzzer.cc
+++ b/net/socket/socks_client_socket_fuzzer.cc
@@ -27,7 +27,7 @@
// class for details.
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
// Use a test NetLog, to exercise logging code.
- net::TestNetLog test_net_log;
+ net::RecordingTestNetLog test_net_log;
FuzzedDataProvider data_provider(data, size);
diff --git a/net/socket/socks_client_socket_unittest.cc b/net/socket/socks_client_socket_unittest.cc
index 0861279..e974ca0 100644
--- a/net/socket/socks_client_socket_unittest.cc
+++ b/net/socket/socks_client_socket_unittest.cc
@@ -113,7 +113,7 @@
MockRead data_reads[] = {
MockRead(ASYNC, kSOCKS4OkReply, kSOCKS4OkReplyLength),
MockRead(ASYNC, payload_read.data(), payload_read.size())};
- TestNetLog log;
+ RecordingTestNetLog log;
user_sock_ = BuildMockSocket(data_reads, data_writes, host_resolver_.get(),
"localhost", 80, &log);
@@ -232,7 +232,7 @@
kSOCKS4OkRequestLocalHostPort80Length)};
MockRead data_reads[] = {
MockRead(SYNCHRONOUS, test.fail_reply, base::size(test.fail_reply))};
- TestNetLog log;
+ RecordingTestNetLog log;
user_sock_ = BuildMockSocket(data_reads, data_writes, host_resolver_.get(),
"localhost", 80, &log);
@@ -265,7 +265,7 @@
MockRead data_reads[] = {
MockRead(ASYNC, kSOCKSPartialReply1, base::size(kSOCKSPartialReply1)),
MockRead(ASYNC, kSOCKSPartialReply2, base::size(kSOCKSPartialReply2))};
- TestNetLog log;
+ RecordingTestNetLog log;
user_sock_ = BuildMockSocket(data_reads, data_writes, host_resolver_.get(),
"localhost", 80, &log);
@@ -299,7 +299,7 @@
};
MockRead data_reads[] = {
MockRead(ASYNC, kSOCKS4OkReply, kSOCKS4OkReplyLength)};
- TestNetLog log;
+ RecordingTestNetLog log;
user_sock_ = BuildMockSocket(data_reads, data_writes, host_resolver_.get(),
"localhost", 80, &log);
@@ -326,7 +326,7 @@
MockRead(ASYNC, kSOCKS4OkReply, kSOCKS4OkReplyLength - 2),
// close connection unexpectedly
MockRead(SYNCHRONOUS, 0)};
- TestNetLog log;
+ RecordingTestNetLog log;
user_sock_ = BuildMockSocket(data_reads, data_writes, host_resolver_.get(),
"localhost", 80, &log);
@@ -351,7 +351,7 @@
host_resolver_->rules()->AddSimulatedFailure(hostname);
- TestNetLog log;
+ RecordingTestNetLog log;
user_sock_ = BuildMockSocket(base::span<MockRead>(), base::span<MockWrite>(),
host_resolver_.get(), hostname, 80, &log);
@@ -425,7 +425,7 @@
TEST_F(SOCKSClientSocketTest, Tag) {
StaticSocketDataProvider data;
- TestNetLog log;
+ RecordingTestNetLog log;
MockTaggingStreamSocket* tagging_sock =
new MockTaggingStreamSocket(std::unique_ptr<StreamSocket>(
new MockTCPClientSocket(address_list_, &log, &data)));
@@ -451,7 +451,7 @@
TEST_F(SOCKSClientSocketTest, SetDisableSecureDns) {
for (bool disable_secure_dns : {false, true}) {
StaticSocketDataProvider data;
- TestNetLog log;
+ RecordingTestNetLog log;
MockHostResolver host_resolver;
SOCKSClientSocket socket(
std::make_unique<MockTCPClientSocket>(address_list_, &log, &data),
diff --git a/net/socket/ssl_client_socket_unittest.cc b/net/socket/ssl_client_socket_unittest.cc
index 9e49130..199d978 100644
--- a/net/socket/ssl_client_socket_unittest.cc
+++ b/net/socket/ssl_client_socket_unittest.cc
@@ -1004,7 +1004,7 @@
cert_verifier_->AddResultForCert(server_cert.get(), verify_result, OK);
}
- TestNetLog log_;
+ RecordingTestNetLog log_;
ClientSocketFactory* socket_factory_;
std::unique_ptr<TestSSLConfigService> ssl_config_service_;
std::unique_ptr<MockCertVerifier> cert_verifier_;
@@ -1596,7 +1596,7 @@
StartEmbeddedTestServer(EmbeddedTestServer::CERT_OK, GetServerConfig()));
TestCompletionCallback callback;
- TestNetLog log;
+ RecordingTestNetLog log;
std::unique_ptr<StreamSocket> transport(
new TCPClientSocket(addr(), nullptr, &log, NetLogSource()));
int rv = callback.GetResult(transport->Connect(callback.callback()));
@@ -2490,7 +2490,7 @@
StartEmbeddedTestServer(EmbeddedTestServer::CERT_OK, GetServerConfig()));
TestCompletionCallback callback;
- TestNetLog log;
+ RecordingTestNetLog log;
log.SetObserverCaptureMode(NetLogCaptureMode::kEverything);
std::unique_ptr<StreamSocket> transport(
new TCPClientSocket(addr(), nullptr, &log, NetLogSource()));
@@ -5473,7 +5473,7 @@
ASSERT_TRUE(
StartEmbeddedTestServer(EmbeddedTestServer::CERT_OK, SSLServerConfig()));
- TestNetLog log;
+ RecordingTestNetLog log;
std::unique_ptr<StreamSocket> transport(
new TCPClientSocket(addr(), nullptr, &log, NetLogSource()));
diff --git a/net/socket/transport_client_socket_pool_unittest.cc b/net/socket/transport_client_socket_pool_unittest.cc
index 68f34b0..b6aa900 100644
--- a/net/socket/transport_client_socket_pool_unittest.cc
+++ b/net/socket/transport_client_socket_pool_unittest.cc
@@ -181,7 +181,7 @@
size_t completion_count() const { return test_base_.completion_count(); }
bool connect_backup_jobs_enabled_;
- TestNetLog net_log_;
+ RecordingTestNetLog net_log_;
// |group_id_| and |params_| correspond to the same group.
const ClientSocketPool::GroupId group_id_;
diff --git a/net/socket/transport_client_socket_unittest.cc b/net/socket/transport_client_socket_unittest.cc
index 2dc4cc4..b7cf052f 100644
--- a/net/socket/transport_client_socket_unittest.cc
+++ b/net/socket/transport_client_socket_unittest.cc
@@ -91,7 +91,7 @@
protected:
base::RunLoop connect_loop_;
uint16_t listen_port_;
- TestNetLog net_log_;
+ RecordingTestNetLog net_log_;
ClientSocketFactory* const socket_factory_;
std::unique_ptr<StreamSocket> sock_;
std::unique_ptr<StreamSocket> connected_sock_;
diff --git a/net/socket/transport_connect_job_unittest.cc b/net/socket/transport_connect_job_unittest.cc
index 446a5f8..3f58007 100644
--- a/net/socket/transport_connect_job_unittest.cc
+++ b/net/socket/transport_connect_job_unittest.cc
@@ -61,7 +61,7 @@
}
protected:
- TestNetLog net_log_;
+ RecordingTestNetLog net_log_;
MockHostResolver host_resolver_;
MockTransportClientSocketFactory client_socket_factory_;
const CommonConnectJobParams common_connect_job_params_;
diff --git a/net/socket/udp_socket_posix_unittest.cc b/net/socket/udp_socket_posix_unittest.cc
index 3baf54bb..730d966a 100644
--- a/net/socket/udp_socket_posix_unittest.cc
+++ b/net/socket/udp_socket_posix_unittest.cc
@@ -218,7 +218,7 @@
.WillOnce(Return(kNumMsgs));
}
- TestNetLog client_log_;
+ RecordingTestNetLog client_log_;
MockUDPSocketPosix socket_;
DatagramBuffers buffers_;
bool callback_fired_;
diff --git a/net/socket/udp_socket_unittest.cc b/net/socket/udp_socket_unittest.cc
index ea1ce20..18eb55670 100644
--- a/net/socket/udp_socket_unittest.cc
+++ b/net/socket/udp_socket_unittest.cc
@@ -161,7 +161,7 @@
// Setup the server to listen.
IPEndPoint server_address(IPAddress::IPv4Localhost(), 0 /* port */);
- TestNetLog server_log;
+ RecordingTestNetLog server_log;
std::unique_ptr<UDPServerSocket> server(
new UDPServerSocket(&server_log, NetLogSource()));
if (use_nonblocking_io)
@@ -172,7 +172,7 @@
ASSERT_THAT(server->GetLocalAddress(&server_address), IsOk());
// Setup the client.
- TestNetLog client_log;
+ RecordingTestNetLog client_log;
auto client = std::make_unique<UDPClientSocket>(DatagramSocket::DEFAULT_BIND,
&client_log, NetLogSource());
if (use_nonblocking_io)
@@ -325,7 +325,7 @@
IPEndPoint listen_address;
ASSERT_TRUE(CreateUDPAddress("0.0.0.0", 0 /* port */, &listen_address));
- TestNetLog server1_log, server2_log;
+ RecordingTestNetLog server1_log, server2_log;
std::unique_ptr<UDPServerSocket> server1(
new UDPServerSocket(&server1_log, NetLogSource()));
std::unique_ptr<UDPServerSocket> server2(
diff --git a/net/socket/websocket_transport_client_socket_pool_unittest.cc b/net/socket/websocket_transport_client_socket_pool_unittest.cc
index ec578d4..b71c0825 100644
--- a/net/socket/websocket_transport_client_socket_pool_unittest.cc
+++ b/net/socket/websocket_transport_client_socket_pool_unittest.cc
@@ -133,7 +133,7 @@
}
size_t completion_count() const { return test_base_.completion_count(); }
- TestNetLog net_log_;
+ RecordingTestNetLog net_log_;
// |group_id_| and |params_| correspond to the same socket parameters.
const ClientSocketPool::GroupId group_id_;
scoped_refptr<ClientSocketPool::SocketParams> params_;
diff --git a/net/spdy/bidirectional_stream_spdy_impl_unittest.cc b/net/spdy/bidirectional_stream_spdy_impl_unittest.cc
index bddadca3..95fbca9 100644
--- a/net/spdy/bidirectional_stream_spdy_impl_unittest.cc
+++ b/net/spdy/bidirectional_stream_spdy_impl_unittest.cc
@@ -278,7 +278,7 @@
session_ = CreateSpdySession(http_session_.get(), key_, net_log_.bound());
}
- BoundTestNetLog net_log_;
+ RecordingBoundTestNetLog net_log_;
SpdyTestUtil spdy_util_;
SpdySessionDependencies session_deps_;
const GURL default_url_;
diff --git a/net/spdy/header_coalescer_test.cc b/net/spdy/header_coalescer_test.cc
index b6aa1b5..30a44e3 100644
--- a/net/spdy/header_coalescer_test.cc
+++ b/net/spdy/header_coalescer_test.cc
@@ -42,7 +42,7 @@
}
protected:
- BoundTestNetLog net_log_;
+ RecordingBoundTestNetLog net_log_;
HeaderCoalescer header_coalescer_;
};
diff --git a/net/spdy/spdy_http_stream_unittest.cc b/net/spdy/spdy_http_stream_unittest.cc
index ac44b86..085940e 100644
--- a/net/spdy/spdy_http_stream_unittest.cc
+++ b/net/spdy/spdy_http_stream_unittest.cc
@@ -165,7 +165,7 @@
}
SpdyTestUtil spdy_util_;
- TestNetLog net_log_;
+ RecordingTestNetLog net_log_;
SpdySessionDependencies session_deps_;
const GURL url_;
const HostPortPair host_port_pair_;
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc
index 5597f7e8..9da9f83df 100644
--- a/net/spdy/spdy_network_transaction_unittest.cc
+++ b/net/spdy/spdy_network_transaction_unittest.cc
@@ -4699,7 +4699,7 @@
MockRead(ASYNC, 0, 3) // EOF
};
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
SequencedSocketData data(reads, writes);
request_.extra_headers.SetHeader("User-Agent", "Chrome");
diff --git a/net/spdy/spdy_proxy_client_socket_unittest.cc b/net/spdy/spdy_proxy_client_socket_unittest.cc
index d63dbcc..988f0f4e 100644
--- a/net/spdy/spdy_proxy_client_socket_unittest.cc
+++ b/net/spdy/spdy_proxy_client_socket_unittest.cc
@@ -177,7 +177,7 @@
// Whether to use net::Socket::ReadIfReady() instead of net::Socket::Read().
bool use_read_if_ready() const { return GetParam(); }
- BoundTestNetLog net_log_;
+ RecordingBoundTestNetLog net_log_;
SpdyTestUtil spdy_util_;
std::unique_ptr<SpdyProxyClientSocket> sock_;
TestCompletionCallback read_callback_;
diff --git a/net/spdy/spdy_session_fuzzer.cc b/net/spdy/spdy_session_fuzzer.cc
index cc59c82..a3ccf8f 100644
--- a/net/spdy/spdy_session_fuzzer.cc
+++ b/net/spdy/spdy_session_fuzzer.cc
@@ -102,7 +102,7 @@
//
// |data| is used to create a FuzzedServerSocket.
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
- net::BoundTestNetLog bound_test_net_log;
+ net::RecordingBoundTestNetLog bound_test_net_log;
FuzzedDataProvider data_provider(data, size);
net::FuzzedSocketFactoryWithMockSSLData socket_factory(&data_provider);
socket_factory.set_fuzz_connect_result(false);
diff --git a/net/spdy/spdy_session_pool_unittest.cc b/net/spdy/spdy_session_pool_unittest.cc
index 2dba4ac..b670818 100644
--- a/net/spdy/spdy_session_pool_unittest.cc
+++ b/net/spdy/spdy_session_pool_unittest.cc
@@ -708,7 +708,7 @@
http_session_.get(), test_hosts[0].key, NetLogWithSource());
// The second host should pool to the existing connection.
- BoundTestNetLog net_log;
+ RecordingBoundTestNetLog net_log;
base::HistogramTester histogram_tester;
EXPECT_TRUE(TryCreateAliasedSpdySession(spdy_session_pool_, test_hosts[1].key,
test_hosts[1].iplist));
@@ -1171,7 +1171,7 @@
// SpdySession does not support Websocket before SETTINGS frame is read.
EXPECT_FALSE(session->support_websocket());
- BoundTestNetLog net_log;
+ RecordingBoundTestNetLog net_log;
// TryCreateAliasedSpdySession should not find |session| for either
// SpdySessionKeys if |is_websocket| argument is set.
EXPECT_FALSE(TryCreateAliasedSpdySession(
diff --git a/net/spdy/spdy_session_unittest.cc b/net/spdy/spdy_session_unittest.cc
index 40584f7..f481bea 100644
--- a/net/spdy/spdy_session_unittest.cc
+++ b/net/spdy/spdy_session_unittest.cc
@@ -363,7 +363,7 @@
url, session_.get()) != kNoPushedStreamFound;
}
- BoundTestNetLog log_;
+ RecordingBoundTestNetLog log_;
// Original socket limits. Some tests set these. Safest to always restore
// them once each test has been run.
diff --git a/net/spdy/spdy_stream_unittest.cc b/net/spdy/spdy_stream_unittest.cc
index e2620f00..4f6c5ff 100644
--- a/net/spdy/spdy_stream_unittest.cc
+++ b/net/spdy/spdy_stream_unittest.cc
@@ -415,7 +415,7 @@
AddReadEOF();
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
SequencedSocketData data(GetReads(), GetWrites());
MockConnect connect_data(SYNCHRONOUS, OK);
@@ -1254,7 +1254,7 @@
AddReadEOF();
- BoundTestNetLog log;
+ RecordingBoundTestNetLog log;
SequencedSocketData data(GetReads(), GetWrites());
MockConnect connect_data(SYNCHRONOUS, OK);
diff --git a/net/test/embedded_test_server/embedded_test_server_unittest.cc b/net/test/embedded_test_server/embedded_test_server_unittest.cc
index a79865933..c1369b1e 100644
--- a/net/test/embedded_test_server/embedded_test_server_unittest.cc
+++ b/net/test/embedded_test_server/embedded_test_server_unittest.cc
@@ -313,7 +313,7 @@
TEST_P(EmbeddedTestServerTest, ConnectionListenerAccept) {
ASSERT_TRUE(server_->Start());
- TestNetLog net_log;
+ RecordingTestNetLog net_log;
net::AddressList address_list;
EXPECT_TRUE(server_->GetAddressList(&address_list));
diff --git a/net/url_request/url_request_http_job_unittest.cc b/net/url_request/url_request_http_job_unittest.cc
index 00f2582e..0cacb1e 100644
--- a/net/url_request/url_request_http_job_unittest.cc
+++ b/net/url_request/url_request_http_job_unittest.cc
@@ -357,7 +357,7 @@
TestURLRequestContext context_;
TestDelegate delegate_;
- TestNetLog net_log_;
+ RecordingTestNetLog net_log_;
std::unique_ptr<URLRequest> req_;
};
diff --git a/net/url_request/url_request_quic_unittest.cc b/net/url_request/url_request_quic_unittest.cc
index b3e119b..daf6a26 100644
--- a/net/url_request/url_request_quic_unittest.cc
+++ b/net/url_request/url_request_quic_unittest.cc
@@ -130,7 +130,7 @@
}
protected:
- TestNetLog net_log_;
+ RecordingTestNetLog net_log_;
private:
void StartQuicServer() {
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index d9ed95a1..2a517b7 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -746,7 +746,7 @@
}
protected:
- TestNetLog net_log_;
+ RecordingTestNetLog net_log_;
TestNetworkDelegate default_network_delegate_; // Must outlive URLRequest.
URLRequestJobFactoryImpl* job_factory_impl_;
std::unique_ptr<URLRequestJobFactory> job_factory_;
@@ -4537,7 +4537,7 @@
for (auto cancel_stage : kCancelStages) {
AsyncLoggingUrlRequestDelegate request_delegate(cancel_stage);
- TestNetLog net_log;
+ RecordingTestNetLog net_log;
TestURLRequestContext context(true);
context.set_network_delegate(nullptr);
context.set_net_log(&net_log);
@@ -6767,7 +6767,7 @@
FilteringTestNetworkDelegate network_delegate;
network_delegate.SetCookieFilter("not_stored_cookie");
network_delegate.set_block_get_cookies();
- TestNetLog net_log;
+ RecordingTestNetLog net_log;
TestURLRequestContext context(true);
context.set_network_delegate(&network_delegate);
context.set_net_log(&net_log);