| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/format_macros.h" | 7 #include "base/format_macros.h" |
| 8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "third_party/WebKit/public/platform/WebVector.h" | 21 #include "third_party/WebKit/public/platform/WebVector.h" |
| 22 #include "third_party/WebKit/public/web/WebDocument.h" | 22 #include "third_party/WebKit/public/web/WebDocument.h" |
| 23 #include "third_party/WebKit/public/web/WebElement.h" | 23 #include "third_party/WebKit/public/web/WebElement.h" |
| 24 #include "third_party/WebKit/public/web/WebFormControlElement.h" | 24 #include "third_party/WebKit/public/web/WebFormControlElement.h" |
| 25 #include "third_party/WebKit/public/web/WebFormElement.h" | 25 #include "third_party/WebKit/public/web/WebFormElement.h" |
| 26 #include "third_party/WebKit/public/web/WebInputElement.h" | 26 #include "third_party/WebKit/public/web/WebInputElement.h" |
| 27 #include "third_party/WebKit/public/web/WebNode.h" | 27 #include "third_party/WebKit/public/web/WebNode.h" |
| 28 #include "third_party/WebKit/public/web/WebSelectElement.h" | 28 #include "third_party/WebKit/public/web/WebSelectElement.h" |
| 29 #include "third_party/WebKit/public/web/WebTextAreaElement.h" | 29 #include "third_party/WebKit/public/web/WebTextAreaElement.h" |
| 30 | 30 |
| 31 using WebKit::WebDocument; | 31 using blink::WebDocument; |
| 32 using WebKit::WebElement; | 32 using blink::WebElement; |
| 33 using WebKit::WebFormControlElement; | 33 using blink::WebFormControlElement; |
| 34 using WebKit::WebFormElement; | 34 using blink::WebFormElement; |
| 35 using WebKit::WebFrame; | 35 using blink::WebFrame; |
| 36 using WebKit::WebInputElement; | 36 using blink::WebInputElement; |
| 37 using WebKit::WebNode; | 37 using blink::WebNode; |
| 38 using WebKit::WebSelectElement; | 38 using blink::WebSelectElement; |
| 39 using WebKit::WebString; | 39 using blink::WebString; |
| 40 using WebKit::WebTextAreaElement; | 40 using blink::WebTextAreaElement; |
| 41 using WebKit::WebVector; | 41 using blink::WebVector; |
| 42 | 42 |
| 43 namespace { | 43 namespace { |
| 44 | 44 |
| 45 struct AutofillFieldCase { | 45 struct AutofillFieldCase { |
| 46 const char* const form_control_type; | 46 const char* const form_control_type; |
| 47 const char* const name; | 47 const char* const name; |
| 48 const char* const initial_value; | 48 const char* const initial_value; |
| 49 const char* const autocomplete_attribute; // The autocomplete attribute of | 49 const char* const autocomplete_attribute; // The autocomplete attribute of |
| 50 // the element. | 50 // the element. |
| 51 bool should_be_autofilled; // Whether the filed should be autofilled. | 51 bool should_be_autofilled; // Whether the filed should be autofilled. |
| (...skipping 3136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3188 EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[1]); | 3188 EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[1]); |
| 3189 | 3189 |
| 3190 expected.name = ASCIIToUTF16("country"); | 3190 expected.name = ASCIIToUTF16("country"); |
| 3191 expected.value = ASCIIToUTF16("AL"); | 3191 expected.value = ASCIIToUTF16("AL"); |
| 3192 expected.form_control_type = "select-one"; | 3192 expected.form_control_type = "select-one"; |
| 3193 expected.max_length = 0; | 3193 expected.max_length = 0; |
| 3194 EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[2]); | 3194 EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[2]); |
| 3195 } | 3195 } |
| 3196 | 3196 |
| 3197 } // namespace autofill | 3197 } // namespace autofill |
| OLD | NEW |