Index: net/log/net_log_unittest.h |
diff --git a/net/log/net_log_unittest.h b/net/log/net_log_unittest.h |
index 1634e60443bd7b5412a1b54d42a5d8ae62552090..119d8cfa32f14dce25a9fdc258f1becd387d6bd7 100644 |
--- a/net/log/net_log_unittest.h |
+++ b/net/log/net_log_unittest.h |
@@ -7,6 +7,7 @@ |
#include <cstddef> |
+#include "net/log/captured_net_log_entry.h" |
#include "net/log/test_net_log.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -20,7 +21,7 @@ inline base::TimeTicks MakeTime(int t) { |
} |
inline ::testing::AssertionResult LogContainsEventHelper( |
mmenke
2015/04/24 22:31:39
Think I'll de-inline these in a followup CL.
|
- const TestNetLog::CapturedEntryList& entries, |
+ const CapturedNetLogEntry::List& entries, |
int i, // Negative indices are reverse indices. |
const base::TimeTicks& expected_time, |
bool check_time, |
@@ -31,7 +32,7 @@ inline ::testing::AssertionResult LogContainsEventHelper( |
: static_cast<size_t>(i); |
if (j >= entries.size()) |
return ::testing::AssertionFailure() << j << " is out of bounds."; |
- const TestNetLog::CapturedEntry& entry = entries[j]; |
+ const CapturedNetLogEntry& entry = entries[j]; |
if (expected_event != entry.type) { |
return ::testing::AssertionFailure() |
<< "Actual event: " << NetLog::EventTypeToString(entry.type) |
@@ -54,7 +55,7 @@ inline ::testing::AssertionResult LogContainsEventHelper( |
} |
inline ::testing::AssertionResult LogContainsEventAtTime( |
- const TestNetLog::CapturedEntryList& log, |
+ const CapturedNetLogEntry::List& log, |
int i, // Negative indices are reverse indices. |
const base::TimeTicks& expected_time, |
NetLog::EventType expected_event, |
@@ -65,7 +66,7 @@ inline ::testing::AssertionResult LogContainsEventAtTime( |
// Version without timestamp. |
inline ::testing::AssertionResult LogContainsEvent( |
- const TestNetLog::CapturedEntryList& log, |
+ const CapturedNetLogEntry::List& log, |
int i, // Negative indices are reverse indices. |
NetLog::EventType expected_event, |
NetLog::EventPhase expected_phase) { |
@@ -75,7 +76,7 @@ inline ::testing::AssertionResult LogContainsEvent( |
// Version for PHASE_BEGIN (and no timestamp). |
inline ::testing::AssertionResult LogContainsBeginEvent( |
- const TestNetLog::CapturedEntryList& log, |
+ const CapturedNetLogEntry::List& log, |
int i, // Negative indices are reverse indices. |
NetLog::EventType expected_event) { |
return LogContainsEvent(log, i, expected_event, NetLog::PHASE_BEGIN); |
@@ -83,14 +84,14 @@ inline ::testing::AssertionResult LogContainsBeginEvent( |
// Version for PHASE_END (and no timestamp). |
inline ::testing::AssertionResult LogContainsEndEvent( |
- const TestNetLog::CapturedEntryList& log, |
+ const CapturedNetLogEntry::List& log, |
int i, // Negative indices are reverse indices. |
NetLog::EventType expected_event) { |
return LogContainsEvent(log, i, expected_event, NetLog::PHASE_END); |
} |
inline ::testing::AssertionResult LogContainsEntryWithType( |
- const TestNetLog::CapturedEntryList& entries, |
+ const CapturedNetLogEntry::List& entries, |
int i, // Negative indices are reverse indices. |
NetLog::EventType type) { |
// Negative indices are reverse indices. |
@@ -98,7 +99,7 @@ inline ::testing::AssertionResult LogContainsEntryWithType( |
: static_cast<size_t>(i); |
if (j >= entries.size()) |
return ::testing::AssertionFailure() << j << " is out of bounds."; |
- const TestNetLog::CapturedEntry& entry = entries[j]; |
+ const CapturedNetLogEntry& entry = entries[j]; |
if (entry.type != type) |
return ::testing::AssertionFailure() << "Type does not match."; |
return ::testing::AssertionSuccess(); |
@@ -107,7 +108,7 @@ inline ::testing::AssertionResult LogContainsEntryWithType( |
// Check if the log contains any entry of the given type at |min_index| or |
// after. |
inline ::testing::AssertionResult LogContainsEntryWithTypeAfter( |
- const TestNetLog::CapturedEntryList& entries, |
+ const CapturedNetLogEntry::List& entries, |
int min_index, // Negative indices are reverse indices. |
NetLog::EventType type) { |
// Negative indices are reverse indices. |
@@ -116,7 +117,7 @@ inline ::testing::AssertionResult LogContainsEntryWithTypeAfter( |
? static_cast<size_t>(static_cast<int>(entries.size()) + min_index) |
: static_cast<size_t>(min_index); |
for (size_t i = real_index; i < entries.size(); ++i) { |
- const TestNetLog::CapturedEntry& entry = entries[i]; |
+ const CapturedNetLogEntry& entry = entries[i]; |
if (entry.type == type) |
return ::testing::AssertionSuccess(); |
} |
@@ -127,13 +128,13 @@ inline ::testing::AssertionResult LogContainsEntryWithTypeAfter( |
// as long as the first index where it is found is at least |min_index|. |
// Returns the position where the event was found. |
inline size_t ExpectLogContainsSomewhere( |
- const TestNetLog::CapturedEntryList& entries, |
+ const CapturedNetLogEntry::List& entries, |
size_t min_index, |
NetLog::EventType expected_event, |
NetLog::EventPhase expected_phase) { |
size_t i = 0; |
for (; i < entries.size(); ++i) { |
- const TestNetLog::CapturedEntry& entry = entries[i]; |
+ const CapturedNetLogEntry& entry = entries[i]; |
if (entry.type == expected_event && entry.phase == expected_phase) |
break; |
} |
@@ -146,13 +147,13 @@ inline size_t ExpectLogContainsSomewhere( |
// as long as one index where it is found is at least |min_index|. |
// Returns the first such position where the event was found. |
inline size_t ExpectLogContainsSomewhereAfter( |
- const TestNetLog::CapturedEntryList& entries, |
+ const CapturedNetLogEntry::List& entries, |
size_t min_index, |
NetLog::EventType expected_event, |
NetLog::EventPhase expected_phase) { |
size_t i = min_index; |
for (; i < entries.size(); ++i) { |
- const TestNetLog::CapturedEntry& entry = entries[i]; |
+ const CapturedNetLogEntry& entry = entries[i]; |
if (entry.type == expected_event && entry.phase == expected_phase) |
break; |
} |