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

Unified Diff: chrome/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/service/service_process_prefs.cc ('k') | chrome/test/testing_pref_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/reliability/page_load_test.cc
diff --git a/chrome/test/reliability/page_load_test.cc b/chrome/test/reliability/page_load_test.cc
index 571c16a99875fd88ef603159c404465fee01145e..fa06d562356909475f93eef5902e62e37f0c9b23 100644
--- a/chrome/test/reliability/page_load_test.cc
+++ b/chrome/test/reliability/page_load_test.cc
@@ -50,6 +50,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/common/automation_messages.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
@@ -63,8 +64,8 @@
#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 "net/base/net_util.h"
namespace {
@@ -532,12 +533,8 @@ class PageLoadTest : public UITest {
// that was saved by the app as it closed. The caller takes ownership of the
// returned PrefService object.
PrefService* GetLocalState() {
- FilePath local_state_path = user_data_dir()
- .Append(chrome::kLocalStateFilename);
-
- PrefService* local_state = PrefService::CreateUserPrefService(
- local_state_path);
- return local_state;
+ FilePath path = user_data_dir().Append(chrome::kLocalStateFilename);
+ return PrefServiceMockBuilder().WithUserFilePrefs(path).Create();
}
void GetStabilityMetrics(NavigationMetrics* metrics) {
« no previous file with comments | « chrome/service/service_process_prefs.cc ('k') | chrome/test/testing_pref_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698