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_store_chromeos.h" | 5 #include "chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
14 #include "base/threading/thread_task_runner_handle.h" | 14 #include "base/threading/thread_task_runner_handle.h" |
15 #include "chrome/browser/chromeos/policy/enterprise_install_attributes.h" | 15 #include "chrome/browser/chromeos/policy/enterprise_install_attributes.h" |
16 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" | 16 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" |
17 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" | 17 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" |
18 #include "chrome/test/base/scoped_testing_local_state.h" | 18 #include "chrome/test/base/scoped_testing_local_state.h" |
19 #include "chrome/test/base/testing_browser_process.h" | 19 #include "chrome/test/base/testing_browser_process.h" |
20 #include "chromeos/cryptohome/cryptohome_util.h" | 20 #include "chromeos/cryptohome/cryptohome_util.h" |
21 #include "chromeos/dbus/dbus_thread_manager.h" | 21 #include "chromeos/dbus/dbus_thread_manager.h" |
22 #include "chromeos/dbus/fake_cryptohome_client.h" | 22 #include "chromeos/dbus/fake_cryptohome_client.h" |
23 #include "components/policy/core/common/cloud/cloud_policy_constants.h" | 23 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
| 24 #include "components/policy/policy_constants.h" |
| 25 #include "components/policy/proto/device_management_backend.pb.h" |
24 #include "content/public/test/test_utils.h" | 26 #include "content/public/test/test_utils.h" |
25 #include "policy/policy_constants.h" | |
26 #include "policy/proto/device_management_backend.pb.h" | |
27 #include "testing/gtest/include/gtest/gtest.h" | 27 #include "testing/gtest/include/gtest/gtest.h" |
28 | 28 |
29 namespace em = enterprise_management; | 29 namespace em = enterprise_management; |
30 | 30 |
31 namespace policy { | 31 namespace policy { |
32 | 32 |
33 namespace { | 33 namespace { |
34 | 34 |
35 void CopyLockResult(base::RunLoop* loop, | 35 void CopyLockResult(base::RunLoop* loop, |
36 EnterpriseInstallAttributes::LockResult* out, | 36 EnterpriseInstallAttributes::LockResult* out, |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 | 274 |
275 TEST_F(DeviceCloudPolicyStoreChromeOSTest, InstallInitialPolicyNotEnterprise) { | 275 TEST_F(DeviceCloudPolicyStoreChromeOSTest, InstallInitialPolicyNotEnterprise) { |
276 PrepareNewSigningKey(); | 276 PrepareNewSigningKey(); |
277 ResetToNonEnterprise(); | 277 ResetToNonEnterprise(); |
278 store_->InstallInitialPolicy(device_policy_.policy()); | 278 store_->InstallInitialPolicy(device_policy_.policy()); |
279 FlushDeviceSettings(); | 279 FlushDeviceSettings(); |
280 ExpectFailure(CloudPolicyStore::STATUS_BAD_STATE); | 280 ExpectFailure(CloudPolicyStore::STATUS_BAD_STATE); |
281 } | 281 } |
282 | 282 |
283 } // namespace policy | 283 } // namespace policy |
OLD | NEW |