Index: net/proxy/proxy_resolver_v8_tracing_unittest.cc |
diff --git a/net/proxy/proxy_resolver_v8_tracing_unittest.cc b/net/proxy/proxy_resolver_v8_tracing_unittest.cc |
index 9c255083eb02cf03e2781ed4a854afd364cfb1d6..a25ebfa78a22a58051a64673424634c7eb079242 100644 |
--- a/net/proxy/proxy_resolver_v8_tracing_unittest.cc |
+++ b/net/proxy/proxy_resolver_v8_tracing_unittest.cc |
@@ -96,7 +96,7 @@ class MockErrorObserver : public ProxyResolverErrorObserver { |
}; |
TEST_F(ProxyResolverV8TracingTest, Simple) { |
- CapturingNetLog log; |
+ TestNetLog log; |
CapturingBoundNetLog request_log; |
MockCachingHostResolver host_resolver; |
MockErrorObserver* error_observer = new MockErrorObserver; |
@@ -127,7 +127,7 @@ TEST_F(ProxyResolverV8TracingTest, Simple) { |
} |
TEST_F(ProxyResolverV8TracingTest, JavascriptError) { |
- CapturingNetLog log; |
+ TestNetLog log; |
CapturingBoundNetLog request_log; |
MockCachingHostResolver host_resolver; |
MockErrorObserver* error_observer = new MockErrorObserver; |
@@ -152,12 +152,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. |
- CapturingNetLog::CapturedEntryList entries_list[2]; |
+ TestNetLog::CapturedEntryList 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 CapturingNetLog::CapturedEntryList& entries = entries_list[list_i]; |
+ const TestNetLog::CapturedEntryList& entries = entries_list[list_i]; |
EXPECT_EQ(2u, entries.size()); |
EXPECT_TRUE( |
LogContainsEvent(entries, 0, NetLog::TYPE_PAC_JAVASCRIPT_ALERT, |
@@ -173,7 +173,7 @@ TEST_F(ProxyResolverV8TracingTest, JavascriptError) { |
} |
TEST_F(ProxyResolverV8TracingTest, TooManyAlerts) { |
- CapturingNetLog log; |
+ TestNetLog log; |
CapturingBoundNetLog request_log; |
MockCachingHostResolver host_resolver; |
MockErrorObserver* error_observer = new MockErrorObserver; |
@@ -206,12 +206,12 @@ TEST_F(ProxyResolverV8TracingTest, TooManyAlerts) { |
// Check the NetLogs -- the script generated 50 alerts, which were mirrored |
// to both the global and per-request logs. |
- CapturingNetLog::CapturedEntryList entries_list[2]; |
+ TestNetLog::CapturedEntryList 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 CapturingNetLog::CapturedEntryList& entries = entries_list[list_i]; |
+ const TestNetLog::CapturedEntryList& entries = entries_list[list_i]; |
EXPECT_EQ(50u, entries.size()); |
for (size_t i = 0; i < entries.size(); ++i) { |
ASSERT_TRUE( |
@@ -224,7 +224,7 @@ TEST_F(ProxyResolverV8TracingTest, TooManyAlerts) { |
// Verify that buffered alerts cannot grow unboundedly, even when the message is |
// empty string. |
TEST_F(ProxyResolverV8TracingTest, TooManyEmptyAlerts) { |
- CapturingNetLog log; |
+ TestNetLog log; |
CapturingBoundNetLog request_log; |
MockCachingHostResolver host_resolver; |
MockErrorObserver* error_observer = new MockErrorObserver; |
@@ -254,12 +254,12 @@ TEST_F(ProxyResolverV8TracingTest, TooManyEmptyAlerts) { |
// Check the NetLogs -- the script generated 50 alerts, which were mirrored |
// to both the global and per-request logs. |
- CapturingNetLog::CapturedEntryList entries_list[2]; |
+ TestNetLog::CapturedEntryList 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 CapturingNetLog::CapturedEntryList& entries = entries_list[list_i]; |
+ const TestNetLog::CapturedEntryList& entries = entries_list[list_i]; |
EXPECT_EQ(1000u, entries.size()); |
for (size_t i = 0; i < entries.size(); ++i) { |
ASSERT_TRUE( |
@@ -273,7 +273,7 @@ TEST_F(ProxyResolverV8TracingTest, TooManyEmptyAlerts) { |
// verifies the final result, and that the underlying DNS resolver received |
// the correct set of queries. |
TEST_F(ProxyResolverV8TracingTest, Dns) { |
- CapturingNetLog log; |
+ TestNetLog log; |
CapturingBoundNetLog request_log; |
MockCachingHostResolver host_resolver; |
MockErrorObserver* error_observer = new MockErrorObserver; |
@@ -332,12 +332,12 @@ TEST_F(ProxyResolverV8TracingTest, Dns) { |
// Check the NetLogs -- the script generated 1 alert, mirrored to both |
// the per-request and global logs. |
- CapturingNetLog::CapturedEntryList entries_list[2]; |
+ TestNetLog::CapturedEntryList 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 CapturingNetLog::CapturedEntryList& entries = entries_list[list_i]; |
+ const TestNetLog::CapturedEntryList& entries = entries_list[list_i]; |
EXPECT_EQ(1u, entries.size()); |
EXPECT_TRUE( |
LogContainsEvent(entries, 0, NetLog::TYPE_PAC_JAVASCRIPT_ALERT, |
@@ -350,7 +350,7 @@ TEST_F(ProxyResolverV8TracingTest, Dns) { |
// "dnsResolve()". This requires 2 restarts. However once the HostResolver's |
// cache is warmed, subsequent calls should take 0 restarts. |
TEST_F(ProxyResolverV8TracingTest, DnsChecksCache) { |
- CapturingNetLog log; |
+ TestNetLog log; |
CapturingBoundNetLog request_log; |
MockCachingHostResolver host_resolver; |
MockErrorObserver* error_observer = new MockErrorObserver; |
@@ -407,7 +407,7 @@ TEST_F(ProxyResolverV8TracingTest, DnsChecksCache) { |
// optimization. The proxy resolver should detect the inconsistency and |
// fall-back to synchronous mode execution. |
TEST_F(ProxyResolverV8TracingTest, FallBackToSynchronous1) { |
- CapturingNetLog log; |
+ TestNetLog log; |
CapturingBoundNetLog request_log; |
MockCachingHostResolver host_resolver; |
MockErrorObserver* error_observer = new MockErrorObserver; |
@@ -441,12 +441,12 @@ TEST_F(ProxyResolverV8TracingTest, FallBackToSynchronous1) { |
// Check the NetLogs -- the script generated 1 alert, mirrored to both |
// the per-request and global logs. |
- CapturingNetLog::CapturedEntryList entries_list[2]; |
+ TestNetLog::CapturedEntryList 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 CapturingNetLog::CapturedEntryList& entries = entries_list[list_i]; |
+ const TestNetLog::CapturedEntryList& entries = entries_list[list_i]; |
EXPECT_EQ(1u, entries.size()); |
EXPECT_TRUE( |
LogContainsEvent(entries, 0, NetLog::TYPE_PAC_JAVASCRIPT_ALERT, |
@@ -459,7 +459,7 @@ TEST_F(ProxyResolverV8TracingTest, FallBackToSynchronous1) { |
// optimization. The proxy resolver should detect the inconsistency and |
// fall-back to synchronous mode execution. |
TEST_F(ProxyResolverV8TracingTest, FallBackToSynchronous2) { |
- CapturingNetLog log; |
+ TestNetLog log; |
CapturingBoundNetLog request_log; |
MockCachingHostResolver host_resolver; |
MockErrorObserver* error_observer = new MockErrorObserver; |
@@ -499,7 +499,7 @@ TEST_F(ProxyResolverV8TracingTest, FallBackToSynchronous2) { |
// DNS resolves per request limit (20) after which every DNS resolve will |
// fail. |
TEST_F(ProxyResolverV8TracingTest, InfiniteDNSSequence) { |
- CapturingNetLog log; |
+ TestNetLog log; |
CapturingBoundNetLog request_log; |
MockCachingHostResolver host_resolver; |
MockErrorObserver* error_observer = new MockErrorObserver; |
@@ -542,7 +542,7 @@ TEST_F(ProxyResolverV8TracingTest, InfiniteDNSSequence) { |
// DNS resolves per request limit (20) after which every DNS resolve will |
// fail. |
TEST_F(ProxyResolverV8TracingTest, InfiniteDNSSequence2) { |
- CapturingNetLog log; |
+ TestNetLog log; |
CapturingBoundNetLog request_log; |
MockCachingHostResolver host_resolver; |
MockErrorObserver* error_observer = new MockErrorObserver; |
@@ -575,7 +575,7 @@ TEST_F(ProxyResolverV8TracingTest, InfiniteDNSSequence2) { |
} |
void DnsDuringInitHelper(bool synchronous_host_resolver) { |
- CapturingNetLog log; |
+ TestNetLog log; |
CapturingBoundNetLog request_log; |
MockCachingHostResolver host_resolver; |
host_resolver.set_synchronous_mode(synchronous_host_resolver); |
@@ -614,7 +614,7 @@ void DnsDuringInitHelper(bool synchronous_host_resolver) { |
// Check the NetLogs -- the script generated 2 alerts during initialization. |
EXPECT_EQ(0u, request_log.GetSize()); |
- CapturingNetLog::CapturedEntryList entries; |
+ TestNetLog::CapturedEntryList entries; |
log.GetEntries(&entries); |
ASSERT_EQ(2u, entries.size()); |
@@ -949,7 +949,7 @@ TEST_F(ProxyResolverV8TracingTest, CancelSetPacWhileOutstandingBlockingDns) { |
// This tests that the execution of a PAC script is terminated when the DNS |
// dependencies are missing. If the test fails, then it will hang. |
TEST_F(ProxyResolverV8TracingTest, Terminate) { |
- CapturingNetLog log; |
+ TestNetLog log; |
CapturingBoundNetLog request_log; |
MockCachingHostResolver host_resolver; |
MockErrorObserver* error_observer = new MockErrorObserver; |