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

Unified Diff: base/prefs/public/pref_member_unittest.cc

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 8 years 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
« no previous file with comments | « base/prefs/public/pref_change_registrar_unittest.cc ('k') | base/prefs/public/pref_service_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/public/pref_member_unittest.cc
diff --git a/base/prefs/public/pref_member_unittest.cc b/base/prefs/public/pref_member_unittest.cc
index eab5a4cc986032c55012c54ff62a2e19fd49c80a..3439c0f04fc37e56a5b8acaf08f6e6c24642cb9a 100644
--- a/base/prefs/public/pref_member_unittest.cc
+++ b/base/prefs/public/pref_member_unittest.cc
@@ -19,16 +19,12 @@ const char kDoublePref[] = "double";
const char kStringPref[] = "string";
const char kStringListPref[] = "string_list";
-void RegisterTestPrefs(PrefService* prefs) {
- prefs->RegisterBooleanPref(kBoolPref, false, PrefService::UNSYNCABLE_PREF);
- prefs->RegisterIntegerPref(kIntPref, 0, PrefService::UNSYNCABLE_PREF);
- prefs->RegisterDoublePref(kDoublePref, 0.0, PrefService::UNSYNCABLE_PREF);
- prefs->RegisterStringPref(kStringPref,
- "default",
- PrefService::UNSYNCABLE_PREF);
- prefs->RegisterListPref(kStringListPref,
- new ListValue(),
- PrefService::UNSYNCABLE_PREF);
+void RegisterTestPrefs(PrefServiceSimple* prefs) {
+ prefs->RegisterBooleanPref(kBoolPref, false);
+ prefs->RegisterIntegerPref(kIntPref, 0);
+ prefs->RegisterDoublePref(kDoublePref, 0.0);
+ prefs->RegisterStringPref(kStringPref, "default");
+ prefs->RegisterListPref(kStringListPref, new ListValue());
}
class GetPrefValueHelper
@@ -104,7 +100,7 @@ class PrefMemberTestClass {
} // anonymous namespace
TEST(PrefMemberTest, BasicGetAndSet) {
- TestingPrefService prefs;
+ TestingPrefServiceSimple prefs;
RegisterTestPrefs(&prefs);
// Test bool
@@ -250,7 +246,7 @@ TEST(PrefMemberTest, InvalidList) {
TEST(PrefMemberTest, TwoPrefs) {
// Make sure two DoublePrefMembers stay in sync.
- TestingPrefService prefs;
+ TestingPrefServiceSimple prefs;
RegisterTestPrefs(&prefs);
DoublePrefMember pref1;
@@ -270,7 +266,7 @@ TEST(PrefMemberTest, TwoPrefs) {
}
TEST(PrefMemberTest, Observer) {
- TestingPrefService prefs;
+ TestingPrefServiceSimple prefs;
RegisterTestPrefs(&prefs);
PrefMemberTestClass test_obj(&prefs);
@@ -302,7 +298,7 @@ TEST(PrefMemberTest, NoInit) {
}
TEST(PrefMemberTest, MoveToThread) {
- TestingPrefService prefs;
+ TestingPrefServiceSimple prefs;
scoped_refptr<GetPrefValueHelper> helper(new GetPrefValueHelper());
RegisterTestPrefs(&prefs);
helper->Init(kBoolPref, &prefs);
« no previous file with comments | « base/prefs/public/pref_change_registrar_unittest.cc ('k') | base/prefs/public/pref_service_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698