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

Unified Diff: chrome/browser/ssl/chrome_security_state_model_client_browser_tests.cc

Issue 2414913003: Inform WebContents when a password field is visible (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | components/password_manager/content/browser/content_password_manager_driver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/chrome_security_state_model_client_browser_tests.cc
diff --git a/chrome/browser/ssl/chrome_security_state_model_client_browser_tests.cc b/chrome/browser/ssl/chrome_security_state_model_client_browser_tests.cc
index 64a9b83d86c975ebceb35bf440b583b751500291..2b2cff227c500c05f15335dfab51afb87f0e1f2d 100644
--- a/chrome/browser/ssl/chrome_security_state_model_client_browser_tests.cc
+++ b/chrome/browser/ssl/chrome_security_state_model_client_browser_tests.cc
@@ -966,13 +966,9 @@ IN_PROC_BROWSER_TEST_F(ChromeSecurityStateModelClientTestWithPasswordCcSwitch,
// Tests that when an invisible password field is present on an HTTP page
// load, and when the command-line flag is set, the security level is
-// downgraded to HTTP_SHOW_WARNING.
-//
-// TODO(estark): this will eventually be refined so that the warning
-// will not show up for invisible password
-// inputs. https://codereview.chromium.org/2378503002/
+// *not* downgraded to HTTP_SHOW_WARNING.
IN_PROC_BROWSER_TEST_F(ChromeSecurityStateModelClientTestWithPasswordCcSwitch,
- PasswordSecurityLevelDowngradedForInvisibleInput) {
+ PasswordSecurityLevelNotDowngradedForInvisibleInput) {
content::WebContents* contents =
browser()->tab_strip_model()->GetActiveWebContents();
ASSERT_TRUE(contents);
@@ -987,13 +983,13 @@ IN_PROC_BROWSER_TEST_F(ChromeSecurityStateModelClientTestWithPasswordCcSwitch,
"/password/invisible_password.html"));
security_state::SecurityStateModel::SecurityInfo security_info;
model_client->GetSecurityInfo(&security_info);
- EXPECT_EQ(security_state::SecurityStateModel::HTTP_SHOW_WARNING,
+ EXPECT_EQ(security_state::SecurityStateModel::NONE,
security_info.security_level);
content::NavigationEntry* entry = contents->GetController().GetVisibleEntry();
ASSERT_TRUE(entry);
- EXPECT_TRUE(entry->GetSSL().content_status &
- content::SSLStatus::DISPLAYED_PASSWORD_FIELD_ON_HTTP);
+ EXPECT_FALSE(entry->GetSSL().content_status &
+ content::SSLStatus::DISPLAYED_PASSWORD_FIELD_ON_HTTP);
}
// Tests that when a visible password field is detected inside an iframe
« no previous file with comments | « no previous file | components/password_manager/content/browser/content_password_manager_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698