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

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

Issue 2635423002: Enable HTTP-bad Phase 1 by default except iOS (Closed)
Patch Set: fixes Created 3 years, 11 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/security_state/core/security_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/security_state_tab_helper_browser_tests.cc
diff --git a/chrome/browser/ssl/security_state_tab_helper_browser_tests.cc b/chrome/browser/ssl/security_state_tab_helper_browser_tests.cc
index cf2101d1aea1a9f60342ebfcd4a8fbb2e28c4ad9..21d269b570b18bd99b873ee7fbcc72f7ee8c4dc4 100644
--- a/chrome/browser/ssl/security_state_tab_helper_browser_tests.cc
+++ b/chrome/browser/ssl/security_state_tab_helper_browser_tests.cc
@@ -1053,39 +1053,6 @@ IN_PROC_BROWSER_TEST_F(SecurityStateTabHelperTestWithPasswordCcSwitch,
content::SSLStatus::DISPLAYED_PASSWORD_FIELD_ON_HTTP);
}
-// Tests that when a visible password field is detected on an HTTP page
-// load, and when the command-line flag is *not* set, the security level is
-// *not* downgraded to HTTP_SHOW_WARNING.
-IN_PROC_BROWSER_TEST_F(SecurityStateTabHelperTest,
- PasswordSecurityLevelNotDowngradedWithoutSwitch) {
- ASSERT_TRUE(embedded_test_server()->Start());
- host_resolver()->AddRule("*", embedded_test_server()->GetURL("/").host());
-
- content::WebContents* contents =
- browser()->tab_strip_model()->GetActiveWebContents();
- ASSERT_TRUE(contents);
-
- SecurityStateTabHelper* helper =
- SecurityStateTabHelper::FromWebContents(contents);
- ASSERT_TRUE(helper);
-
- ui_test_utils::NavigateToURL(
- browser(), GetURLWithNonLocalHostname(embedded_test_server(),
- "/password/simple_password.html"));
- InjectScript(contents);
- // The security level should not be HTTP_SHOW_WARNING, because the
- // command-line switch was not set.
- security_state::SecurityInfo security_info;
- helper->GetSecurityInfo(&security_info);
- EXPECT_EQ(security_state::NONE, security_info.security_level);
-
- // The appropriate SSLStatus flags should be set, however.
- content::NavigationEntry* entry = contents->GetController().GetVisibleEntry();
- ASSERT_TRUE(entry);
- EXPECT_TRUE(entry->GetSSL().content_status &
- content::SSLStatus::DISPLAYED_PASSWORD_FIELD_ON_HTTP);
-}
-
// Tests that when a visible password field is detected on an HTTPS page
// load, and when the command-line flag is set, the security level is
// *not* downgraded to HTTP_SHOW_WARNING.
« no previous file with comments | « no previous file | components/security_state/core/security_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698