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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 initializer_->SetSigningServiceForTesting( | 222 initializer_->SetSigningServiceForTesting( |
223 base::MakeUnique<FakeSigningService>()); | 223 base::MakeUnique<FakeSigningService>()); |
224 initializer_->Init(); | 224 initializer_->Init(); |
225 } | 225 } |
226 | 226 |
227 void VerifyPolicyPopulated() { | 227 void VerifyPolicyPopulated() { |
228 PolicyBundle bundle; | 228 PolicyBundle bundle; |
229 bundle.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())) | 229 bundle.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())) |
230 .Set(key::kDeviceMetricsReportingEnabled, POLICY_LEVEL_MANDATORY, | 230 .Set(key::kDeviceMetricsReportingEnabled, POLICY_LEVEL_MANDATORY, |
231 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD, | 231 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD, |
232 base::MakeUnique<base::FundamentalValue>(false), nullptr); | 232 base::MakeUnique<base::Value>(false), nullptr); |
233 EXPECT_TRUE(manager_->policies().Equals(bundle)); | 233 EXPECT_TRUE(manager_->policies().Equals(bundle)); |
234 } | 234 } |
235 | 235 |
236 void AllowUninterestingRemoteCommandFetches() { | 236 void AllowUninterestingRemoteCommandFetches() { |
237 // We are not interested in remote command fetches that the client initiates | 237 // We are not interested in remote command fetches that the client initiates |
238 // automatically. Make them fail and ignore them otherwise. | 238 // automatically. Make them fail and ignore them otherwise. |
239 EXPECT_CALL(device_management_service_, | 239 EXPECT_CALL(device_management_service_, |
240 CreateJob(DeviceManagementRequestJob::TYPE_REMOTE_COMMANDS, _)) | 240 CreateJob(DeviceManagementRequestJob::TYPE_REMOTE_COMMANDS, _)) |
241 .Times(AnyNumber()) | 241 .Times(AnyNumber()) |
242 .WillRepeatedly(device_management_service_.FailJob( | 242 .WillRepeatedly(device_management_service_.FailJob( |
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
821 DeviceCloudPolicyManagerChromeOSEnrollmentTest, | 821 DeviceCloudPolicyManagerChromeOSEnrollmentTest, |
822 ::testing::Values(false, true)); | 822 ::testing::Values(false, true)); |
823 | 823 |
824 INSTANTIATE_TEST_CASE_P( | 824 INSTANTIATE_TEST_CASE_P( |
825 Cert, | 825 Cert, |
826 DeviceCloudPolicyManagerChromeOSEnrollmentBlankSystemSaltTest, | 826 DeviceCloudPolicyManagerChromeOSEnrollmentBlankSystemSaltTest, |
827 ::testing::Values(false, true)); | 827 ::testing::Values(false, true)); |
828 | 828 |
829 } // namespace | 829 } // namespace |
830 } // namespace policy | 830 } // namespace policy |
OLD | NEW |