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

Side by Side Diff: components/autofill/core/common/form_data_unittest.cc

Issue 2022123002: Merge autofill::FormFieldData::is_checkable and is_checked (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « components/autofill/core/browser/form_structure_unittest.cc ('k') | components/autofill/core/common/form_field_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698