summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authormnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-09 15:10:17 +0000
committermnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-09 15:10:17 +0000
commitf2d1f61006eac0f8a051fa485b2cffb6b6fa74e0 (patch)
treef848fcb564eaff40eeebcf7044da9972f798bd2b /chrome_frame
parentba99ca24c0ba8f0e154dbd74d8a43a55736630e1 (diff)
downloadchromium_src-f2d1f61006eac0f8a051fa485b2cffb6b6fa74e0.zip
chromium_src-f2d1f61006eac0f8a051fa485b2cffb6b6fa74e0.tar.gz
chromium_src-f2d1f61006eac0f8a051fa485b2cffb6b6fa74e0.tar.bz2
Sanitize PrefStore interface.
This reworks the PrefStore interface, specifically: - Split up the interface into PrefStore, which only provides reading functionality, and the derived PersistentPrefStore for the actual user pref store - Remove the hurt-me-plenty prefs() function from PrefStore, instead provide Get/Set/Remove operations - Remove special handling of default and user pref store from PrefValueStore and put it into PrefService - Pref change notification handling now almost exclusively handled through PrefValueStore - Adjust all consumers of these interfaces (but keep ConfigurationPolicyPrefStore untouched, that's up next on the list) BUG=64232 TEST=existing unit tests Review URL: http://codereview.chromium.org/5646003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68736 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/test/reliability/page_load_test.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/chrome_frame/test/reliability/page_load_test.cc b/chrome_frame/test/reliability/page_load_test.cc
index 4116464..3afdadf 100644
--- a/chrome_frame/test/reliability/page_load_test.cc
+++ b/chrome_frame/test/reliability/page_load_test.cc
@@ -36,6 +36,7 @@
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/net/url_fixer_upper.h"
#include "chrome/browser/prefs/pref_service.h"
+#include "chrome/browser/prefs/pref_service_mock_builder.h"
#include "chrome/browser/prefs/pref_value_store.h"
#include "chrome/common/automation_messages.h"
#include "chrome/common/chrome_constants.h"
@@ -45,14 +46,14 @@
#include "chrome/common/json_pref_store.h"
#include "chrome/common/logging_chrome.h"
#include "chrome/common/pref_names.h"
-#include "chrome_frame/test/chrome_frame_test_utils.h"
-#include "chrome_frame/test/ie_event_sink.h"
#include "chrome/test/automation/automation_proxy.h"
#include "chrome/test/automation/browser_proxy.h"
#include "chrome/test/automation/tab_proxy.h"
#include "chrome/test/automation/window_proxy.h"
-#include "chrome/test/ui/ui_test.h"
#include "chrome/test/reliability/page_load_test.h"
+#include "chrome/test/ui/ui_test.h"
+#include "chrome_frame/test/chrome_frame_test_utils.h"
+#include "chrome_frame/test/ie_event_sink.h"
#include "chrome_frame/utils.h"
#include "net/base/net_util.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -426,12 +427,9 @@ class PageLoadTest : public testing::Test {
// that was saved by the app as it closed. The caller takes ownership of the
// returned PrefService object.
PrefService* GetLocalState() {
- FilePath local_state_path;
- chrome::GetChromeFrameUserDataDirectory(&local_state_path);
-
- PrefService* local_state = PrefService::CreateUserPrefService(
- local_state_path);
- return local_state;
+ FilePath path;
+ chrome::GetChromeFrameUserDataDirectory(&path);
+ return PrefServiceMockBuilder().WithUserFilePrefs(path).Create();
}
void GetStabilityMetrics(NavigationMetrics* metrics) {