| Index: webkit/glue/form_field.h
|
| diff --git a/webkit/glue/form_field.h b/webkit/glue/form_field.h
|
| index 58ad15751837222f4325dda0d958e24970d9bf5b..622dabfc6fcb23e34ae06b173c7d34f8b585ef2c 100644
|
| --- a/webkit/glue/form_field.h
|
| +++ b/webkit/glue/form_field.h
|
| @@ -15,25 +15,15 @@ namespace webkit_glue {
|
| // Stores information about a field in a form.
|
| struct FormField {
|
| FormField();
|
| - FormField(const string16& label,
|
| - const string16& name,
|
| - const string16& value,
|
| - const string16& form_control_type,
|
| - int max_length,
|
| - bool is_autofilled);
|
| virtual ~FormField();
|
|
|
| - // Equality tests for identity which does not include |value_| or |size_|.
|
| - // Use |StrictlyEqualsHack| method to test all members.
|
| + // Equality tests for identity which does not include |value| or
|
| + // |is_autofilled|.
|
| // TODO(dhollowa): These operators need to be revised when we implement field
|
| // ids.
|
| bool operator==(const FormField& field) const;
|
| bool operator!=(const FormField& field) const;
|
|
|
| - // Test equality of all data members.
|
| - // TODO(dhollowa): This will be removed when we implement field ids.
|
| - bool StrictlyEqualsHack(const FormField& field) const;
|
| -
|
| string16 label;
|
| string16 name;
|
| string16 value;
|
| @@ -52,4 +42,16 @@ std::ostream& operator<<(std::ostream& os, const FormField& field);
|
|
|
| } // namespace webkit_glue
|
|
|
| +// Prefer to use this macro in place of |EXPECT_EQ()| for comparing |FormField|s
|
| +// in test code.
|
| +#define EXPECT_FORM_FIELD_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.max_length, actual.max_length); \
|
| + EXPECT_EQ(expected.is_autofilled, actual.is_autofilled); \
|
| + } while (0)
|
| +
|
| #endif // WEBKIT_GLUE_FORM_FIELD_H_
|
|
|