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

Unified Diff: components/autofill/core/browser/autofill_common_test.cc

Issue 17465003: Fix most tests in //components/autofill/content to not depend on //chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge LKGR Created 7 years, 6 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 | « components/autofill/core/browser/autofill_common_test.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/autofill_common_test.cc
diff --git a/components/autofill/core/browser/autofill_common_test.cc b/components/autofill/core/browser/autofill_common_test.cc
index 948f4ab93e48a813117021ebd67ee337248488c3..3313c2360b40ca575f025fad970b61354b8005c0 100644
--- a/components/autofill/core/browser/autofill_common_test.cc
+++ b/components/autofill/core/browser/autofill_common_test.cc
@@ -7,13 +7,13 @@
#include "base/guid.h"
#include "base/prefs/pref_service.h"
#include "base/strings/utf_string_conversions.h"
-#include "chrome/browser/profiles/profile.h"
#include "components/autofill/core/browser/autofill_profile.h"
#include "components/autofill/core/browser/credit_card.h"
#include "components/autofill/core/common/autofill_pref_names.h"
#include "components/autofill/core/common/form_field_data.h"
#include "components/user_prefs/user_prefs.h"
#include "components/webdata/encryptor/encryptor.h"
+#include "content/public/browser/browser_context.h"
namespace autofill {
namespace test {
@@ -142,7 +142,7 @@ void SetCreditCardInfo(CreditCard* credit_card,
check_and_set(credit_card, CREDIT_CARD_EXP_4_DIGIT_YEAR, expiration_year);
}
-void DisableSystemServices(Profile* profile) {
+void DisableSystemServices(content::BrowserContext* browser_context) {
// Use a mock Keychain rather than the OS one to store credit card data.
#if defined(OS_MACOSX)
Encryptor::UseMockKeychain(true);
@@ -150,8 +150,8 @@ void DisableSystemServices(Profile* profile) {
// Disable auxiliary profiles for unit testing. These reach out to system
// services on the Mac.
- if (profile) {
- user_prefs::UserPrefs::Get(profile)->SetBoolean(
+ if (browser_context) {
+ user_prefs::UserPrefs::Get(browser_context)->SetBoolean(
prefs::kAutofillAuxiliaryProfilesEnabled, false);
}
}
« no previous file with comments | « components/autofill/core/browser/autofill_common_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698