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

Unified Diff: components/autofill/core/browser/autofill_external_delegate_unittest.cc

Issue 184103016: Autofill: Refactoring to support fetching password after a username is selected (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Actually fix compile failure. Created 6 years, 8 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: components/autofill/core/browser/autofill_external_delegate_unittest.cc
diff --git a/components/autofill/core/browser/autofill_external_delegate_unittest.cc b/components/autofill/core/browser/autofill_external_delegate_unittest.cc
index c1f89af06e7011c9d0271aec21e7f5446ee45bc1..8d002805744358cb7270091cc49008fb3b303ebe 100644
--- a/components/autofill/core/browser/autofill_external_delegate_unittest.cc
+++ b/components/autofill/core/browser/autofill_external_delegate_unittest.cc
@@ -397,52 +397,6 @@ TEST_F(AutofillExternalDelegateUnitTest,
external_delegate_->DidEndTextFieldEditing();
}
-// Test that the popup is marked as visible after recieving password
-// suggestions.
-TEST_F(AutofillExternalDelegateUnitTest, ExternalDelegatePasswordSuggestions) {
- static const base::string16 kUsername = ASCIIToUTF16("username");
- static const base::string16 kSignonRealm = ASCIIToUTF16("http://foo.com/");
- std::vector<base::string16> suggestions;
- suggestions.push_back(kUsername);
- std::vector<base::string16> realms;
- realms.push_back(kSignonRealm);
-
- FormFieldData field;
- field.is_focusable = true;
- field.should_autocomplete = true;
- const gfx::RectF element_bounds;
-
- FormFieldData username_field_data;
- username_field_data.value = kUsername;
- PasswordFormFillData password_form_fill_data;
- password_form_fill_data.basic_data.fields.push_back(username_field_data);
- external_delegate_->AddPasswordFormMapping(field, password_form_fill_data);
-
- // The enums must be cast to ints to prevent compile errors on linux_rel.
- EXPECT_CALL(
- manager_delegate_,
- ShowAutofillPopup(
- _,
- _,
- _,
- _,
- _,
- testing::ElementsAre(static_cast<int>(POPUP_ITEM_ID_PASSWORD_ENTRY)),
- _));
-
- external_delegate_->OnShowPasswordSuggestions(suggestions,
- realms,
- field,
- element_bounds);
-
- EXPECT_CALL(manager_delegate_, HideAutofillPopup());
-
- // This should trigger a call to hide the popup since
- // we've selected an option.
- external_delegate_->DidAcceptSuggestion(suggestions[0],
- POPUP_ITEM_ID_PASSWORD_ENTRY);
-}
-
// Test that the driver is directed to accept the data list after being notified
// that the user accepted the data list suggestion.
TEST_F(AutofillExternalDelegateUnitTest, ExternalDelegateAcceptSuggestion) {
« no previous file with comments | « components/autofill/core/browser/autofill_external_delegate.cc ('k') | components/autofill/core/browser/autofill_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698