| 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 8d7f64730c075bcdc5b9a94100f1702c240e4abe..bd5194624b958dd6506137864407ccca0aa4833a 100644
|
| --- a/components/autofill/core/browser/form_structure_unittest.cc
|
| +++ b/components/autofill/core/browser/form_structure_unittest.cc
|
| @@ -17,6 +17,7 @@
|
| #include "components/autofill/core/common/autofill_switches.h"
|
| #include "components/autofill/core/common/form_data.h"
|
| #include "components/autofill/core/common/form_field_data.h"
|
| +#include "components/autofill/core/common/signatures_util.h"
|
| #include "components/variations/entropy_provider.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #include "url/gurl.h"
|
| @@ -50,7 +51,7 @@ std::ostream& operator<<(std::ostream& os, const FormData& form) {
|
| class FormStructureTest : public testing::Test {
|
| public:
|
| static std::string Hash64Bit(const std::string& str) {
|
| - return base::Uint64ToString(FormStructure::Hash64Bit(str));
|
| + return base::Uint64ToString(StrToHash64Bit(str));
|
| }
|
|
|
| void SetUp() override {
|
| @@ -3308,27 +3309,26 @@ TEST_F(FormStructureTest, CheckFormSignature) {
|
|
|
| form_structure.reset(new FormStructure(form));
|
|
|
| - EXPECT_EQ(FormStructureTest::Hash64Bit(
|
| - std::string("://&&email&first")),
|
| - form_structure->FormSignature());
|
| + EXPECT_EQ(FormStructureTest::Hash64Bit(std::string("://&&email&first")),
|
| + form_structure->FormSignatureAsStr());
|
|
|
| form.origin = GURL(std::string("http://www.facebook.com"));
|
| form_structure.reset(new FormStructure(form));
|
| EXPECT_EQ(FormStructureTest::Hash64Bit(
|
| - std::string("http://www.facebook.com&&email&first")),
|
| - form_structure->FormSignature());
|
| + std::string("http://www.facebook.com&&email&first")),
|
| + form_structure->FormSignatureAsStr());
|
|
|
| form.action = GURL(std::string("https://login.facebook.com/path"));
|
| form_structure.reset(new FormStructure(form));
|
| EXPECT_EQ(FormStructureTest::Hash64Bit(
|
| - std::string("https://login.facebook.com&&email&first")),
|
| - form_structure->FormSignature());
|
| + std::string("https://login.facebook.com&&email&first")),
|
| + form_structure->FormSignatureAsStr());
|
|
|
| form.name = ASCIIToUTF16("login_form");
|
| form_structure.reset(new FormStructure(form));
|
| - EXPECT_EQ(FormStructureTest::Hash64Bit(
|
| - std::string("https://login.facebook.com&login_form&email&first")),
|
| - form_structure->FormSignature());
|
| + EXPECT_EQ(FormStructureTest::Hash64Bit(std::string(
|
| + "https://login.facebook.com&login_form&email&first")),
|
| + form_structure->FormSignatureAsStr());
|
|
|
| field.check_status = FormFieldData::NOT_CHECKABLE;
|
| field.label = ASCIIToUTF16("Random Field label");
|
| @@ -3346,9 +3346,9 @@ TEST_F(FormStructureTest, CheckFormSignature) {
|
| form.fields.push_back(field);
|
| form_structure.reset(new FormStructure(form));
|
| EXPECT_EQ(FormStructureTest::Hash64Bit(
|
| - std::string("https://login.facebook.com&login_form&email&first&"
|
| - "random1234&random&1random&random")),
|
| - form_structure->FormSignature());
|
| + std::string("https://login.facebook.com&login_form&email&first&"
|
| + "random1234&random&1random&random")),
|
| + form_structure->FormSignatureAsStr());
|
| }
|
|
|
| TEST_F(FormStructureTest, ToFormData) {
|
|
|