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

Side by Side Diff: webkit/glue/form_field.h

Issue 8488011: Moving AutofillAgent Logic into Browser (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_GLUE_FORM_FIELD_H_ 5 #ifndef WEBKIT_GLUE_FORM_FIELD_H_
6 #define WEBKIT_GLUE_FORM_FIELD_H_ 6 #define WEBKIT_GLUE_FORM_FIELD_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 13 matching lines...) Expand all
24 bool operator==(const FormField& field) const; 24 bool operator==(const FormField& field) const;
25 bool operator!=(const FormField& field) const; 25 bool operator!=(const FormField& field) const;
26 26
27 string16 label; 27 string16 label;
28 string16 name; 28 string16 name;
29 string16 value; 29 string16 value;
30 string16 form_control_type; 30 string16 form_control_type;
31 string16 autocomplete_type; 31 string16 autocomplete_type;
32 size_t max_length; 32 size_t max_length;
33 bool is_autofilled; 33 bool is_autofilled;
34 bool is_focusable;
35 bool autocomplete;
Ilya Sherman 2011/11/17 02:24:37 nit: Perhaps "should_autocomplete"?
csharp 2011/11/18 18:15:10 Done.
34 36
35 // For the HTML snippet |<option value="US">United States</option>|, the 37 // For the HTML snippet |<option value="US">United States</option>|, the
36 // value is "US" and the contents are "United States". 38 // value is "US" and the contents are "United States".
37 std::vector<string16> option_values; 39 std::vector<string16> option_values;
38 std::vector<string16> option_contents; 40 std::vector<string16> option_contents;
39 }; 41 };
40 42
41 // So we can compare FormFields with EXPECT_EQ(). 43 // So we can compare FormFields with EXPECT_EQ().
42 std::ostream& operator<<(std::ostream& os, const FormField& field); 44 std::ostream& operator<<(std::ostream& os, const FormField& field);
43 45
44 } // namespace webkit_glue 46 } // namespace webkit_glue
45 47
46 // Prefer to use this macro in place of |EXPECT_EQ()| for comparing |FormField|s 48 // Prefer to use this macro in place of |EXPECT_EQ()| for comparing |FormField|s
47 // in test code. 49 // in test code.
48 #define EXPECT_FORM_FIELD_EQUALS(expected, actual) \ 50 #define EXPECT_FORM_FIELD_EQUALS(expected, actual) \
49 do { \ 51 do { \
50 EXPECT_EQ(expected.label, actual.label); \ 52 EXPECT_EQ(expected.label, actual.label); \
51 EXPECT_EQ(expected.name, actual.name); \ 53 EXPECT_EQ(expected.name, actual.name); \
52 EXPECT_EQ(expected.value, actual.value); \ 54 EXPECT_EQ(expected.value, actual.value); \
53 EXPECT_EQ(expected.form_control_type, actual.form_control_type); \ 55 EXPECT_EQ(expected.form_control_type, actual.form_control_type); \
54 EXPECT_EQ(expected.autocomplete_type, actual.autocomplete_type); \ 56 EXPECT_EQ(expected.autocomplete_type, actual.autocomplete_type); \
55 EXPECT_EQ(expected.max_length, actual.max_length); \ 57 EXPECT_EQ(expected.max_length, actual.max_length); \
56 EXPECT_EQ(expected.is_autofilled, actual.is_autofilled); \ 58 EXPECT_EQ(expected.is_autofilled, actual.is_autofilled); \
57 } while (0) 59 } while (0)
58 60
59 #endif // WEBKIT_GLUE_FORM_FIELD_H_ 61 #endif // WEBKIT_GLUE_FORM_FIELD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698