| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/autofill/core/common/form_data.h" | 5 #include "components/autofill/core/common/form_data.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/pickle.h" | 9 #include "base/pickle.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 data->is_formless_checkout = false; // Default value. | 108 data->is_formless_checkout = false; // Default value. |
| 109 | 109 |
| 110 FormFieldData field_data; | 110 FormFieldData field_data; |
| 111 field_data.label = base::ASCIIToUTF16("label"); | 111 field_data.label = base::ASCIIToUTF16("label"); |
| 112 field_data.name = base::ASCIIToUTF16("name"); | 112 field_data.name = base::ASCIIToUTF16("name"); |
| 113 field_data.value = base::ASCIIToUTF16("value"); | 113 field_data.value = base::ASCIIToUTF16("value"); |
| 114 field_data.form_control_type = "password"; | 114 field_data.form_control_type = "password"; |
| 115 field_data.autocomplete_attribute = "off"; | 115 field_data.autocomplete_attribute = "off"; |
| 116 field_data.max_length = 200; | 116 field_data.max_length = 200; |
| 117 field_data.is_autofilled = true; | 117 field_data.is_autofilled = true; |
| 118 field_data.is_checked = true; | 118 field_data.check_status = FormFieldData::CheckStatus::CHECKED; |
| 119 field_data.is_checkable = true; | |
| 120 field_data.is_focusable = true; | 119 field_data.is_focusable = true; |
| 121 field_data.should_autocomplete = false; | 120 field_data.should_autocomplete = false; |
| 122 field_data.text_direction = base::i18n::RIGHT_TO_LEFT; | 121 field_data.text_direction = base::i18n::RIGHT_TO_LEFT; |
| 123 field_data.option_values.push_back(base::ASCIIToUTF16("First")); | 122 field_data.option_values.push_back(base::ASCIIToUTF16("First")); |
| 124 field_data.option_values.push_back(base::ASCIIToUTF16("Second")); | 123 field_data.option_values.push_back(base::ASCIIToUTF16("Second")); |
| 125 field_data.option_contents.push_back(base::ASCIIToUTF16("First")); | 124 field_data.option_contents.push_back(base::ASCIIToUTF16("First")); |
| 126 field_data.option_contents.push_back(base::ASCIIToUTF16("Second")); | 125 field_data.option_contents.push_back(base::ASCIIToUTF16("Second")); |
| 127 | 126 |
| 128 data->fields.push_back(field_data); | 127 data->fields.push_back(field_data); |
| 129 | 128 |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 | 258 |
| 260 base::PickleIterator iter(pickle); | 259 base::PickleIterator iter(pickle); |
| 261 FormData actual; | 260 FormData actual; |
| 262 EXPECT_FALSE(DeserializeFormData(&iter, &actual)); | 261 EXPECT_FALSE(DeserializeFormData(&iter, &actual)); |
| 263 | 262 |
| 264 FormData empty; | 263 FormData empty; |
| 265 EXPECT_TRUE(actual.SameFormAs(empty)); | 264 EXPECT_TRUE(actual.SameFormAs(empty)); |
| 266 } | 265 } |
| 267 | 266 |
| 268 } // namespace autofill | 267 } // namespace autofill |
| OLD | NEW |