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

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

Issue 2505533002: Http Bad: Add "Learn more" sublabel to warning message and make it clickable (Closed)
Patch Set: rebase Created 4 years 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 d0e28d5476ddd1cb49aa4d35932a6b77ff185aff..97bd64b385ce92fc60b0cf77fe29eb70bdbf15c5 100644
--- a/components/autofill/core/browser/autofill_external_delegate_unittest.cc
+++ b/components/autofill/core/browser/autofill_external_delegate_unittest.cc
@@ -80,6 +80,8 @@ class MockAutofillClient : public TestAutofillClient {
MOCK_METHOD0(StartSigninFlow, void());
+ MOCK_METHOD0(ShowHttpNotSecureExplanation, void());
+
private:
DISALLOW_COPY_AND_ASSIGN(MockAutofillClient);
};
@@ -671,6 +673,15 @@ TEST_F(AutofillExternalDelegateUnitTest, SigninPromoMenuItem) {
base::string16(), POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO, 0);
}
+// Test that autofill client will open the security indicator help center url
+// after the user accepted the http warning message suggestion item.
+TEST_F(AutofillExternalDelegateUnitTest, HttpWarningMessageItem) {
+ EXPECT_CALL(autofill_client_, ShowHttpNotSecureExplanation());
+ EXPECT_CALL(autofill_client_, HideAutofillPopup());
+ external_delegate_->DidAcceptSuggestion(
+ base::string16(), POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE, 0);
+}
+
MATCHER_P(CreditCardMatches, card, "") {
return !arg.Compare(card);
}
« no previous file with comments | « components/autofill/core/browser/autofill_external_delegate.cc ('k') | components/autofill/core/browser/autofill_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698