| 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 <string> | 7 #include <string> | 
| 8 #include <vector> | 8 #include <vector> | 
| 9 | 9 | 
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" | 
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 44       : local_state_(TestingBrowserProcess::GetGlobal()), | 44       : local_state_(TestingBrowserProcess::GetGlobal()), | 
| 45         fake_cryptohome_client_(new chromeos::FakeCryptohomeClient()), | 45         fake_cryptohome_client_(new chromeos::FakeCryptohomeClient()), | 
| 46         install_attributes_( | 46         install_attributes_( | 
| 47             new EnterpriseInstallAttributes(fake_cryptohome_client_)), | 47             new EnterpriseInstallAttributes(fake_cryptohome_client_)), | 
| 48         store_(new DeviceCloudPolicyStoreChromeOS( | 48         store_(new DeviceCloudPolicyStoreChromeOS( | 
| 49             &device_settings_service_, | 49             &device_settings_service_, | 
| 50             install_attributes_.get(), | 50             install_attributes_.get(), | 
| 51             base::MessageLoopProxy::current())) { | 51             base::MessageLoopProxy::current())) { | 
| 52   } | 52   } | 
| 53 | 53 | 
| 54   virtual void SetUp() OVERRIDE { | 54   virtual void SetUp() override { | 
| 55     DeviceSettingsTestBase::SetUp(); | 55     DeviceSettingsTestBase::SetUp(); | 
| 56 | 56 | 
| 57     dbus_setter_->SetCryptohomeClient( | 57     dbus_setter_->SetCryptohomeClient( | 
| 58         scoped_ptr<chromeos::CryptohomeClient>(fake_cryptohome_client_)); | 58         scoped_ptr<chromeos::CryptohomeClient>(fake_cryptohome_client_)); | 
| 59 | 59 | 
| 60     base::RunLoop loop; | 60     base::RunLoop loop; | 
| 61     EnterpriseInstallAttributes::LockResult result; | 61     EnterpriseInstallAttributes::LockResult result; | 
| 62     install_attributes_->LockDevice( | 62     install_attributes_->LockDevice( | 
| 63         PolicyBuilder::kFakeUsername, | 63         PolicyBuilder::kFakeUsername, | 
| 64         DEVICE_MODE_ENTERPRISE, | 64         DEVICE_MODE_ENTERPRISE, | 
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 272 | 272 | 
| 273 TEST_F(DeviceCloudPolicyStoreChromeOSTest, InstallInitialPolicyNotEnterprise) { | 273 TEST_F(DeviceCloudPolicyStoreChromeOSTest, InstallInitialPolicyNotEnterprise) { | 
| 274   PrepareNewSigningKey(); | 274   PrepareNewSigningKey(); | 
| 275   ResetToNonEnterprise(); | 275   ResetToNonEnterprise(); | 
| 276   store_->InstallInitialPolicy(device_policy_.policy()); | 276   store_->InstallInitialPolicy(device_policy_.policy()); | 
| 277   FlushDeviceSettings(); | 277   FlushDeviceSettings(); | 
| 278   ExpectFailure(CloudPolicyStore::STATUS_BAD_STATE); | 278   ExpectFailure(CloudPolicyStore::STATUS_BAD_STATE); | 
| 279 } | 279 } | 
| 280 | 280 | 
| 281 }  // namespace policy | 281 }  // namespace policy | 
| OLD | NEW | 
|---|