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

Unified Diff: chrome/browser/autofill/autofill_manager_unittest.cc

Issue 12340111: Introduce //components/user_prefs, use to eliminate c/b/prefs dependency in Autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pure merge of LKGR Created 7 years, 10 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
Index: chrome/browser/autofill/autofill_manager_unittest.cc
diff --git a/chrome/browser/autofill/autofill_manager_unittest.cc b/chrome/browser/autofill/autofill_manager_unittest.cc
index b730e49e243f5917952da6e9865efe57c6d16434..bafbf040f5c19437c6ce0a8b55f705d173657e42 100644
--- a/chrome/browser/autofill/autofill_manager_unittest.cc
+++ b/chrome/browser/autofill/autofill_manager_unittest.cc
@@ -38,6 +38,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/testing_profile.h"
+#include "components/user_prefs/user_prefs.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/ssl_status.h"
#include "content/public/test/mock_render_process_host.h"
@@ -1808,7 +1809,7 @@ TEST_F(AutofillManagerTest, FillAddressForm) {
// Test that we correctly fill an address form from an auxiliary profile.
TEST_F(AutofillManagerTest, FillAddressFormFromAuxiliaryProfile) {
personal_data_.ClearAutofillProfiles();
- PrefService* prefs = PrefServiceFromBrowserContext(profile());
+ PrefService* prefs = components::UserPrefs::Get(profile());
prefs->SetBoolean(prefs::kAutofillAuxiliaryProfilesEnabled, true);
personal_data_.CreateTestAuxiliaryProfiles();
@@ -2702,7 +2703,7 @@ TEST_F(AutofillManagerTest, FormSubmittedWithDefaultValues) {
// Checks that resetting the auxiliary profile enabled preference does the right
// thing on all platforms.
TEST_F(AutofillManagerTest, AuxiliaryProfilesReset) {
- PrefService* prefs = PrefServiceFromBrowserContext(profile());
+ PrefService* prefs = components::UserPrefs::Get(profile());
#if defined(OS_MACOSX)
// Auxiliary profiles is implemented on Mac only. It enables Mac Address
// Book integration.
@@ -3003,7 +3004,7 @@ TEST_F(AutofillManagerTest, UpdatePasswordSyncState) {
web_contents(),
PasswordManagerDelegateImpl::FromWebContents(web_contents()));
- PrefService* prefs = PrefServiceFromBrowserContext(profile());
+ PrefService* prefs = components::UserPrefs::Get(profile());
// Allow this test to control what should get synced.
prefs->SetBoolean(prefs::kSyncKeepEverythingSynced, false);
@@ -3061,7 +3062,7 @@ TEST_F(IncognitoAutofillManagerTest, UpdatePasswordSyncStateIncognito) {
web_contents(),
PasswordManagerDelegateImpl::FromWebContents(web_contents()));
- PrefService* prefs = PrefServiceFromBrowserContext(profile());
+ PrefService* prefs = components::UserPrefs::Get(profile());
// Allow this test to control what should get synced.
prefs->SetBoolean(prefs::kSyncKeepEverythingSynced, false);
@@ -3081,7 +3082,7 @@ TEST_F(AutofillManagerTest, UpdatePasswordGenerationState) {
web_contents(),
PasswordManagerDelegateImpl::FromWebContents(web_contents()));
- PrefService* prefs = PrefServiceFromBrowserContext(profile());
+ PrefService* prefs = components::UserPrefs::Get(profile());
// Always set password sync enabled so we can test the behavior of password
// generation.

Powered by Google App Engine
This is Rietveld 408576698