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

Unified Diff: chrome/renderer/autofill/password_autofill_agent_browsertest.cc

Issue 2656913002: Don't show FormNotSecure warning on page load (Closed)
Patch Set: Skip FNS warning on load 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 | « chrome/renderer/autofill/DEPS ('k') | components/autofill/content/common/autofill_types.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/autofill/password_autofill_agent_browsertest.cc
diff --git a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
index 55aa61aad3d69fec9c38ff4569ce5904da281ccc..ae056a5c87986841e2843733995f338fefd7281e 100644
--- a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
+++ b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
@@ -23,7 +23,6 @@
#include "components/autofill/core/common/password_form.h"
#include "components/autofill/core/common/password_form_field_prediction_map.h"
#include "components/password_manager/core/common/password_manager_features.h"
-#include "components/security_state/core/security_state.h"
#include "content/public/common/associated_interface_provider.h"
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_view.h"
@@ -352,11 +351,6 @@ class PasswordAutofillAgentTest : public ChromeRenderViewTest {
password_manager::features::kFillOnAccountSelect);
}
- void SetHttpFormWarning() {
- scoped_feature_list_.InitAndEnableFeature(
- security_state::kHttpFormWarningFeature);
- }
-
void UpdateOriginForHTML(const std::string& html) {
std::string origin = "data:text/html;charset=utf-8," + html;
fill_data_.origin = GURL(origin);
@@ -489,11 +483,6 @@ class PasswordAutofillAgentTest : public ChromeRenderViewTest {
return fake_driver_.called_show_pw_suggestions();
}
- bool GetCalledShowNotSecureWarning() {
- base::RunLoop().RunUntilIdle();
- return fake_driver_.called_show_not_secure_warning();
- }
-
void ExpectFormSubmittedWithUsernameAndPasswords(
const std::string& username_value,
const std::string& password_value,
@@ -1367,30 +1356,6 @@ TEST_F(PasswordAutofillAgentTest, CredentialsOnClick) {
ClearUsernameAndPasswordFields();
}
-// Tests that the Form Not Secure warning appears when a password form
-// is autofilled when the Form Not Secure feature is enabled.
-TEST_F(PasswordAutofillAgentTest, FormNotSecureWarningOnAutofill) {
- SetHttpFormWarning();
-
- fill_data_.show_form_not_secure_warning_on_autofill = true;
-
- // Simulate the browser autofilling a password form.
- SimulateOnFillPasswordForm(fill_data_);
- EXPECT_TRUE(GetCalledShowNotSecureWarning());
-}
-
-// Tests that the Form Not Secure warning does not appear when the
-// PasswordFormFillData does not indicate that it should show.
-TEST_F(PasswordAutofillAgentTest, FormNotSecureWarningNotShownOnAutofill) {
- SetHttpFormWarning();
-
- fill_data_.show_form_not_secure_warning_on_autofill = false;
-
- // Simulate the browser autofilling a password form.
- SimulateOnFillPasswordForm(fill_data_);
- EXPECT_FALSE(GetCalledShowNotSecureWarning());
-}
-
// Tests that there is an autosuggestion from the password manager when the
// user clicks on the password field when FillOnAccountSelect is enabled.
TEST_F(PasswordAutofillAgentTest,
« no previous file with comments | « chrome/renderer/autofill/DEPS ('k') | components/autofill/content/common/autofill_types.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698