| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/data_reduction_proxy/core/browser/data_reduction_proxy_conf
ig_retrieval_params.h" | 5 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf
ig_retrieval_params.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| 11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 12 #include "base/prefs/pref_service.h" |
| 12 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
| 13 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 14 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_test
_utils.h" | 15 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_test
_utils.h" |
| 15 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_
names.h" | 16 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_
names.h" |
| 16 #include "components/prefs/pref_service.h" | |
| 17 #include "components/variations/variations_associated_data.h" | 17 #include "components/variations/variations_associated_data.h" |
| 18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 // Test value for how long a Data Reduction Proxy configuration should be valid. | 22 // Test value for how long a Data Reduction Proxy configuration should be valid. |
| 23 const int64_t kConfigExpirationSeconds = 60 * 60 * 24; | 23 const int64_t kConfigExpirationSeconds = 60 * 60 * 24; |
| 24 | 24 |
| 25 // Checks that |actual| falls in the range of |min| + |delta| and | 25 // Checks that |actual| falls in the range of |min| + |delta| and |
| 26 // |max| + |delta|. | 26 // |max| + |delta|. |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 ExpectInTimeRange( | 221 ExpectInTimeRange( |
| 222 min_now, max_now, test_case.expected_delta_5, | 222 min_now, max_now, test_case.expected_delta_5, |
| 223 config_params->variations()[5].simulated_config_retrieved()); | 223 config_params->variations()[5].simulated_config_retrieved()); |
| 224 } else { | 224 } else { |
| 225 EXPECT_EQ(0u, config_params->variations().size()); | 225 EXPECT_EQ(0u, config_params->variations().size()); |
| 226 } | 226 } |
| 227 } | 227 } |
| 228 } | 228 } |
| 229 | 229 |
| 230 } // namespace data_reduction_proxy | 230 } // namespace data_reduction_proxy |
| OLD | NEW |