OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_BASE_NET_LOG_UNITTEST_H_ | 5 #ifndef NET_BASE_NET_LOG_UNITTEST_H_ |
6 #define NET_BASE_NET_LOG_UNITTEST_H_ | 6 #define NET_BASE_NET_LOG_UNITTEST_H_ |
7 | 7 |
8 #include <cstddef> | 8 #include <cstddef> |
9 #include <vector> | 9 #include <vector> |
10 #include "net/base/net_log.h" | 10 #include "net/base/capturing_net_log.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 | 12 |
13 namespace net { | 13 namespace net { |
14 | 14 |
15 // Create a timestamp with internal value of |t| milliseconds from the epoch. | 15 // Create a timestamp with internal value of |t| milliseconds from the epoch. |
16 inline base::TimeTicks MakeTime(int t) { | 16 inline base::TimeTicks MakeTime(int t) { |
17 base::TimeTicks ticks; // initialized to 0. | 17 base::TimeTicks ticks; // initialized to 0. |
18 ticks += base::TimeDelta::FromMilliseconds(t); | 18 ticks += base::TimeDelta::FromMilliseconds(t); |
19 return ticks; | 19 return ticks; |
20 } | 20 } |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 break; | 120 break; |
121 } | 121 } |
122 EXPECT_LT(i, entries.size()); | 122 EXPECT_LT(i, entries.size()); |
123 EXPECT_GE(i, min_index); | 123 EXPECT_GE(i, min_index); |
124 return i; | 124 return i; |
125 } | 125 } |
126 | 126 |
127 } // namespace net | 127 } // namespace net |
128 | 128 |
129 #endif // NET_BASE_NET_LOG_UNITTEST_H_ | 129 #endif // NET_BASE_NET_LOG_UNITTEST_H_ |
OLD | NEW |