| 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 #include "base/callback.h" | 5 #include "base/callback.h" |
| 6 #include "base/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
| 7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 { DM_STATUS_SERVICE_MANAGEMENT_NOT_SUPPORTED, | 234 { DM_STATUS_SERVICE_MANAGEMENT_NOT_SUPPORTED, |
| 235 CloudPolicyRefreshScheduler::kUnmanagedRefreshDelayMs, 1 }, | 235 CloudPolicyRefreshScheduler::kUnmanagedRefreshDelayMs, 1 }, |
| 236 { DM_STATUS_SERVICE_DEVICE_NOT_FOUND, | 236 { DM_STATUS_SERVICE_DEVICE_NOT_FOUND, |
| 237 -1, 1 }, | 237 -1, 1 }, |
| 238 { DM_STATUS_SERVICE_MANAGEMENT_TOKEN_INVALID, | 238 { DM_STATUS_SERVICE_MANAGEMENT_TOKEN_INVALID, |
| 239 -1, 1 }, | 239 -1, 1 }, |
| 240 { DM_STATUS_SERVICE_ACTIVATION_PENDING, | 240 { DM_STATUS_SERVICE_ACTIVATION_PENDING, |
| 241 kPolicyRefreshRate, 1 }, | 241 kPolicyRefreshRate, 1 }, |
| 242 { DM_STATUS_SERVICE_INVALID_SERIAL_NUMBER, | 242 { DM_STATUS_SERVICE_INVALID_SERIAL_NUMBER, |
| 243 -1, 1 }, | 243 -1, 1 }, |
| 244 { DM_STATUS_MISSING_LICENSES, |
| 245 -1, 1 }, |
| 244 { DM_STATUS_SERVICE_DEVICE_ID_CONFLICT, | 246 { DM_STATUS_SERVICE_DEVICE_ID_CONFLICT, |
| 245 -1, 1 }, | 247 -1, 1 }, |
| 246 { DM_STATUS_SERVICE_POLICY_NOT_FOUND, | 248 { DM_STATUS_SERVICE_POLICY_NOT_FOUND, |
| 247 kPolicyRefreshRate, 1 }, | 249 kPolicyRefreshRate, 1 }, |
| 248 }; | 250 }; |
| 249 | 251 |
| 250 class CloudPolicyRefreshSchedulerClientErrorTest | 252 class CloudPolicyRefreshSchedulerClientErrorTest |
| 251 : public CloudPolicyRefreshSchedulerSteadyStateTest, | 253 : public CloudPolicyRefreshSchedulerSteadyStateTest, |
| 252 public testing::WithParamInterface<ClientErrorTestParam> { | 254 public testing::WithParamInterface<ClientErrorTestParam> { |
| 253 }; | 255 }; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 274 } while (GetParam().backoff_factor > 1 && | 276 } while (GetParam().backoff_factor > 1 && |
| 275 expected_delay_ms <= kPolicyRefreshRate); | 277 expected_delay_ms <= kPolicyRefreshRate); |
| 276 } | 278 } |
| 277 } | 279 } |
| 278 | 280 |
| 279 INSTANTIATE_TEST_CASE_P(CloudPolicyRefreshSchedulerClientErrorTest, | 281 INSTANTIATE_TEST_CASE_P(CloudPolicyRefreshSchedulerClientErrorTest, |
| 280 CloudPolicyRefreshSchedulerClientErrorTest, | 282 CloudPolicyRefreshSchedulerClientErrorTest, |
| 281 testing::ValuesIn(kClientErrorTestCases)); | 283 testing::ValuesIn(kClientErrorTestCases)); |
| 282 | 284 |
| 283 } // namespace policy | 285 } // namespace policy |
| OLD | NEW |