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

Unified Diff: chrome/browser/autofill/autofill_manager.h

Issue 3160022: AutoFillManagerTest.GetProfileSuggestionsEmptyValue crashes in official build... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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.h
===================================================================
--- chrome/browser/autofill/autofill_manager.h (revision 56214)
+++ chrome/browser/autofill/autofill_manager.h (working copy)
@@ -94,6 +94,7 @@
AutoFillManager();
AutoFillManager(TabContents* tab_contents,
PersonalDataManager* personal_data);
+
void set_personal_data_manager(PersonalDataManager* personal_data) {
personal_data_ = personal_data;
}
@@ -174,6 +175,11 @@
static int PackIDs(int cc_id, int profile_id);
static void UnpackIDs(int id, int* cc_id, int* profile_id);
+ // The following function is meant to be called from unit-test only.
+ void set_disable_download_manager_requests(bool value) {
+ disable_download_manager_requests_ = value;
+ }
+
// The TabContents hosting this AutoFillManager.
// Weak reference.
// May not be NULL.
@@ -188,6 +194,11 @@
// Handles queries and uploads to AutoFill servers.
AutoFillDownloadManager download_manager_;
+ // Should be set to true in AutoFillManagerTest and other tests, false in
+ // AutoFillDownloadManagerTest and in non-test environment. Is false by
+ // default.
+ bool disable_download_manager_requests_;
+
// Our copy of the form data.
ScopedVector<FormStructure> form_structures_;
@@ -197,7 +208,7 @@
// The InfoBar that asks for permission to store credit card information.
scoped_ptr<AutoFillCCInfoBarDelegate> cc_infobar_;
- friend class AutoFillManagerTest;
+ friend class TestAutoFillManager;
FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillCreditCardForm);
FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillNonBillingFormSemicolon);
FRIEND_TEST_ALL_PREFIXES(AutoFillManagerTest, FillBillFormSemicolon);
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_manager.cc » ('j') | chrome/browser/autofill/autofill_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698