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

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

Issue 14622003: components: Move PrefRegistrySyncable into user_prefs namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 years, 8 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
« no previous file with comments | « chrome/browser/prefs/session_startup_pref.cc ('k') | chrome/browser/printing/cloud_print/cloud_print_url.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/session_startup_pref_unittest.cc
diff --git a/chrome/browser/prefs/session_startup_pref_unittest.cc b/chrome/browser/prefs/session_startup_pref_unittest.cc
index 7f7c5a43ab9b4cea641aeac98357ce73be462207..2e3aeb32130260635ef3081c5a0c0228a9f4a867 100644
--- a/chrome/browser/prefs/session_startup_pref_unittest.cc
+++ b/chrome/browser/prefs/session_startup_pref_unittest.cc
@@ -19,14 +19,16 @@ class SessionStartupPrefTest : public testing::Test {
virtual void SetUp() {
pref_service_.reset(new TestingPrefServiceSyncable);
SessionStartupPref::RegisterUserPrefs(registry());
- registry()->RegisterBooleanPref(prefs::kHomePageIsNewTabPage,
- true,
- PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry()->RegisterBooleanPref(
+ prefs::kHomePageIsNewTabPage,
+ true,
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
// Make the tests independent of the Mac startup pref migration (see
// SessionStartupPref::MigrateMacDefaultPrefIfNecessary).
- registry()->RegisterStringPref(prefs::kProfileCreatedByVersion,
- "22.0.0.0",
- PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry()->RegisterStringPref(
+ prefs::kProfileCreatedByVersion,
+ "22.0.0.0",
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
}
bool IsUseLastOpenDefault() {
@@ -38,7 +40,7 @@ class SessionStartupPrefTest : public testing::Test {
#endif
}
- PrefRegistrySyncable* registry() {
+ user_prefs::PrefRegistrySyncable* registry() {
return pref_service_->registry();
}
@@ -87,8 +89,10 @@ TEST_F(SessionStartupPrefTest, URLListManagedOverridesUser) {
// (so that, in effect, the default value "Open the homepage" was selected),
// their preferences are migrated on upgrade to m19.
TEST_F(SessionStartupPrefTest, DefaultMigration) {
- registry()->RegisterStringPref(prefs::kHomePage, "http://google.com/",
- PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry()->RegisterStringPref(
+ prefs::kHomePage,
+ "http://google.com/",
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
pref_service_->SetString(prefs::kHomePage, "http://chromium.org/");
pref_service_->SetBoolean(prefs::kHomePageIsNewTabPage, false);
@@ -112,8 +116,10 @@ TEST_F(SessionStartupPrefTest, DefaultMigration) {
// and the NTP is being used for the homepage, their preferences are migrated
// to "Open the New Tab Page" on upgrade to M19.
TEST_F(SessionStartupPrefTest, DefaultMigrationHomepageIsNTP) {
- registry()->RegisterStringPref(prefs::kHomePage, "http://google.com/",
- PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry()->RegisterStringPref(
+ prefs::kHomePage,
+ "http://google.com/",
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
pref_service_->SetString(prefs::kHomePage, "http://chromium.org/");
pref_service_->SetBoolean(prefs::kHomePageIsNewTabPage, true);
@@ -134,8 +140,10 @@ TEST_F(SessionStartupPrefTest, DefaultMigrationHomepageIsNTP) {
// Checks to make sure that if the user had previously selected "Open the
// "homepage", their preferences are migrated on upgrade to M19.
TEST_F(SessionStartupPrefTest, HomePageMigration) {
- registry()->RegisterStringPref(prefs::kHomePage, "http://google.com/",
- PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry()->RegisterStringPref(
+ prefs::kHomePage,
+ "http://google.com/",
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
// By design, it's impossible to set the 'restore on startup' pref to 0
// ("open the homepage") using SessionStartupPref::SetStartupPref(), so set it
@@ -156,8 +164,10 @@ TEST_F(SessionStartupPrefTest, HomePageMigration) {
// "homepage", and the NTP is being used for the homepage, their preferences
// are migrated on upgrade to M19.
TEST_F(SessionStartupPrefTest, HomePageMigrationHomepageIsNTP) {
- registry()->RegisterStringPref(prefs::kHomePage, "http://google.com/",
- PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry()->RegisterStringPref(
+ prefs::kHomePage,
+ "http://google.com/",
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
// By design, it's impossible to set the 'restore on startup' pref to 0
// ("open the homepage") using SessionStartupPref::SetStartupPref(), so set it
« no previous file with comments | « chrome/browser/prefs/session_startup_pref.cc ('k') | chrome/browser/printing/cloud_print/cloud_print_url.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698