| Index: net/base/net_log_unittest.h
|
| ===================================================================
|
| --- net/base/net_log_unittest.h (revision 57182)
|
| +++ net/base/net_log_unittest.h (working copy)
|
| @@ -106,7 +106,7 @@
|
|
|
|
|
| // Expect that the log contains an event, but don't care about where
|
| -// as long as the index where it is found is greater than min_index.
|
| +// 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 CapturingNetLog::EntryList& entries,
|
| @@ -125,6 +125,25 @@
|
| return i;
|
| }
|
|
|
| +// Expect that the log contains an event, but don't care about where
|
| +// 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 CapturingNetLog::EntryList& entries,
|
| + size_t min_index,
|
| + NetLog::EventType expected_event,
|
| + NetLog::EventPhase expected_phase) {
|
| + size_t i = min_index;
|
| + for (; i < entries.size(); ++i) {
|
| + const CapturingNetLog::Entry& entry = entries[i];
|
| + if (entry.type == expected_event &&
|
| + entry.phase == expected_phase)
|
| + break;
|
| + }
|
| + EXPECT_LT(i, entries.size());
|
| + return i;
|
| +}
|
| +
|
| } // namespace net
|
|
|
| #endif // NET_BASE_NET_LOG_UNITTEST_H_
|
|
|