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

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

Issue 10987100: Switch AutofillManager to be UserData on WebContents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix external delegate Created 8 years, 2 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 | « chrome/browser/autofill/autofill_manager.cc ('k') | chrome/browser/autofill/autofill_metrics_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 be1c48178779476cf1ca1273235013a6786fcd59..1452a7cf93f3e164d2b3a46e5efb41da62b4b78a 100644
--- a/chrome/browser/autofill/autofill_manager_unittest.cc
+++ b/chrome/browser/autofill/autofill_manager_unittest.cc
@@ -439,10 +439,10 @@ void ExpectFilledCreditCardYearMonthWithYearMonth(int page_id,
class TestAutofillManager : public AutofillManager {
public:
- TestAutofillManager(autofill::AutofillManagerDelegate* delegate,
- TabContents* tab_contents,
+ TestAutofillManager(content::WebContents* web_contents,
+ autofill::AutofillManagerDelegate* delegate,
TestPersonalDataManager* personal_data)
- : AutofillManager(delegate, tab_contents, personal_data),
+ : AutofillManager(web_contents, delegate, personal_data),
personal_data_(personal_data),
autofill_enabled_(true),
did_finish_async_form_submit_(false),
@@ -605,8 +605,8 @@ class AutofillManagerTest : public TabContentsTestHarness {
TabContentsTestHarness::SetUp();
TabAutofillManagerDelegate::CreateForWebContents(web_contents());
autofill_manager_ = new TestAutofillManager(
+ web_contents(),
TabAutofillManagerDelegate::FromWebContents(web_contents()),
- tab_contents(),
&personal_data_);
file_thread_.Start();
@@ -3129,11 +3129,12 @@ TEST_F(AutofillManagerTest, TestTabContentsWithExternalDelegate) {
WebContents* contents = CreateTestWebContents();
SetContents(contents);
- AutofillManager* autofill_manager = tab_contents()->autofill_manager();
+ AutofillManager* autofill_manager =
+ AutofillManager::FromWebContents(contents);
EXPECT_TRUE(autofill_manager->external_delegate());
AutocompleteHistoryManager* autocomplete_history_manager =
- AutocompleteHistoryManager::FromWebContents(web_contents());
+ AutocompleteHistoryManager::FromWebContents(contents);
EXPECT_TRUE(autocomplete_history_manager->external_delegate());
}
« no previous file with comments | « chrome/browser/autofill/autofill_manager.cc ('k') | chrome/browser/autofill/autofill_metrics_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698