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

Unified Diff: chrome/browser/autofill/autocomplete_history_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
Index: chrome/browser/autofill/autocomplete_history_manager_unittest.cc
diff --git a/chrome/browser/autofill/autocomplete_history_manager_unittest.cc b/chrome/browser/autofill/autocomplete_history_manager_unittest.cc
index a09eb1077513ec4b97e46238d3f7d0c748280edd..471fbfdff6639d9eb75a79ae459a57897ec8b5e8 100644
--- a/chrome/browser/autofill/autocomplete_history_manager_unittest.cc
+++ b/chrome/browser/autofill/autocomplete_history_manager_unittest.cc
@@ -9,9 +9,9 @@
#include "base/string16.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/autofill/autocomplete_history_manager.h"
+#include "chrome/browser/autofill/autofill_external_delegate.h"
#include "chrome/browser/autofill/autofill_manager.h"
-#include "chrome/browser/autofill/autofill_manager_delegate.h"
-#include "chrome/browser/autofill/test_autofill_external_delegate.h"
+#include "chrome/browser/autofill/test_autofill_manager_delegate.h"
#include "chrome/browser/webdata/autofill_web_data_service_impl.h"
#include "chrome/browser/webdata/web_data_service.h"
#include "chrome/browser/webdata/web_data_service_factory.h"
@@ -55,39 +55,12 @@ class MockWebDataService : public WebDataService {
MockWebDataService* MockWebDataService::current_mock_web_data_service_ = NULL;
-class MockAutofillManagerDelegate : public autofill::AutofillManagerDelegate {
+class MockAutofillManagerDelegate
+ : public autofill::TestAutofillManagerDelegate {
public:
MockAutofillManagerDelegate() {}
virtual ~MockAutofillManagerDelegate() {}
-
- // AutofillManagerDelegate:
- virtual PersonalDataManager* GetPersonalDataManager() OVERRIDE {
- return NULL;
- }
- virtual InfoBarService* GetInfoBarService() { return NULL; }
virtual PrefService* GetPrefs() { return &prefs_; }
- virtual ProfileSyncServiceBase* GetProfileSyncService() { return NULL; }
- virtual void HideRequestAutocompleteDialog() OVERRIDE {}
- virtual bool IsSavingPasswordsEnabled() const { return false; }
- virtual void OnAutocheckoutError() OVERRIDE {}
- virtual void ShowAutofillSettings() {}
- virtual void ShowPasswordGenerationBubble(
- const gfx::Rect& bounds,
- const content::PasswordForm& form,
- autofill::PasswordGenerator* generator) {}
- virtual void ShowAutocheckoutBubble(
- const gfx::RectF& bounding_box,
- const gfx::NativeView& native_view,
- const base::Closure& callback) {}
- virtual void ShowRequestAutocompleteDialog(
- const FormData& form,
- const GURL& source_url,
- const content::SSLStatus& ssl_status,
- const AutofillMetrics& metric_logger,
- autofill::DialogType dialog_type,
- const base::Callback<void(const FormStructure*)>& callback) {}
- virtual void RequestAutocompleteDialogClosed() {}
- virtual void UpdateProgressBar(double value) {}
private:
TestingPrefServiceSimple prefs_;
@@ -210,20 +183,13 @@ TEST_F(AutocompleteHistoryManagerTest, SearchField) {
namespace {
-class MockAutofillExternalDelegate :
- public autofill::TestAutofillExternalDelegate {
+class MockAutofillExternalDelegate : public AutofillExternalDelegate {
public:
explicit MockAutofillExternalDelegate(content::WebContents* web_contents)
- : TestAutofillExternalDelegate(
+ : AutofillExternalDelegate(
web_contents, AutofillManager::FromWebContents(web_contents)) {}
virtual ~MockAutofillExternalDelegate() {}
- virtual void ApplyAutofillSuggestions(
- const std::vector<string16>& autofill_values,
- const std::vector<string16>& autofill_labels,
- const std::vector<string16>& autofill_icons,
- const std::vector<int>& autofill_unique_ids) OVERRIDE {};
-
MOCK_METHOD5(OnSuggestionsReturned,
void(int query_id,
const std::vector<string16>& autofill_values,
« no previous file with comments | « chrome/browser/autofill/autocheckout_manager_unittest.cc ('k') | chrome/browser/autofill/autofill_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698