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

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

Issue 2318533002: [Password Generation] Use signatures for form matching (Closed)
Patch Set: Sent to review Created 4 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: chrome/renderer/autofill/password_generation_test_utils.cc
diff --git a/chrome/renderer/autofill/password_generation_test_utils.cc b/chrome/renderer/autofill/password_generation_test_utils.cc
index 4dcc5280e7b4ee5ac6aa41b8cafd3f2bad568ab3..455dd6c5acbfe919674ab36fac7470786a0c925f 100644
--- a/chrome/renderer/autofill/password_generation_test_utils.cc
+++ b/chrome/renderer/autofill/password_generation_test_utils.cc
@@ -10,6 +10,7 @@
#include "components/autofill/content/renderer/form_autofill_util.h"
#include "components/autofill/content/renderer/test_password_generation_agent.h"
#include "components/autofill/core/common/password_form_generation_data.h"
+#include "components/autofill/core/common/signatures_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebFormElement.h"
@@ -41,7 +42,8 @@ void SetAccountCreationFormsDetectedMessage(
std::vector<autofill::PasswordFormGenerationData> forms;
forms.push_back(autofill::PasswordFormGenerationData{
- form_data.name, form_data.action, form_data.fields[field_index]});
+ CalculateFormSignature(form_data),
+ CalculateFieldSignatureForField(form_data.fields[field_index])});
generation_agent->FoundFormsEligibleForGeneration(forms);
}

Powered by Google App Engine
This is Rietveld 408576698