| 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 5ed3e78ddbde8a0fba290eee8fd8f9f039e681d7..feca879941511c09fe93a334e041ee9e7b8db788 100644
|
| --- a/ios/web/web_state/ui/crw_web_controller_unittest.mm
|
| +++ b/ios/web/web_state/ui/crw_web_controller_unittest.mm
|
| @@ -769,6 +769,19 @@ TEST_F(CRWWebControllerNavigationTest, GoToEntryWithoutDocumentChange) {
|
| session_controller.currentEntry);
|
| }
|
|
|
| +// Tests that didShowPasswordInputOnHTTP updates the SSLStatus to indicate that
|
| +// a password field has been displayed on an HTTP page.
|
| +TEST_F(CRWWebControllerNavigationTest, HTTPPassword) {
|
| + 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_PASSWORD_FIELD_ON_HTTP);
|
| + [web_controller() didShowPasswordInputOnHTTP];
|
| + EXPECT_TRUE(nav_manager.GetLastCommittedItem()->GetSSL().content_status &
|
| + web::SSLStatus::DISPLAYED_PASSWORD_FIELD_ON_HTTP);
|
| +}
|
| +
|
| // Real WKWebView is required for CRWWebControllerJSExecutionTest.
|
| typedef web::WebTestWithWebController CRWWebControllerJSExecutionTest;
|
|
|
|
|