OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "components/rappor/log_uploader.h" | 5 #include "components/rappor/log_uploader.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/macros.h" |
8 #include "base/thread_task_runner_handle.h" | 9 #include "base/thread_task_runner_handle.h" |
9 #include "net/url_request/test_url_fetcher_factory.h" | 10 #include "net/url_request/test_url_fetcher_factory.h" |
10 #include "net/url_request/url_request_test_util.h" | 11 #include "net/url_request/url_request_test_util.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
12 | 13 |
13 namespace rappor { | 14 namespace rappor { |
14 | 15 |
15 namespace { | 16 namespace { |
16 | 17 |
17 const char kTestServerURL[] = "http://a.com/"; | 18 const char kTestServerURL[] = "http://a.com/"; |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 // Backoff until the maximum is reached. | 147 // Backoff until the maximum is reached. |
147 while (next > current) { | 148 while (next > current) { |
148 current = next; | 149 current = next; |
149 next = TestLogUploader::BackOff(current); | 150 next = TestLogUploader::BackOff(current); |
150 } | 151 } |
151 // Maximum backoff should have been reached. | 152 // Maximum backoff should have been reached. |
152 EXPECT_EQ(next, current); | 153 EXPECT_EQ(next, current); |
153 } | 154 } |
154 | 155 |
155 } // namespace rappor | 156 } // namespace rappor |
OLD | NEW |