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

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

Issue 23432002: Generate passwords only for forms that autofill server marks as account creation forms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix password generation manager browser test. Created 7 years, 3 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/form_structure_unittest.cc
diff --git a/components/autofill/core/browser/form_structure_unittest.cc b/components/autofill/core/browser/form_structure_unittest.cc
index a66183ba78f635009dcb9b0a92f9c1c484316ba5..a6d08a7cb3fc9976019c8082a8e1081600a19960 100644
--- a/components/autofill/core/browser/form_structure_unittest.cc
+++ b/components/autofill/core/browser/form_structure_unittest.cc
@@ -2261,10 +2261,11 @@ TEST(FormStructureTest, CheckFormSignature) {
field.name = ASCIIToUTF16("first");
form.fields.push_back(field);
- // Password fields shouldn't affect the signature.
- field.label = ASCIIToUTF16("Password");
- field.name = ASCIIToUTF16("password");
- field.form_control_type = "password";
+ // Checkable fields shouldn't affect the signature.
+ field.label = ASCIIToUTF16("Select");
+ field.name = ASCIIToUTF16("Select");
+ field.form_control_type = "checkbox";
+ field.is_checkable = true;
form.fields.push_back(field);
form_structure.reset(new FormStructure(form));
@@ -2291,6 +2292,7 @@ TEST(FormStructureTest, CheckFormSignature) {
std::string("https://login.facebook.com&login_form&email&first")),
form_structure->FormSignature());
+ field.is_checkable = false;
field.label = ASCIIToUTF16("Random Field label");
field.name = ASCIIToUTF16("random1234");
field.form_control_type = "text";
@@ -2356,14 +2358,16 @@ TEST(FormStructureTest, SkipFieldTest) {
field.form_control_type = "text";
form.fields.push_back(field);
- field.label = ASCIIToUTF16("password");
- field.name = ASCIIToUTF16("password");
- field.form_control_type = "password";
+ field.label = ASCIIToUTF16("select");
+ field.name = ASCIIToUTF16("select");
+ field.form_control_type = "checkbox";
+ field.is_checkable = true;
form.fields.push_back(field);
field.label = base::string16();
field.name = ASCIIToUTF16("email");
field.form_control_type = "text";
+ field.is_checkable = false;
form.fields.push_back(field);
ScopedVector<FormStructure> forms;
« no previous file with comments | « components/autofill/core/browser/form_structure.cc ('k') | components/autofill/core/browser/test_autofill_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698