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

Unified Diff: chrome/browser/prefs/profile_pref_store_manager_unittest.cc

Issue 220203011: Changes requested by gab for previously committed CLs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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/prefs/profile_pref_store_manager_unittest.cc
diff --git a/chrome/browser/prefs/profile_pref_store_manager_unittest.cc b/chrome/browser/prefs/profile_pref_store_manager_unittest.cc
index c04e6c8154b1e4f9095848484e96214abbbd207c..4c197874357c0b41193c32e7813282ac52774902 100644
--- a/chrome/browser/prefs/profile_pref_store_manager_unittest.cc
+++ b/chrome/browser/prefs/profile_pref_store_manager_unittest.cc
@@ -280,8 +280,8 @@ TEST_F(ProfilePrefStoreManagerTest, ResetPrefHashStore) {
// kTrackedAtomic is loaded as it appears on disk.
ExpectStringValueEquals(kTrackedAtomic, kFoobar);
- // If preference tracking is supported, the tampered value of kProtectedAtomic
- // will be discarded at load time, leaving this preference undefined.
+ // If preference tracking is supported, kProtectedAtomic will be undefined
+ // because the value was discarded due to loss of the hash store contents.
EXPECT_NE(ProfilePrefStoreManager::kPlatformSupportsPreferenceTracking,
pref_store_->GetValue(kProtectedAtomic, NULL));
EXPECT_EQ(ProfilePrefStoreManager::kPlatformSupportsPreferenceTracking,
@@ -342,12 +342,10 @@ TEST_F(ProfilePrefStoreManagerTest, UpdateProfileHashStoreIfRequired) {
}
TEST_F(ProfilePrefStoreManagerTest, InitializePrefsFromMasterPrefs) {
- scoped_ptr<base::DictionaryValue> master_prefs(
- new base::DictionaryValue);
- master_prefs->Set(kTrackedAtomic, new base::StringValue(kFoobar));
- master_prefs->Set(kProtectedAtomic, new base::StringValue(kHelloWorld));
- EXPECT_TRUE(
- manager_->InitializePrefsFromMasterPrefs(*master_prefs));
+ base::DictionaryValue master_prefs;
+ master_prefs.Set(kTrackedAtomic, new base::StringValue(kFoobar));
+ master_prefs.Set(kProtectedAtomic, new base::StringValue(kHelloWorld));
+ EXPECT_TRUE(manager_->InitializePrefsFromMasterPrefs(master_prefs));
LoadExistingPrefs();

Powered by Google App Engine
This is Rietveld 408576698