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

Unified Diff: chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos_unittest.cc

Issue 2230533002: Delete dead consumer enrollment code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos_unittest.cc
diff --git a/chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos_unittest.cc b/chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos_unittest.cc
index 0c85d8c123169848591fdc9e7a6aac3794ab3321..f51f96c7f610213aeb8fb10ca463ddbb351a9138 100644
--- a/chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos_unittest.cc
+++ b/chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos_unittest.cc
@@ -71,16 +71,6 @@ class DeviceCloudPolicyStoreChromeOSTest
ASSERT_EQ(EnterpriseInstallAttributes::LOCK_SUCCESS, result);
}
- void SetManagementModeAndLoad(em::PolicyData::ManagementMode mode) {
- device_policy_.policy_data().set_management_mode(mode);
- device_policy_.Build();
- device_settings_test_helper_.set_policy_blob(device_policy_.GetBlob());
- device_settings_service_.Load();
- FlushDeviceSettings();
- EXPECT_EQ(chromeos::DeviceSettingsService::STORE_SUCCESS,
- device_settings_service_.status());
- }
-
void ExpectFailure(CloudPolicyStore::Status expected_status) {
EXPECT_EQ(expected_status, store_->status());
EXPECT_TRUE(store_->is_initialized());
@@ -88,17 +78,6 @@ class DeviceCloudPolicyStoreChromeOSTest
EXPECT_FALSE(store_->is_managed());
}
- void ExpectSuccessWithManagementMode(ManagementMode mode) {
- EXPECT_EQ(CloudPolicyStore::STATUS_OK, store_->status());
- EXPECT_TRUE(store_->is_initialized());
- EXPECT_TRUE(store_->has_policy());
- EXPECT_TRUE(store_->is_managed());
- EXPECT_TRUE(store_->policy());
- EXPECT_TRUE(store_->policy_map().empty());
- if (store_->policy())
- EXPECT_EQ(mode, GetManagementMode(*store_->policy()));
- }
-
void ExpectSuccess() {
EXPECT_EQ(CloudPolicyStore::STATUS_OK, store_->status());
EXPECT_TRUE(store_->is_initialized());
@@ -176,17 +155,6 @@ TEST_F(DeviceCloudPolicyStoreChromeOSTest, LoadSuccess) {
ExpectSuccess();
}
-TEST_F(DeviceCloudPolicyStoreChromeOSTest, UpdateFromServiceOnConsumerDevices) {
- ResetToNonEnterprise();
-
- SetManagementModeAndLoad(em::PolicyData::CONSUMER_MANAGED);
- ExpectSuccessWithManagementMode(MANAGEMENT_MODE_CONSUMER_MANAGED);
-
- // Unenroll from consumer management.
- SetManagementModeAndLoad(em::PolicyData::LOCAL_OWNER);
- ExpectSuccessWithManagementMode(MANAGEMENT_MODE_LOCAL_OWNER);
-}
-
TEST_F(DeviceCloudPolicyStoreChromeOSTest, StoreSuccess) {
PrepareExistingPolicy();
store_->Store(device_policy_.policy());

Powered by Google App Engine
This is Rietveld 408576698