| Index: ios/web/web_state/ui/crw_web_controller_unittest.mm
|
| diff --git a/ios/web/web_state/ui/crw_web_controller_unittest.mm b/ios/web/web_state/ui/crw_web_controller_unittest.mm
|
| index 364580c4a571f74b2164b67b8e8b2c3b3e787cac..ed3f7d1a4cff7e5465d40db051e2acf1700a63e1 100644
|
| --- a/ios/web/web_state/ui/crw_web_controller_unittest.mm
|
| +++ b/ios/web/web_state/ui/crw_web_controller_unittest.mm
|
| @@ -707,6 +707,19 @@ TEST_F(CRWWebControllerNavigationTest, HTTPPassword) {
|
| web::SSLStatus::DISPLAYED_PASSWORD_FIELD_ON_HTTP);
|
| }
|
|
|
| +// Tests that didShowCreditCardInputOnHTTP updates the SSLStatus to indicate
|
| +// that a credit card field has been displayed on an HTTP page.
|
| +TEST_F(CRWWebControllerNavigationTest, HTTPCreditCard) {
|
| + LoadHtml(@"<html><body></body></html>", GURL("http://chromium.test"));
|
| + NavigationManagerImpl& nav_manager =
|
| + web_controller().webStateImpl->GetNavigationManagerImpl();
|
| + EXPECT_FALSE(nav_manager.GetLastCommittedItem()->GetSSL().content_status &
|
| + web::SSLStatus::DISPLAYED_CREDIT_CARD_FIELD_ON_HTTP);
|
| + [web_controller() didShowCreditCardInputOnHTTP];
|
| + EXPECT_TRUE(nav_manager.GetLastCommittedItem()->GetSSL().content_status &
|
| + web::SSLStatus::DISPLAYED_CREDIT_CARD_FIELD_ON_HTTP);
|
| +}
|
| +
|
| // Real WKWebView is required for CRWWebControllerFormActivityTest.
|
| typedef web::WebTestWithWebController CRWWebControllerFormActivityTest;
|
|
|
|
|