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

Unified Diff: chrome/browser/dom_ui/new_tab_ui_uitest.cc

Issue 2823037: Add an ExtensionPrefStore, layered between the user prefs nad the managed pre... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 | « no previous file | chrome/browser/dom_ui/shown_sections_handler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/new_tab_ui_uitest.cc
===================================================================
--- chrome/browser/dom_ui/new_tab_ui_uitest.cc (revision 52073)
+++ chrome/browser/dom_ui/new_tab_ui_uitest.cc (working copy)
@@ -75,30 +75,26 @@
TEST_F(NewTabUITest, UpdateUserPrefsVersion) {
// PrefService with JSON user-pref file only, no enforced or advised prefs.
- PrefService prefs(new PrefValueStore(
- NULL, /* no enforced prefs */
- new JsonPrefStore(
- FilePath(),
- ChromeThread::GetMessageLoopProxyForThread(ChromeThread::FILE)),
- /* user prefs */
- NULL /* no advised prefs */));
+ FilePath user_prefs = FilePath();
+ scoped_ptr<PrefService> prefs(
+ PrefService::CreateUserPrefService(user_prefs));
// Does the migration
- NewTabUI::RegisterUserPrefs(&prefs);
+ NewTabUI::RegisterUserPrefs(prefs.get());
ASSERT_EQ(NewTabUI::current_pref_version(),
- prefs.GetInteger(prefs::kNTPPrefVersion));
+ prefs->GetInteger(prefs::kNTPPrefVersion));
// Reset the version
- prefs.ClearPref(prefs::kNTPPrefVersion);
- ASSERT_EQ(0, prefs.GetInteger(prefs::kNTPPrefVersion));
+ prefs->ClearPref(prefs::kNTPPrefVersion);
+ ASSERT_EQ(0, prefs->GetInteger(prefs::kNTPPrefVersion));
- bool migrated = NewTabUI::UpdateUserPrefsVersion(&prefs);
+ bool migrated = NewTabUI::UpdateUserPrefsVersion(prefs.get());
ASSERT_TRUE(migrated);
ASSERT_EQ(NewTabUI::current_pref_version(),
- prefs.GetInteger(prefs::kNTPPrefVersion));
+ prefs->GetInteger(prefs::kNTPPrefVersion));
- migrated = NewTabUI::UpdateUserPrefsVersion(&prefs);
+ migrated = NewTabUI::UpdateUserPrefsVersion(prefs.get());
ASSERT_FALSE(migrated);
}
« no previous file with comments | « no previous file | chrome/browser/dom_ui/shown_sections_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698