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

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

Issue 2481493002: [Merge M55] [Autofill] Do not show the credit card promo if there are CC suggestions. (Closed)
Patch Set: Created 4 years, 1 month 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 | « components/autofill/core/browser/autofill_external_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8807132a05910d4d699a5353985bd46e90b9fc95..59add4d8584ef91cca7db779869845ebf42159bf 100644
--- a/components/autofill/core/browser/autofill_external_delegate_unittest.cc
+++ b/components/autofill/core/browser/autofill_external_delegate_unittest.cc
@@ -195,26 +195,22 @@ TEST_F(AutofillExternalDelegateUnitTest, TestExternalDelegateVirtualCalls) {
0);
}
-// Test that our external delegate properly adds the signin promo and its
+// Test that our external delegate does not add the signin promo and its
// separator in the popup items when there are suggestions.
TEST_F(AutofillExternalDelegateUnitTest,
- TestSigninPromoIsAdded_WithSuggestions) {
+ TestSigninPromoIsNotAdded_WithSuggestions) {
EXPECT_CALL(*autofill_manager_, ShouldShowCreditCardSigninPromo(_, _))
.WillOnce(testing::Return(true));
IssueOnQuery(kQueryId);
// The enums must be cast to ints to prevent compile errors on linux_rel.
- auto element_ids = testing::ElementsAre(
- kAutofillProfileId,
-#if !defined(OS_ANDROID)
- static_cast<int>(POPUP_ITEM_ID_SEPARATOR),
-#endif
- static_cast<int>(POPUP_ITEM_ID_AUTOFILL_OPTIONS),
+ auto element_ids =
+ testing::ElementsAre(kAutofillProfileId,
#if !defined(OS_ANDROID)
- static_cast<int>(POPUP_ITEM_ID_SEPARATOR),
+ static_cast<int>(POPUP_ITEM_ID_SEPARATOR),
#endif
- static_cast<int>(POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO));
+ static_cast<int>(POPUP_ITEM_ID_AUTOFILL_OPTIONS));
EXPECT_CALL(autofill_client_,
ShowAutofillPopup(_, _, SuggestionVectorIdsAre(element_ids), _));
@@ -226,7 +222,7 @@ TEST_F(AutofillExternalDelegateUnitTest,
autofill_item.push_back(Suggestion());
autofill_item[0].frontend_id = kAutofillProfileId;
external_delegate_->OnSuggestionsReturned(kQueryId, autofill_item);
- EXPECT_EQ(1, user_action_tester.GetActionCount(
+ EXPECT_EQ(0, user_action_tester.GetActionCount(
"Signin_Impression_FromAutofillDropdown"));
EXPECT_CALL(
« no previous file with comments | « components/autofill/core/browser/autofill_external_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698