Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: chrome/browser/policy/cloud_policy_refresh_scheduler_unittest.cc

Issue 10664017: Introduce a new error code from the DM server - 402 - missing licenses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698