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

Unified Diff: components/autofill/core/common/form_field_data.h

Issue 1842693003: [Autofill] Fill fields where the value equals the placeholder attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 4 years, 9 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/common/form_field_data.h
diff --git a/components/autofill/core/common/form_field_data.h b/components/autofill/core/common/form_field_data.h
index dac7244f8d04ceae1f1d49ceb6f6e0c0e89b2a12..5a9bb8a89356c48dba81b25d492b3836333a9d39 100644
--- a/components/autofill/core/common/form_field_data.h
+++ b/components/autofill/core/common/form_field_data.h
@@ -46,6 +46,7 @@ struct FormFieldData {
base::string16 value;
std::string form_control_type;
std::string autocomplete_attribute;
+ base::string16 placeholder;
// Note: we use uint64_t instead of size_t because this struct is sent over
// IPC which could span 32 & 64 bit processes. We chose uint64_t instead of
// uint32_t to maintain compatibility with old code which used size_t
@@ -77,17 +78,18 @@ std::ostream& operator<<(std::ostream& os, const FormFieldData& field);
// Prefer to use this macro in place of |EXPECT_EQ()| for comparing
// |FormFieldData|s in test code.
-#define EXPECT_FORM_FIELD_DATA_EQUALS(expected, actual) \
- do { \
- EXPECT_EQ(expected.label, actual.label); \
- EXPECT_EQ(expected.name, actual.name); \
- EXPECT_EQ(expected.value, actual.value); \
- EXPECT_EQ(expected.form_control_type, actual.form_control_type); \
+#define EXPECT_FORM_FIELD_DATA_EQUALS(expected, actual) \
+ do { \
+ EXPECT_EQ(expected.label, actual.label); \
+ EXPECT_EQ(expected.name, actual.name); \
+ EXPECT_EQ(expected.value, actual.value); \
+ EXPECT_EQ(expected.form_control_type, actual.form_control_type); \
EXPECT_EQ(expected.autocomplete_attribute, actual.autocomplete_attribute); \
- EXPECT_EQ(expected.max_length, actual.max_length); \
- EXPECT_EQ(expected.is_autofilled, actual.is_autofilled); \
- EXPECT_EQ(expected.is_checked, actual.is_checked); \
- EXPECT_EQ(expected.is_checkable, actual.is_checkable); \
+ EXPECT_EQ(expected.placeholder, actual.placeholder); \
+ EXPECT_EQ(expected.max_length, actual.max_length); \
+ EXPECT_EQ(expected.is_autofilled, actual.is_autofilled); \
+ EXPECT_EQ(expected.is_checked, actual.is_checked); \
+ EXPECT_EQ(expected.is_checkable, actual.is_checkable); \
} while (0)
} // namespace autofill
« no previous file with comments | « components/autofill/core/browser/autofill_manager_unittest.cc ('k') | components/autofill/core/common/form_field_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698