| Index: chrome/browser/autofill/form_structure_unittest.cc
|
| diff --git a/chrome/browser/autofill/form_structure_unittest.cc b/chrome/browser/autofill/form_structure_unittest.cc
|
| index 6dafc1ac6efad63c24dea3c3fe9d3927e511a473..4df25ea835b31b2f59dbfb917c25ce38abbcae22 100644
|
| --- a/chrome/browser/autofill/form_structure_unittest.cc
|
| +++ b/chrome/browser/autofill/form_structure_unittest.cc
|
| @@ -1574,19 +1574,21 @@ TEST(FormStructureTest, EncodeQueryRequest) {
|
| EXPECT_EQ(0U, encoded_signatures.size());
|
| EXPECT_EQ("", encoded_xml);
|
|
|
| - // Check the behaviour with kEnableExperimentalFormFilling switch on.
|
| - // Add the previous form but with flag set.
|
| + // Check the behaviour with autocheckout enabled.
|
| ScopedVector<FormStructure> checkable_forms;
|
| + form.origin = GURL("https://www.sample1.com/query/path");
|
| checkable_forms.push_back(new FormStructure(form, true));
|
|
|
| ASSERT_TRUE(FormStructure::EncodeQueryRequest(checkable_forms.get(),
|
| &encoded_signatures,
|
| &encoded_xml));
|
| - const char * const kSignature3 = "7747357776717901584";
|
| + const char * const kSignature3 = "10816570822443282449";
|
| const char * const kResponse3 =
|
| "<?xml version=\"1.0\" encoding=\"UTF-8\"?><autofillquery "
|
| - "clientversion=\"6.1.1715.1442/en (GGLL)\" accepts=\"e\">"
|
| - "<form signature=\"7747357776717901584\"><field signature=\"412125936\"/>"
|
| + "clientversion=\"6.1.1715.1442/en (GGLL)\" accepts=\"a\" "
|
| + "urlprefix=\"https://www.sample1.com/query/path\">"
|
| + "<form signature=\"10816570822443282449\">"
|
| + "<field signature=\"412125936\"/>"
|
| "<field signature=\"1917667676\"/><field signature=\"2226358947\"/><field"
|
| " signature=\"747221617\"/><field signature=\"4108155786\"/><field "
|
| "signature=\"3410250678\"/><field signature=\"509334676\"/><field "
|
| @@ -1596,6 +1598,20 @@ TEST(FormStructureTest, EncodeQueryRequest) {
|
| ASSERT_EQ(1U, encoded_signatures.size());
|
| EXPECT_EQ(kSignature3, encoded_signatures[0]);
|
| EXPECT_EQ(kResponse3, encoded_xml);
|
| +
|
| + // Check the behaviour with autocheckout enabled.
|
| + // It should remove query parameters and the encoded_xml should be same
|
| + // as previous test.
|
| + ScopedVector<FormStructure> checkable_forms2;
|
| + form.origin = GURL("https://www.sample1.com/query/path?a=b&c=d");
|
| + checkable_forms2.push_back(new FormStructure(form, true));
|
| +
|
| + ASSERT_TRUE(FormStructure::EncodeQueryRequest(checkable_forms2.get(),
|
| + &encoded_signatures,
|
| + &encoded_xml));
|
| + ASSERT_EQ(1U, encoded_signatures.size());
|
| + EXPECT_EQ(kSignature3, encoded_signatures[0]);
|
| + EXPECT_EQ(kResponse3, encoded_xml);
|
| }
|
|
|
| TEST(FormStructureTest, EncodeUploadRequest) {
|
|
|