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

Unified Diff: components/autofill/core/browser/autofill_manager_unittest.cc

Issue 1670763006: Autofill server-side heuristics for 2 fields password form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 10 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/autofill/core/browser/autofill_manager_unittest.cc
diff --git a/components/autofill/core/browser/autofill_manager_unittest.cc b/components/autofill/core/browser/autofill_manager_unittest.cc
index f292f225429dae77a52bad6bc0aebe80d02c19f1..428c96da681a6b2cfbcaa2db479fbe9e4846ac73 100644
--- a/components/autofill/core/browser/autofill_manager_unittest.cc
+++ b/components/autofill/core/browser/autofill_manager_unittest.cc
@@ -4417,6 +4417,19 @@ TEST_F(AutofillManagerTest, ShouldUploadForm) {
autofill_driver_->SetIsOffTheRecord(false);
EXPECT_TRUE(autofill_manager_->ShouldUploadForm(form_structure_4));
+ // Has one field which is a password field.
+ form.fields.clear();
+ test::CreateTestFormField("Password", "pw", "", "password", &field);
+ form.fields.push_back(field);
+ FormStructure form_structure_5(form);
+ EXPECT_FALSE(autofill_manager_->ShouldUploadForm(form_structure_5));
+
+ // Has two fields which are password fields.
+ test::CreateTestFormField("New Password", "new_pw", "", "password", &field);
+ form.fields.push_back(field);
+ FormStructure form_structure_6(form);
+ EXPECT_TRUE(autofill_manager_->ShouldUploadForm(form_structure_6));
+
// Autofill disabled.
autofill_manager_->set_autofill_enabled(false);
EXPECT_FALSE(autofill_manager_->ShouldUploadForm(form_structure_3));
« no previous file with comments | « components/autofill/core/browser/autofill_manager.cc ('k') | components/autofill/core/browser/form_structure.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698