| 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 aca45d13aac287bcb4f048f880718760d4ec991a..e3e06a79a8adad63c5b9354d2f0a90c8cb48b0e4 100644
|
| --- a/chrome/browser/autofill/form_structure_unittest.cc
|
| +++ b/chrome/browser/autofill/form_structure_unittest.cc
|
| @@ -4,7 +4,6 @@
|
|
|
| #include "chrome/browser/autofill/form_structure.h"
|
|
|
| -#include "base/command_line.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/string_util.h"
|
| #include "base/utf_string_conversions.h"
|
| @@ -1575,21 +1574,21 @@ TEST(FormStructureTest, EncodeQueryRequest) {
|
| EXPECT_EQ(0U, encoded_signatures.size());
|
| EXPECT_EQ("", encoded_xml);
|
|
|
| - // Check the behaviour with kEnableExperimentalFormFilling switch on.
|
| - CommandLine::ForCurrentProcess()->AppendSwitch(
|
| - switches::kEnableExperimentalFormFilling);
|
| - // Add the previous form but with flag set.
|
| + // Check the behaviour with autocheckout enabled.
|
| ScopedVector<FormStructure> checkable_forms;
|
| - checkable_forms.push_back(new FormStructure(form));
|
| + 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 "
|
| @@ -1599,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) {
|
|
|