| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_LOG_TEST_NET_LOG_UTIL_H_ | 5 #ifndef NET_LOG_TEST_NET_LOG_UTIL_H_ |
| 6 #define NET_LOG_TEST_NET_LOG_UTIL_H_ | 6 #define NET_LOG_TEST_NET_LOG_UTIL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> |
| 9 |
| 8 #include "net/log/net_log.h" | 10 #include "net/log/net_log.h" |
| 9 #include "net/log/test_net_log_entry.h" | 11 #include "net/log/test_net_log_entry.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 13 |
| 12 namespace net { | 14 namespace net { |
| 13 | 15 |
| 14 // Checks that the element of |entries| at |offset| has the provided values. | 16 // Checks that the element of |entries| at |offset| has the provided values. |
| 15 // A negative |offset| indicates a position relative to the end of |entries|. | 17 // A negative |offset| indicates a position relative to the end of |entries|. |
| 16 // Checks to make sure |offset| is within bounds, and fails gracefully if it | 18 // Checks to make sure |offset| is within bounds, and fails gracefully if it |
| 17 // isn't. | 19 // isn't. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // or after. It is not a failure if there's an earlier matching entry. | 62 // or after. It is not a failure if there's an earlier matching entry. |
| 61 // Negative offsets are relative to the end of the array. | 63 // Negative offsets are relative to the end of the array. |
| 62 size_t ExpectLogContainsSomewhereAfter(const TestNetLogEntry::List& entries, | 64 size_t ExpectLogContainsSomewhereAfter(const TestNetLogEntry::List& entries, |
| 63 size_t start_offset, | 65 size_t start_offset, |
| 64 NetLog::EventType expected_event, | 66 NetLog::EventType expected_event, |
| 65 NetLog::EventPhase expected_phase); | 67 NetLog::EventPhase expected_phase); |
| 66 | 68 |
| 67 } // namespace net | 69 } // namespace net |
| 68 | 70 |
| 69 #endif // NET_LOG_TEST_NET_LOG_UTIL_H_ | 71 #endif // NET_LOG_TEST_NET_LOG_UTIL_H_ |
| OLD | NEW |