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

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

Issue 12340065: Move the UI related code from AutofillExternalDelegate to AutofillManagerDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Try to fix AutofillTest.DisableAutocompleteWhileFilling Created 7 years, 10 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/autocomplete_history_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autocheckout_manager_unittest.cc
diff --git a/chrome/browser/autofill/autocheckout_manager_unittest.cc b/chrome/browser/autofill/autocheckout_manager_unittest.cc
index 8c22bce433a4f30db662f9c71a6f3d48816949f2..2e7b97465fe546d05670384f558848d1c6afe0ed 100644
--- a/chrome/browser/autofill/autocheckout_manager_unittest.cc
+++ b/chrome/browser/autofill/autocheckout_manager_unittest.cc
@@ -7,8 +7,8 @@
#include "chrome/browser/autofill/autocheckout_manager.h"
#include "chrome/browser/autofill/autofill_common_test.h"
#include "chrome/browser/autofill/autofill_manager.h"
-#include "chrome/browser/autofill/autofill_manager_delegate.h"
#include "chrome/browser/autofill/form_structure.h"
+#include "chrome/browser/autofill/test_autofill_manager_delegate.h"
#include "chrome/common/autofill_messages.h"
#include "chrome/common/form_data.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
@@ -198,51 +198,20 @@ scoped_ptr<FormStructure> FakeUserSubmittedFormStructure() {
return form_structure.Pass();
}
-class TestAutofillManagerDelegate : public AutofillManagerDelegate {
+class MockAutofillManagerDelegate : public TestAutofillManagerDelegate {
public:
- TestAutofillManagerDelegate()
+ MockAutofillManagerDelegate()
: request_autocomplete_dialog_open_(false),
- autocheckout_bubble_shown_(false) {
- }
-
- virtual ~TestAutofillManagerDelegate() {
- }
-
- virtual InfoBarService* GetInfoBarService() OVERRIDE {
- return NULL;
- }
-
- virtual PersonalDataManager* GetPersonalDataManager() OVERRIDE {
- return NULL;
- }
-
- virtual PrefService* GetPrefs() OVERRIDE {
- return NULL;
- }
+ autocheckout_bubble_shown_(false) {}
- virtual ProfileSyncServiceBase* GetProfileSyncService() OVERRIDE {
- return NULL;
- }
+ virtual ~MockAutofillManagerDelegate() {}
virtual void HideRequestAutocompleteDialog() OVERRIDE {
request_autocomplete_dialog_open_ = false;
}
- virtual bool IsSavingPasswordsEnabled() const OVERRIDE {
- return false;
- }
-
MOCK_METHOD0(OnAutocheckoutError, void());
- virtual void ShowAutofillSettings() OVERRIDE {
- }
-
- virtual void ShowPasswordGenerationBubble(
- const gfx::Rect& bounds,
- const content::PasswordForm& form,
- PasswordGenerator* generator) OVERRIDE {
- }
-
virtual void ShowAutocheckoutBubble(
const gfx::RectF& bounds,
const gfx::NativeView& native_view,
@@ -262,9 +231,6 @@ class TestAutofillManagerDelegate : public AutofillManagerDelegate {
callback.Run(user_supplied_data_.get());
}
- virtual void RequestAutocompleteDialogClosed() OVERRIDE {
- }
-
MOCK_METHOD1(UpdateProgressBar, void(double value));
void SetUserSuppliedData(scoped_ptr<FormStructure> user_supplied_data) {
@@ -374,12 +340,12 @@ class AutocheckoutManagerTest : public ChromeRenderViewHostTestHarness {
content::TestBrowserThread ui_thread_;
scoped_ptr<TestAutofillManager> autofill_manager_;
scoped_ptr<TestAutocheckoutManager> autocheckout_manager_;
- scoped_ptr<TestAutofillManagerDelegate> autofill_manager_delegate_;
+ scoped_ptr<MockAutofillManagerDelegate> autofill_manager_delegate_;
private:
virtual void SetUp() OVERRIDE {
ChromeRenderViewHostTestHarness::SetUp();
- autofill_manager_delegate_.reset(new TestAutofillManagerDelegate());
+ autofill_manager_delegate_.reset(new MockAutofillManagerDelegate());
autofill_manager_.reset(new TestAutofillManager(
web_contents(),
autofill_manager_delegate_.get()));
« no previous file with comments | « chrome/browser/autofill/DEPS ('k') | chrome/browser/autofill/autocomplete_history_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698