Index: chrome/browser/chromeos/settings/device_settings_provider_unittest.cc |
diff --git a/chrome/browser/chromeos/settings/device_settings_provider_unittest.cc b/chrome/browser/chromeos/settings/device_settings_provider_unittest.cc |
index e02000cb55667939bea3334d9a10f28f836f6258..0d9f7e043bdf838b58f7c9333e6057d66d15be03 100644 |
--- a/chrome/browser/chromeos/settings/device_settings_provider_unittest.cc |
+++ b/chrome/browser/chromeos/settings/device_settings_provider_unittest.cc |
@@ -241,6 +241,9 @@ TEST_F(DeviceSettingsProviderTest, InitializationTestUnowned) { |
} |
TEST_F(DeviceSettingsProviderTest, SetPrefFailed) { |
+ // Initialize pref. |
+ provider_->SetPrefForTesting(kStatsReportingPref, false); |
Mattias Nissler (ping if slow)
2015/10/28 09:51:15
This seems fishy - what failure do you get if you
gayane -on leave until 09-2017
2015/10/28 15:00:07
The problem I had was that the test will fail at l
Mattias Nissler (ping if slow)
2015/10/29 10:06:14
OK, I get it now. The previous code would set kSta
|
+ |
// If we are not the owner no sets should work. |
base::FundamentalValue value(true); |
EXPECT_CALL(*this, SettingChanged(kStatsReportingPref)).Times(1); |
@@ -364,26 +367,6 @@ TEST_F(DeviceSettingsProviderTest, PolicyLoadNotification) { |
Mock::VerifyAndClearExpectations(this); |
} |
-TEST_F(DeviceSettingsProviderTest, StatsReportingMigration) { |
- // Create the legacy consent file. |
- base::FilePath consent_file; |
- ASSERT_TRUE(PathService::Get(chrome::DIR_USER_DATA, &consent_file)); |
- consent_file = consent_file.AppendASCII("Consent To Send Stats"); |
- ASSERT_EQ(1, base::WriteFile(consent_file, "0", 1)); |
- |
- // This should trigger migration because the metrics policy isn't in the blob. |
- device_settings_test_helper_.set_policy_blob(std::string()); |
- FlushDeviceSettings(); |
- EXPECT_EQ(std::string(), device_settings_test_helper_.policy_blob()); |
- |
- // Verify that migration has kicked in. |
- const base::Value* saved_value = provider_->Get(kStatsReportingPref); |
- ASSERT_TRUE(saved_value); |
- bool bool_value; |
- EXPECT_TRUE(saved_value->GetAsBoolean(&bool_value)); |
- EXPECT_FALSE(bool_value); |
-} |
- |
TEST_F(DeviceSettingsProviderTest, LegacyDeviceLocalAccounts) { |
EXPECT_CALL(*this, SettingChanged(_)).Times(AnyNumber()); |
em::DeviceLocalAccountInfoProto* account = |