Index: chrome/browser/prefs/tracked/pref_service_hash_store_contents_unittest.cc |
diff --git a/chrome/browser/prefs/tracked/pref_service_hash_store_contents_unittest.cc b/chrome/browser/prefs/tracked/pref_service_hash_store_contents_unittest.cc |
index 789fd1a24a27bae5bfbea88d1f6040f2cdd9bbf1..324a5a0c69f710b14827a6bae3ea060d06e1ec28 100644 |
--- a/chrome/browser/prefs/tracked/pref_service_hash_store_contents_unittest.cc |
+++ b/chrome/browser/prefs/tracked/pref_service_hash_store_contents_unittest.cc |
@@ -9,6 +9,7 @@ |
#include "base/prefs/pref_service.h" |
#include "base/prefs/testing_pref_service.h" |
#include "base/values.h" |
+#include "chrome/common/pref_names.h" |
#include "testing/gtest/include/gtest/gtest.h" |
class PrefServiceHashStoreContentsTest : public testing::Test { |
@@ -43,6 +44,8 @@ TEST_F(PrefServiceHashStoreContentsTest, IsInitialized) { |
} |
TEST_F(PrefServiceHashStoreContentsTest, Reset) { |
+ ASSERT_FALSE(local_state_.GetUserPrefValue(prefs::kProfilePreferenceHashes)); |
+ |
{ |
PrefServiceHashStoreContents contents("store_id", &local_state_); |
ASSERT_FALSE(contents.IsInitialized()); |
@@ -53,12 +56,18 @@ TEST_F(PrefServiceHashStoreContentsTest, Reset) { |
(*other_contents.GetMutableContents()) |
->Set("foo", new base::StringValue("bar")); |
} |
+ |
+ ASSERT_TRUE(local_state_.GetUserPrefValue(prefs::kProfilePreferenceHashes)); |
+ |
{ |
PrefServiceHashStoreContents contents("store_id", &local_state_); |
ASSERT_TRUE(contents.IsInitialized()); |
contents.Reset(); |
ASSERT_FALSE(contents.IsInitialized()); |
} |
+ |
+ ASSERT_TRUE(local_state_.GetUserPrefValue(prefs::kProfilePreferenceHashes)); |
+ |
{ |
PrefServiceHashStoreContents contents("store_id", &local_state_); |
ASSERT_FALSE(contents.IsInitialized()); |
@@ -66,6 +75,14 @@ TEST_F(PrefServiceHashStoreContentsTest, Reset) { |
&local_state_); |
ASSERT_TRUE(other_contents.IsInitialized()); |
} |
+ |
+ { |
+ PrefServiceHashStoreContents other_contents("other_store_id", |
+ &local_state_); |
+ other_contents.Reset(); |
+ } |
+ |
+ ASSERT_FALSE(local_state_.GetUserPrefValue(prefs::kProfilePreferenceHashes)); |
} |
TEST_F(PrefServiceHashStoreContentsTest, GetAndSetContents) { |