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

Side by Side Diff: chrome/renderer/autofill/form_autofill_browsertest.cc

Issue 140903004: Add autofill preview support for <month> input fields (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reabase to revision 254451 Created 6 years, 9 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
« no previous file with comments | « no previous file | components/autofill/content/renderer/form_autofill_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 // Disabled fields should not be previewed. 1194 // Disabled fields should not be previewed.
1195 {"text", "notenabled", "", "", false, "suggested notenabled", ""}, 1195 {"text", "notenabled", "", "", false, "suggested notenabled", ""},
1196 // Readonly fields should not be previewed. 1196 // Readonly fields should not be previewed.
1197 {"text", "readonly", "", "", false, "suggested readonly", ""}, 1197 {"text", "readonly", "", "", false, "suggested readonly", ""},
1198 // Fields with "visibility: hidden" should not be previewed. 1198 // Fields with "visibility: hidden" should not be previewed.
1199 {"text", "invisible", "", "", false, "suggested invisible", 1199 {"text", "invisible", "", "", false, "suggested invisible",
1200 ""}, 1200 ""},
1201 // Fields with "display:none" should not previewed. 1201 // Fields with "display:none" should not previewed.
1202 {"text", "displaynone", "", "", false, "suggested displaynone", 1202 {"text", "displaynone", "", "", false, "suggested displaynone",
1203 ""}, 1203 ""},
1204 // Regular <input type="month"> should not be previewed. 1204 // Regular <input type="month"> should be previewed.
1205 {"month", "month", "", "", false, "2017-11", ""}, 1205 {"month", "month", "", "", true, "2017-11", "2017-11"},
1206 // Non-empty <input type="month"> should not be previewed. 1206 // Non-empty <input type="month"> should not be previewed.
1207 {"month", "month-nonempty", "2011-12", "", false, "2017-11", ""}, 1207 {"month", "month-nonempty", "2011-12", "", false, "2017-11", ""},
1208 // Regular select fields preview is not yet supported 1208 // Regular select fields preview is not yet supported
1209 {"select-one", "select", "", "", false, "TX", ""}, 1209 {"select-one", "select", "", "", false, "TX", ""},
1210 // Select fields preview is not yet supported 1210 // Select fields preview is not yet supported
1211 {"select-one", "select-nonempty", "CA", "", false, "TX", "CA"}, 1211 {"select-one", "select-nonempty", "CA", "", false, "TX", "CA"},
1212 // Normal textarea elements should be previewed. 1212 // Normal textarea elements should be previewed.
1213 {"textarea", "textarea", "", "", true, "suggested multi-\nline value", 1213 {"textarea", "textarea", "", "", true, "suggested multi-\nline value",
1214 "suggested multi-\nline value"}, 1214 "suggested multi-\nline value"},
1215 // Nonempty textarea elements should not be previewed. 1215 // Nonempty textarea elements should not be previewed.
(...skipping 1998 matching lines...) Expand 10 before | Expand all | Expand 10 after
3214 EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[1]); 3214 EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[1]);
3215 3215
3216 expected.name = ASCIIToUTF16("country"); 3216 expected.name = ASCIIToUTF16("country");
3217 expected.value = ASCIIToUTF16("AL"); 3217 expected.value = ASCIIToUTF16("AL");
3218 expected.form_control_type = "select-one"; 3218 expected.form_control_type = "select-one";
3219 expected.max_length = 0; 3219 expected.max_length = 0;
3220 EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[2]); 3220 EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[2]);
3221 } 3221 }
3222 3222
3223 } // namespace autofill 3223 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | components/autofill/content/renderer/form_autofill_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698