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

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

Issue 10910071: Extract abstract base to API directory for ProfileSyncService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More unit test fixes. Created 8 years, 3 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 1f1347f80531502d678664069da0bbd03a143163..01301d50241b0fca0f900411d352b161a58c1067 100644
--- a/chrome/browser/autofill/autofill_manager_unittest.cc
+++ b/chrome/browser/autofill/autofill_manager_unittest.cc
@@ -441,10 +441,10 @@ void ExpectFilledCreditCardYearMonthWithYearMonth(int page_id,
class TestAutofillManager : public AutofillManager {
public:
- TestAutofillManager(TabContents* tab_contents,
+ TestAutofillManager(autofill::AutofillManagerDelegate* delegate,
+ TabContents* tab_contents,
TestPersonalDataManager* personal_data)
- : AutofillManager(&delegate_, tab_contents, personal_data),
- delegate_(tab_contents),
+ : AutofillManager(delegate, tab_contents, personal_data),
personal_data_(personal_data),
autofill_enabled_(true),
did_finish_async_form_submit_(false),
@@ -565,8 +565,6 @@ class TestAutofillManager : public AutofillManager {
// AutofillManager is ref counted.
virtual ~TestAutofillManager() {}
- TabAutofillManagerDelegate delegate_;
-
// Weak reference.
TestPersonalDataManager* personal_data_;
@@ -607,7 +605,9 @@ class AutofillManagerTest : public TabContentsTestHarness {
profile, TestPersonalDataManager::Build);
TabContentsTestHarness::SetUp();
- autofill_manager_ = new TestAutofillManager(tab_contents(),
+ manager_delegate_.reset(new TabAutofillManagerDelegate(tab_contents()));
+ autofill_manager_ = new TestAutofillManager(manager_delegate_.get(),
+ tab_contents(),
&personal_data_);
file_thread_.Start();
@@ -712,6 +712,7 @@ class AutofillManagerTest : public TabContentsTestHarness {
content::TestBrowserThread ui_thread_;
content::TestBrowserThread file_thread_;
+ scoped_ptr<TabAutofillManagerDelegate> manager_delegate_;
scoped_refptr<TestAutofillManager> autofill_manager_;
TestPersonalDataManager personal_data_;
« no previous file with comments | « chrome/browser/autofill/autofill_manager_delegate.h ('k') | chrome/browser/autofill/autofill_metrics_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698