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

Unified Diff: components/password_manager/core/browser/password_form_manager_unittest.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
Index: components/password_manager/core/browser/password_form_manager_unittest.cc
diff --git a/components/password_manager/core/browser/password_form_manager_unittest.cc b/components/password_manager/core/browser/password_form_manager_unittest.cc
index a91c1822c8ac86a85f34b25760edae6c6470b5b3..be93b4902a07e7a81e5ecc359c324ceaeb6077d3 100644
--- a/components/password_manager/core/browser/password_form_manager_unittest.cc
+++ b/components/password_manager/core/browser/password_form_manager_unittest.cc
@@ -39,7 +39,6 @@
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/testing_pref_service.h"
-#include "components/security_state/core/security_state.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
@@ -2866,41 +2865,4 @@ TEST_F(PasswordFormManagerTest, RemoveResultsWithWrongScheme_ObservingHTML) {
}
}
-class PasswordFormManagerFormNotSecureTest : public PasswordFormManagerTest {
- public:
- PasswordFormManagerFormNotSecureTest() {
- scoped_feature_list_.InitAndEnableFeature(
- security_state::kHttpFormWarningFeature);
- }
-
- base::test::ScopedFeatureList scoped_feature_list_;
-};
-
-// Tests that PasswordFormFillData's
-// |show_form_not_secure_warning_on_autofill| field is set correctly
-// when processing a frame.
-TEST_F(PasswordFormManagerFormNotSecureTest,
- ProcessFrameSetsFormNotSecureFlag) {
- autofill::PasswordFormFillData fill_data;
- EXPECT_CALL(*client()->mock_driver(), FillPasswordForm(_))
- .WillOnce(SaveArg<0>(&fill_data));
- fake_form_fetcher()->SetNonFederated({saved_match()}, 0u);
- EXPECT_TRUE(fill_data.show_form_not_secure_warning_on_autofill);
-}
-
-// Tests that PasswordFormFillData's
-// |show_form_not_secure_warning_on_autofill| field is *not* set when
-// the feature is not enabled.
-//
-// TODO(estark): remove this test when the feature is fully
-// launched. https://crbug.com/677295
-TEST_F(PasswordFormManagerTest,
- ProcessFrameSetsFormNotSecureFlagWithoutFeature) {
- autofill::PasswordFormFillData fill_data;
- EXPECT_CALL(*client()->mock_driver(), FillPasswordForm(_))
- .WillOnce(SaveArg<0>(&fill_data));
- fake_form_fetcher()->SetNonFederated({saved_match()}, 0u);
- EXPECT_FALSE(fill_data.show_form_not_secure_warning_on_autofill);
-}
-
} // namespace password_manager

Powered by Google App Engine
This is Rietveld 408576698