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

Unified Diff: chrome/browser/autofill/autofill_external_delegate_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
« no previous file with comments | « chrome/browser/autofill/DEPS ('k') | chrome/browser/autofill/autofill_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_external_delegate_unittest.cc
diff --git a/chrome/browser/autofill/autofill_external_delegate_unittest.cc b/chrome/browser/autofill/autofill_external_delegate_unittest.cc
index 86ae8eee5c6f1c28a6ef96a9f13f95702c3e8b61..58451f7114378c539066c64c5c4fc4b3e89cf280 100644
--- a/chrome/browser/autofill/autofill_external_delegate_unittest.cc
+++ b/chrome/browser/autofill/autofill_external_delegate_unittest.cc
@@ -63,11 +63,11 @@ class MockAutofillExternalDelegate : public TestAutofillExternalDelegate {
class MockAutofillManager : public AutofillManager {
public:
- explicit MockAutofillManager(TabContents* tab_contents)
+ explicit MockAutofillManager(autofill::AutofillManagerDelegate* delegate,
+ TabContents* tab_contents)
// Force to use the constructor designated for unit test, but we don't
// really need personal_data in this test so we pass a NULL pointer.
- : AutofillManager(&delegate_, tab_contents, NULL),
- delegate_(tab_contents) {
+ : AutofillManager(delegate, tab_contents, NULL) {
}
MOCK_METHOD4(OnFillAutofillFormData,
@@ -78,9 +78,6 @@ class MockAutofillManager : public AutofillManager {
protected:
virtual ~MockAutofillManager() {}
-
- private:
- TabAutofillManagerDelegate delegate_;
};
} // namespace
@@ -93,7 +90,9 @@ class AutofillExternalDelegateUnitTest : public TabContentsTestHarness {
virtual void SetUp() OVERRIDE {
TabContentsTestHarness::SetUp();
- autofill_manager_ = new MockAutofillManager(tab_contents());
+ manager_delegate_.reset(new TabAutofillManagerDelegate(tab_contents()));
+ autofill_manager_ = new MockAutofillManager(manager_delegate_.get(),
+ tab_contents());
external_delegate_.reset(new MockAutofillExternalDelegate(
tab_contents(),
autofill_manager_));
@@ -116,6 +115,7 @@ class AutofillExternalDelegateUnitTest : public TabContentsTestHarness {
external_delegate_->OnQuery(query_id, form, field, bounds, false);
}
+ scoped_ptr<TabAutofillManagerDelegate> manager_delegate_;
scoped_refptr<MockAutofillManager> autofill_manager_;
scoped_ptr<MockAutofillExternalDelegate> external_delegate_;
« no previous file with comments | « chrome/browser/autofill/DEPS ('k') | chrome/browser/autofill/autofill_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698