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

Unified Diff: chrome_frame/test/reliability/page_load_test.cc

Issue 5646003: Sanitize PrefStore interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix PrefService mock construction in PrefServiceTest to include command line store. Created 10 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 | « chrome/test/testing_profile.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/test/reliability/page_load_test.cc
diff --git a/chrome_frame/test/reliability/page_load_test.cc b/chrome_frame/test/reliability/page_load_test.cc
index 41164642a7594b99756dfc0dc9aaba82193e4463..3afdadfe89c12b8fb8f3942186aa6f6724210ccb 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) {
« no previous file with comments | « chrome/test/testing_profile.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698