| 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 "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" | 5 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 store_result_(true), | 423 store_result_(true), |
| 424 status_(EnrollmentStatus::ForStatus(EnrollmentStatus::SUCCESS)), | 424 status_(EnrollmentStatus::ForStatus(EnrollmentStatus::SUCCESS)), |
| 425 done_(false) {} | 425 done_(false) {} |
| 426 | 426 |
| 427 void SetUp() override { | 427 void SetUp() override { |
| 428 DeviceCloudPolicyManagerChromeOSTest::SetUp(); | 428 DeviceCloudPolicyManagerChromeOSTest::SetUp(); |
| 429 | 429 |
| 430 // Set up test data. | 430 // Set up test data. |
| 431 device_policy_.SetDefaultNewSigningKey(); | 431 device_policy_.SetDefaultNewSigningKey(); |
| 432 device_policy_.policy_data().set_timestamp( | 432 device_policy_.policy_data().set_timestamp( |
| 433 (base::Time::NowFromSystemTime() - | 433 base::Time::NowFromSystemTime().ToJavaTime()); |
| 434 base::Time::UnixEpoch()).InMilliseconds()); | |
| 435 device_policy_.Build(); | 434 device_policy_.Build(); |
| 436 | 435 |
| 437 register_response_.mutable_register_response()->set_device_management_token( | 436 register_response_.mutable_register_response()->set_device_management_token( |
| 438 PolicyBuilder::kFakeToken); | 437 PolicyBuilder::kFakeToken); |
| 439 register_response_.mutable_register_response()->set_enrollment_type( | 438 register_response_.mutable_register_response()->set_enrollment_type( |
| 440 em::DeviceRegisterResponse::ENTERPRISE); | 439 em::DeviceRegisterResponse::ENTERPRISE); |
| 441 policy_fetch_response_.mutable_policy_response()->add_response()->CopyFrom( | 440 policy_fetch_response_.mutable_policy_response()->add_response()->CopyFrom( |
| 442 device_policy_.policy()); | 441 device_policy_.policy()); |
| 443 robot_auth_fetch_response_.mutable_service_api_access_response() | 442 robot_auth_fetch_response_.mutable_service_api_access_response() |
| 444 ->set_auth_code("auth_code_for_test"); | 443 ->set_auth_code("auth_code_for_test"); |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 DeviceCloudPolicyManagerChromeOSEnrollmentTest, | 820 DeviceCloudPolicyManagerChromeOSEnrollmentTest, |
| 822 ::testing::Values(false, true)); | 821 ::testing::Values(false, true)); |
| 823 | 822 |
| 824 INSTANTIATE_TEST_CASE_P( | 823 INSTANTIATE_TEST_CASE_P( |
| 825 Cert, | 824 Cert, |
| 826 DeviceCloudPolicyManagerChromeOSEnrollmentBlankSystemSaltTest, | 825 DeviceCloudPolicyManagerChromeOSEnrollmentBlankSystemSaltTest, |
| 827 ::testing::Values(false, true)); | 826 ::testing::Values(false, true)); |
| 828 | 827 |
| 829 } // namespace | 828 } // namespace |
| 830 } // namespace policy | 829 } // namespace policy |
| OLD | NEW |