| 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/macros.h" |
| 9 #include "base/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
| 10 #include "net/url_request/test_url_fetcher_factory.h" | 10 #include "net/url_request/test_url_fetcher_factory.h" |
| 11 #include "net/url_request/url_request_test_util.h" | 11 #include "net/url_request/url_request_test_util.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 13 |
| 14 namespace rappor { | 14 namespace rappor { |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 const char kTestServerURL[] = "http://a.com/"; | 18 const char kTestServerURL[] = "http://a.com/"; |
| 19 const char kTestMimeType[] = "text/plain"; | 19 const char kTestMimeType[] = "text/plain"; |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 // Backoff until the maximum is reached. | 149 // Backoff until the maximum is reached. |
| 150 while (next > current) { | 150 while (next > current) { |
| 151 current = next; | 151 current = next; |
| 152 next = TestLogUploader::BackOff(current); | 152 next = TestLogUploader::BackOff(current); |
| 153 } | 153 } |
| 154 // Maximum backoff should have been reached. | 154 // Maximum backoff should have been reached. |
| 155 EXPECT_EQ(next, current); | 155 EXPECT_EQ(next, current); |
| 156 } | 156 } |
| 157 | 157 |
| 158 } // namespace rappor | 158 } // namespace rappor |
| OLD | NEW |