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

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

Issue 2318533002: [Password Generation] Use signatures for form matching (Closed)
Patch Set: Rebase 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: 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 93330624b9351a92e0eceb444f00329610ec3239..6d2c97693a468513b5f8e9e5f5403a7decc49452 100644
--- a/components/autofill/core/browser/autofill_manager_unittest.cc
+++ b/components/autofill/core/browser/autofill_manager_unittest.cc
@@ -574,7 +574,7 @@ class TestAutofillManager : public AutofillManager {
void UploadFormData(const FormStructure& submitted_form,
bool observed_submission) override {
- submitted_form_signature_ = submitted_form.FormSignature();
+ submitted_form_signature_ = submitted_form.FormSignatureAsStr();
}
const std::string GetSubmittedFormSignature() {
@@ -3249,8 +3249,8 @@ TEST_F(AutofillManagerTest, OnLoadedServerPredictions) {
ASSERT_TRUE(response.SerializeToString(&response_string));
std::vector<std::string> signatures;
- signatures.push_back(form_structure->FormSignature());
- signatures.push_back(form_structure2->FormSignature());
+ signatures.push_back(form_structure->FormSignatureAsStr());
+ signatures.push_back(form_structure2->FormSignatureAsStr());
base::HistogramTester histogram_tester;
autofill_manager_->OnLoadedServerPredictions(response_string, signatures);
@@ -3299,7 +3299,7 @@ TEST_F(AutofillManagerTest, OnLoadedServerPredictions_ResetManager) {
ASSERT_TRUE(response.SerializeToString(&response_string));
std::vector<std::string> signatures;
- signatures.push_back(form_structure->FormSignature());
+ signatures.push_back(form_structure->FormSignatureAsStr());
// Reset the manager (such as during a navigation).
autofill_manager_->Reset();
@@ -3401,7 +3401,7 @@ TEST_F(AutofillManagerTest, FormSubmittedWithDifferentFields) {
FormsSeen(forms);
// Cache the expected form signature.
- std::string signature = FormStructure(form).FormSignature();
+ std::string signature = FormStructure(form).FormSignatureAsStr();
// Change the structure of the form prior to submission.
// Websites would typically invoke JavaScript either on page load or on form
« no previous file with comments | « components/autofill/core/browser/autofill_manager.cc ('k') | components/autofill/core/browser/autofill_metrics_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698