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

Unified Diff: chrome/browser/autofill/form_structure_unittest.cc

Issue 11867025: Download autocheckout whitelist and enable autocheckout for whitelisted sites only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix memory leak in AutofillMetricsTest. Created 7 years, 11 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/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..6dafc1ac6efad63c24dea3c3fe9d3927e511a473 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"
@@ -90,7 +89,7 @@ TEST(FormStructureTest, FieldCount) {
field.form_control_type = "submit";
form.fields.push_back(field);
- FormStructure form_structure(form);
+ FormStructure form_structure(form, false);
// All fields are counted.
EXPECT_EQ(3U, form_structure.field_count());
@@ -106,7 +105,7 @@ TEST(FormStructureTest, AutofillFlowInfo) {
field.form_control_type = "text";
form.fields.push_back(field);
- FormStructure form_structure(form);
+ FormStructure form_structure(form, false);
EXPECT_FALSE(form_structure.IsStartOfAutofillableFlow());
EXPECT_FALSE(form_structure.IsInAutofillableFlow());
@@ -156,7 +155,7 @@ TEST(FormStructureTest, AutofillCount) {
field.form_control_type = "submit";
form.fields.push_back(field);
- FormStructure form_structure(form);
+ FormStructure form_structure(form, false);
form_structure.DetermineHeuristicTypes(TestAutofillMetrics());
// Only text and select fields that are heuristically matched are counted.
@@ -167,7 +166,7 @@ TEST(FormStructureTest, SourceURL) {
FormData form;
form.origin = GURL("http://www.foo.com/");
form.method = ASCIIToUTF16("post");
- FormStructure form_structure(form);
+ FormStructure form_structure(form, false);
EXPECT_EQ(form.origin, form_structure.source_url());
}
@@ -195,7 +194,7 @@ TEST(FormStructureTest, IsAutofillable) {
field.form_control_type = "submit";
form.fields.push_back(field);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
EXPECT_FALSE(form_structure->IsAutofillable(true));
@@ -210,7 +209,7 @@ TEST(FormStructureTest, IsAutofillable) {
field.form_control_type = "text";
form.fields.push_back(field);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
EXPECT_FALSE(form_structure->IsAutofillable(true));
@@ -220,14 +219,14 @@ TEST(FormStructureTest, IsAutofillable) {
field.form_control_type = "email";
form.fields.push_back(field);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
EXPECT_TRUE(form_structure->IsAutofillable(true));
// The method must be 'post', though we can intentionally ignore this
// criterion for the sake of providing a helpful warning message to the user.
form.method = ASCIIToUTF16("get");
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
EXPECT_FALSE(form_structure->IsAutofillable(true));
EXPECT_TRUE(form_structure->IsAutofillable(false));
@@ -235,13 +234,13 @@ TEST(FormStructureTest, IsAutofillable) {
// The target cannot include http(s)://*/search...
form.method = ASCIIToUTF16("post");
form.action = GURL("http://google.com/search?q=hello");
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
EXPECT_FALSE(form_structure->IsAutofillable(true));
// But search can be in the URL.
form.action = GURL("http://search.com/?q=hello");
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
EXPECT_TRUE(form_structure->IsAutofillable(true));
}
@@ -269,7 +268,7 @@ TEST(FormStructureTest, ShouldBeParsed) {
checkable_field.form_control_type = "checkbox";
form.fields.push_back(checkable_field);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
EXPECT_FALSE(form_structure->ShouldBeParsed(true));
// We now have three text fields, though only two are auto-fillable.
@@ -283,25 +282,25 @@ TEST(FormStructureTest, ShouldBeParsed) {
field.form_control_type = "text";
form.fields.push_back(field);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
EXPECT_TRUE(form_structure->ShouldBeParsed(true));
// The method must be 'post', though we can intentionally ignore this
// criterion for the sake of providing a helpful warning message to the user.
form.method = ASCIIToUTF16("get");
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
EXPECT_FALSE(form_structure->IsAutofillable(true));
EXPECT_TRUE(form_structure->ShouldBeParsed(false));
// The target cannot include http(s)://*/search...
form.method = ASCIIToUTF16("post");
form.action = GURL("http://google.com/search?q=hello");
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
EXPECT_FALSE(form_structure->ShouldBeParsed(true));
// But search can be in the URL.
form.action = GURL("http://search.com/?q=hello");
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
EXPECT_TRUE(form_structure->ShouldBeParsed(true));
// The form need only have three fields, but at least one must be a text
@@ -323,11 +322,11 @@ TEST(FormStructureTest, ShouldBeParsed) {
field.form_control_type = "select-one";
form.fields.push_back(field);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
EXPECT_TRUE(form_structure->ShouldBeParsed(true));
form.fields[0].form_control_type = "select-one";
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
EXPECT_FALSE(form_structure->ShouldBeParsed(true));
}
@@ -372,7 +371,7 @@ TEST(FormStructureTest, HeuristicsContactInfo) {
field.form_control_type = "submit";
form.fields.push_back(field);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
EXPECT_TRUE(form_structure->IsAutofillable(true));
@@ -423,7 +422,7 @@ TEST(FormStructureTest, HeuristicsAutocompleteAttribute) {
field.autocomplete_attribute = "email";
form.fields.push_back(field);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
EXPECT_TRUE(form_structure->IsAutofillable(true));
@@ -461,7 +460,7 @@ TEST(FormStructureTest, HeuristicsAutocompleteAttributePhoneTypes) {
field.autocomplete_attribute = "tel-local-suffix";
form.fields.push_back(field);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
EXPECT_TRUE(form_structure->IsAutofillable(true));
@@ -502,7 +501,7 @@ TEST(FormStructureTest, AutocompleteAttributeOverridesOtherHeuristics) {
field.name = ASCIIToUTF16("email");
form.fields.push_back(field);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
EXPECT_TRUE(form_structure->IsAutofillable(true));
EXPECT_TRUE(form_structure->ShouldBeCrowdsourced());
@@ -516,7 +515,7 @@ TEST(FormStructureTest, AutocompleteAttributeOverridesOtherHeuristics) {
// Now update the first form field to include an 'autocomplete' attribute.
form.fields.front().autocomplete_attribute = "x-other";
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
EXPECT_FALSE(form_structure->IsAutofillable(true));
EXPECT_FALSE(form_structure->ShouldBeCrowdsourced());
@@ -576,7 +575,7 @@ TEST(FormStructureTest, HeuristicsAutocompleteAttributeWithSections) {
field.autocomplete_attribute = "section-foo cc-number";
form.fields.push_back(field);
- FormStructure form_structure(form);
+ FormStructure form_structure(form, false);
form_structure.DetermineHeuristicTypes(TestAutofillMetrics());
EXPECT_TRUE(form_structure.IsAutofillable(true));
@@ -621,7 +620,7 @@ TEST(FormStructureTest, HeuristicsAutocompleteAttributeWithSectionsDegenerate) {
field.autocomplete_attribute = "garbage billing email";
form.fields.push_back(field);
- FormStructure form_structure(form);
+ FormStructure form_structure(form, false);
form_structure.DetermineHeuristicTypes(TestAutofillMetrics());
// Expect the correct number of fields.
@@ -651,7 +650,7 @@ TEST(FormStructureTest, HeuristicsAutocompleteAttributeWithSectionsRepeated) {
field.autocomplete_attribute = "section-foo street-address";
form.fields.push_back(field);
- FormStructure form_structure(form);
+ FormStructure form_structure(form, false);
form_structure.DetermineHeuristicTypes(TestAutofillMetrics());
// Expect the correct number of fields.
@@ -689,7 +688,7 @@ TEST(FormStructureTest, HeuristicsDontOverrideAutocompleteAttributeSections) {
field.autocomplete_attribute = "street-address";
form.fields.push_back(field);
- FormStructure form_structure(form);
+ FormStructure form_structure(form, false);
form_structure.DetermineHeuristicTypes(TestAutofillMetrics());
// Expect the correct number of fields.
@@ -754,7 +753,7 @@ TEST(FormStructureTest, HeuristicsSample8) {
field.form_control_type = "submit";
form.fields.push_back(field);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
EXPECT_TRUE(form_structure->IsAutofillable(true));
ASSERT_EQ(10U, form_structure->field_count());
@@ -822,7 +821,7 @@ TEST(FormStructureTest, HeuristicsSample6) {
field.form_control_type = "submit";
form.fields.push_back(field);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
EXPECT_TRUE(form_structure->IsAutofillable(true));
ASSERT_EQ(7U, form_structure->field_count());
@@ -888,7 +887,7 @@ TEST(FormStructureTest, HeuristicsLabelsOnly) {
field.form_control_type = "submit";
form.fields.push_back(field);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
EXPECT_TRUE(form_structure->IsAutofillable(true));
ASSERT_EQ(8U, form_structure->field_count());
@@ -946,7 +945,7 @@ TEST(FormStructureTest, HeuristicsCreditCardInfo) {
field.form_control_type = "submit";
form.fields.push_back(field);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
EXPECT_TRUE(form_structure->IsAutofillable(true));
ASSERT_EQ(6U, form_structure->field_count());
@@ -1007,7 +1006,7 @@ TEST(FormStructureTest, HeuristicsCreditCardInfoWithUnknownCardField) {
field.form_control_type = "submit";
form.fields.push_back(field);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
EXPECT_TRUE(form_structure->IsAutofillable(true));
ASSERT_EQ(7U, form_structure->field_count());
@@ -1055,7 +1054,7 @@ TEST(FormStructureTest, ThreeAddressLines) {
field.name = ASCIIToUTF16("city");
form.fields.push_back(field);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
EXPECT_TRUE(form_structure->IsAutofillable(true));
ASSERT_EQ(4U, form_structure->field_count());
@@ -1097,7 +1096,7 @@ TEST(FormStructureTest, BillingAndShippingAddresses) {
field.name = ASCIIToUTF16("billing.address.addressLine2");
form.fields.push_back(field);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
EXPECT_TRUE(form_structure->IsAutofillable(true));
ASSERT_EQ(4U, form_structure->field_count());
@@ -1143,7 +1142,7 @@ TEST(FormStructureTest, ThreeAddressLinesExpedia) {
field.name = ASCIIToUTF16("FOPIH_RgWebCC_0_IHAddress_adct");
form.fields.push_back(field);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
EXPECT_TRUE(form_structure->IsAutofillable(true));
ASSERT_EQ(4U, form_structure->field_count());
@@ -1182,7 +1181,7 @@ TEST(FormStructureTest, TwoAddressLinesEbay) {
field.name = ASCIIToUTF16("city");
form.fields.push_back(field);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
EXPECT_TRUE(form_structure->IsAutofillable(true));
ASSERT_EQ(3U, form_structure->field_count());
@@ -1216,7 +1215,7 @@ TEST(FormStructureTest, HeuristicsStateWithProvince) {
field.name = ASCIIToUTF16("State");
form.fields.push_back(field);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
EXPECT_TRUE(form_structure->IsAutofillable(true));
ASSERT_EQ(3U, form_structure->field_count());
@@ -1283,7 +1282,7 @@ TEST(FormStructureTest, HeuristicsWithBilling) {
field.name = ASCIIToUTF16("email$emailBox");
form.fields.push_back(field);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
EXPECT_TRUE(form_structure->IsAutofillable(true));
ASSERT_EQ(11U, form_structure->field_count());
@@ -1334,7 +1333,7 @@ TEST(FormStructureTest, ThreePartPhoneNumber) {
field.max_length = 0;
form.fields.push_back(field);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
EXPECT_TRUE(form_structure->IsAutofillable(true));
ASSERT_EQ(4U, form_structure->field_count());
@@ -1380,7 +1379,7 @@ TEST(FormStructureTest, HeuristicsInfernoCC) {
field.name = ASCIIToUTF16("expiration_year");
form.fields.push_back(field);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
EXPECT_TRUE(form_structure->IsAutofillable(true));
@@ -1433,7 +1432,7 @@ TEST(FormStructureTest, CVCCodeClash) {
field.name = ASCIIToUTF16("csc");
form.fields.push_back(field);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
EXPECT_TRUE(form_structure->IsAutofillable(true));
@@ -1492,7 +1491,7 @@ TEST(FormStructureTest, EncodeQueryRequest) {
form.fields.push_back(checkable_field);
ScopedVector<FormStructure> forms;
- forms.push_back(new FormStructure(form));
+ forms.push_back(new FormStructure(form, false));
std::vector<std::string> encoded_signatures;
std::string encoded_xml;
const char * const kSignature1 = "11337937696949187602";
@@ -1512,7 +1511,7 @@ TEST(FormStructureTest, EncodeQueryRequest) {
// Add the same form, only one will be encoded, so EncodeQueryRequest() should
// return the same data.
- forms.push_back(new FormStructure(form));
+ forms.push_back(new FormStructure(form, false));
ASSERT_TRUE(FormStructure::EncodeQueryRequest(forms.get(),
&encoded_signatures,
&encoded_xml));
@@ -1526,7 +1525,7 @@ TEST(FormStructureTest, EncodeQueryRequest) {
form.fields.push_back(field);
}
- forms.push_back(new FormStructure(form));
+ forms.push_back(new FormStructure(form, false));
ASSERT_TRUE(FormStructure::EncodeQueryRequest(forms.get(),
&encoded_signatures,
&encoded_xml));
@@ -1557,7 +1556,7 @@ TEST(FormStructureTest, EncodeQueryRequest) {
malformed_form.fields.push_back(field);
}
- forms.push_back(new FormStructure(malformed_form));
+ forms.push_back(new FormStructure(malformed_form, false));
ASSERT_TRUE(FormStructure::EncodeQueryRequest(forms.get(),
&encoded_signatures,
&encoded_xml));
@@ -1568,7 +1567,7 @@ TEST(FormStructureTest, EncodeQueryRequest) {
// Check that we fail if there are only bad form(s).
ScopedVector<FormStructure> bad_forms;
- bad_forms.push_back(new FormStructure(malformed_form));
+ bad_forms.push_back(new FormStructure(malformed_form, false));
EXPECT_FALSE(FormStructure::EncodeQueryRequest(bad_forms.get(),
&encoded_signatures,
&encoded_xml));
@@ -1576,11 +1575,9 @@ TEST(FormStructureTest, EncodeQueryRequest) {
EXPECT_EQ("", encoded_xml);
// Check the behaviour with kEnableExperimentalFormFilling switch on.
- CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kEnableExperimentalFormFilling);
// Add the previous form but with flag set.
ScopedVector<FormStructure> checkable_forms;
- checkable_forms.push_back(new FormStructure(form));
+ checkable_forms.push_back(new FormStructure(form, true));
ASSERT_TRUE(FormStructure::EncodeQueryRequest(checkable_forms.get(),
&encoded_signatures,
@@ -1606,7 +1603,7 @@ TEST(FormStructureTest, EncodeUploadRequest) {
std::vector<FieldTypeSet> possible_field_types;
FormData form;
form.method = ASCIIToUTF16("post");
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
form_structure->DetermineHeuristicTypes(TestAutofillMetrics());
FormFieldData field;
@@ -1654,7 +1651,7 @@ TEST(FormStructureTest, EncodeUploadRequest) {
possible_field_types.push_back(FieldTypeSet());
possible_field_types.back().insert(ADDRESS_HOME_COUNTRY);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
ASSERT_EQ(form_structure->field_count(), possible_field_types.size());
for (size_t i = 0; i < form_structure->field_count(); ++i)
@@ -1712,7 +1709,7 @@ TEST(FormStructureTest, EncodeUploadRequest) {
possible_field_types.back().insert(ADDRESS_BILLING_LINE2);
}
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
ASSERT_EQ(form_structure->field_count(), possible_field_types.size());
for (size_t i = 0; i < form_structure->field_count(); ++i)
form_structure->field(i)->set_possible_types(possible_field_types[i]);
@@ -1751,7 +1748,7 @@ TEST(FormStructureTest, EncodeUploadRequest) {
possible_field_types.back().insert(ADDRESS_BILLING_LINE1);
possible_field_types.back().insert(ADDRESS_BILLING_LINE2);
}
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
ASSERT_EQ(form_structure->field_count(), possible_field_types.size());
for (size_t i = 0; i < form_structure->field_count(); ++i)
form_structure->field(i)->set_possible_types(possible_field_types[i]);
@@ -1780,7 +1777,7 @@ TEST(FormStructureTest, CheckDataPresence) {
field.name = ASCIIToUTF16("email");
form.fields.push_back(field);
- FormStructure form_structure(form);
+ FormStructure form_structure(form, false);
FieldTypeSet unknown_type;
unknown_type.insert(UNKNOWN_TYPE);
@@ -2046,7 +2043,7 @@ TEST(FormStructureTest, CheckMultipleTypes) {
possible_field_types.push_back(FieldTypeSet());
possible_field_types.back().insert(ADDRESS_HOME_LINE1);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
for (size_t i = 0; i < form_structure->field_count(); ++i)
form_structure->field(i)->set_possible_types(possible_field_types[i]);
@@ -2136,26 +2133,26 @@ TEST(FormStructureTest, CheckFormSignature) {
field.name = ASCIIToUTF16("first");
form.fields.push_back(field);
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
EXPECT_EQ(FormStructureTest::Hash64Bit(
std::string("://&&email&first")),
form_structure->FormSignature());
form.origin = GURL(std::string("http://www.facebook.com"));
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
EXPECT_EQ(FormStructureTest::Hash64Bit(
std::string("http://www.facebook.com&&email&first")),
form_structure->FormSignature());
form.action = GURL(std::string("https://login.facebook.com/path"));
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
EXPECT_EQ(FormStructureTest::Hash64Bit(
std::string("https://login.facebook.com&&email&first")),
form_structure->FormSignature());
form.name = ASCIIToUTF16("login_form");
- form_structure.reset(new FormStructure(form));
+ form_structure.reset(new FormStructure(form, false));
EXPECT_EQ(FormStructureTest::Hash64Bit(
std::string("https://login.facebook.com&login_form&email&first")),
form_structure->FormSignature());
@@ -2184,10 +2181,10 @@ TEST(FormStructureTest, ToFormData) {
field.form_control_type = "submit";
form.fields.push_back(field);
- EXPECT_EQ(form, FormStructure(form).ToFormData());
+ EXPECT_EQ(form, FormStructure(form, false).ToFormData());
// Currently |FormStructure(form_data)ToFormData().user_submitted| is always
// false. This forces a future author that changes this to update this test.
form.user_submitted = true;
- EXPECT_NE(form, FormStructure(form).ToFormData());
+ EXPECT_NE(form, FormStructure(form, false).ToFormData());
}

Powered by Google App Engine
This is Rietveld 408576698