| 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> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "net/log/net_log.h" | |
| 11 #include "net/log/net_log_event_type.h" | 10 #include "net/log/net_log_event_type.h" |
| 12 #include "net/log/test_net_log_entry.h" | 11 #include "net/log/test_net_log_entry.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 13 |
| 15 namespace net { | 14 namespace net { |
| 16 | 15 |
| 17 // 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. |
| 18 // 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|. |
| 19 // 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 |
| 20 // isn't. | 19 // isn't. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 // 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. |
| 64 // Negative offsets are relative to the end of the array. | 63 // Negative offsets are relative to the end of the array. |
| 65 size_t ExpectLogContainsSomewhereAfter(const TestNetLogEntry::List& entries, | 64 size_t ExpectLogContainsSomewhereAfter(const TestNetLogEntry::List& entries, |
| 66 size_t start_offset, | 65 size_t start_offset, |
| 67 NetLogEventType expected_event, | 66 NetLogEventType expected_event, |
| 68 NetLogEventPhase expected_phase); | 67 NetLogEventPhase expected_phase); |
| 69 | 68 |
| 70 } // namespace net | 69 } // namespace net |
| 71 | 70 |
| 72 #endif // NET_LOG_TEST_NET_LOG_UTIL_H_ | 71 #endif // NET_LOG_TEST_NET_LOG_UTIL_H_ |
| OLD | NEW |