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

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

Issue 3051001: Adjust preference sync code to only sync user modifiable preferences. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: separate out the download_manager_unittest.cc fixes 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 | « chrome/browser/dom_ui/new_tab_ui_uitest.cc ('k') | chrome/browser/managed_prefs_banner_base_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/shown_sections_handler_unittest.cc
diff --git a/chrome/browser/dom_ui/shown_sections_handler_unittest.cc b/chrome/browser/dom_ui/shown_sections_handler_unittest.cc
index 42fa47a98ff9a051bdfc362e5a3cb0912e9576fe..934c55aa6de234a5ad4254c88f39eccc2b96ac3e 100644
--- a/chrome/browser/dom_ui/shown_sections_handler_unittest.cc
+++ b/chrome/browser/dom_ui/shown_sections_handler_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -7,20 +7,17 @@
#include "base/file_path.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/chrome_thread.h"
-#include "chrome/browser/pref_service.h"
#include "chrome/browser/pref_value_store.h"
#include "chrome/common/json_pref_store.h"
#include "chrome/common/pref_names.h"
+#include "chrome/test/testing_pref_service.h"
#include "testing/gtest/include/gtest/gtest.h"
class ShownSectionsHandlerTest : public testing::Test {
};
TEST_F(ShownSectionsHandlerTest, MigrateUserPrefs) {
- // Create a preference value that has only user defined
- // preference values.
- FilePath user_prefs = FilePath();
- scoped_ptr<PrefService> pref(PrefService::CreateUserPrefService(user_prefs));
+ scoped_ptr<PrefService> pref(new TestingPrefService);
// Set an *old* value
pref->RegisterIntegerPref(prefs::kNTPShownSections, 0);
@@ -38,8 +35,7 @@ TEST_F(ShownSectionsHandlerTest, MigrateUserPrefs) {
}
TEST_F(ShownSectionsHandlerTest, MigrateUserPrefs1To2) {
- FilePath user_prefs = FilePath();
- scoped_ptr<PrefService> pref(PrefService::CreateUserPrefService(user_prefs));
+ scoped_ptr<PrefService> pref(new TestingPrefService);
// Set an *old* value
pref->RegisterIntegerPref(prefs::kNTPShownSections, 0);
@@ -52,4 +48,3 @@ TEST_F(ShownSectionsHandlerTest, MigrateUserPrefs1To2) {
EXPECT_TRUE(shown_sections & THUMB);
EXPECT_FALSE(shown_sections & LIST);
}
-
« no previous file with comments | « chrome/browser/dom_ui/new_tab_ui_uitest.cc ('k') | chrome/browser/managed_prefs_banner_base_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698