Chromium Code Reviews| 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..50c2835d53a92ddde6e38c11e74e5a4c2ebcc9e7 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. |
| + SetLogUploadSettings(false); |
|
Mattias Nissler (ping if slow)
2015/11/03 13:24:06
It's fine to use log upload as the test pref, but
gayane -on leave until 09-2017
2015/11/03 19:46:17
I have created another function which changes the
|
| + |
| // 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 = |