| 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/browser/autofill_field.h" | 5 #include "components/autofill/core/browser/autofill_field.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 NotNumericMonthsContentsNoPlaceholder()}, | 510 NotNumericMonthsContentsNoPlaceholder()}, |
| 511 // Values start at 1 but single digits are whitespace padded! | 511 // Values start at 1 but single digits are whitespace padded! |
| 512 {{" 1", " 2", " 3", " 4", " 5", " 6", " 7", " 8", " 9", "10", "11", "12"}, | 512 {{" 1", " 2", " 3", " 4", " 5", " 6", " 7", " 8", " 9", "10", "11", "12"}, |
| 513 NotNumericMonthsContentsNoPlaceholder()}, | 513 NotNumericMonthsContentsNoPlaceholder()}, |
| 514 // Values start at 0. | 514 // Values start at 0. |
| 515 {{"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11"}, | 515 {{"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11"}, |
| 516 NotNumericMonthsContentsNoPlaceholder()}, | 516 NotNumericMonthsContentsNoPlaceholder()}, |
| 517 // Values start at 00. | 517 // Values start at 00. |
| 518 {{"00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11"}, | 518 {{"00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11"}, |
| 519 NotNumericMonthsContentsNoPlaceholder()}, | 519 NotNumericMonthsContentsNoPlaceholder()}, |
| 520 // The AngularJS framework adds a prefix to number types. Test that it is |
| 521 // removed. |
| 522 {{"number:1", "number:2", "number:3", "number:4", "number:5", "number:6", |
| 523 "number:7", "number:8", "number:9", "number:10", "number:11", |
| 524 "number:12"}, |
| 525 NotNumericMonthsContentsNoPlaceholder()}, |
| 520 // Values start at 0 and the first content is a placeholder. | 526 // Values start at 0 and the first content is a placeholder. |
| 521 {{"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, | 527 {{"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, |
| 522 NotNumericMonthsContentsWithPlaceholder()}, | 528 NotNumericMonthsContentsWithPlaceholder()}, |
| 523 // Values start at 1 and the first content is a placeholder. | 529 // Values start at 1 and the first content is a placeholder. |
| 524 {{"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13"}, | 530 {{"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13"}, |
| 525 NotNumericMonthsContentsWithPlaceholder()}, | 531 NotNumericMonthsContentsWithPlaceholder()}, |
| 526 // Values start at 01 and the first content is a placeholder. | 532 // Values start at 01 and the first content is a placeholder. |
| 527 {{"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", | 533 {{"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", |
| 528 "13"}, | 534 "13"}, |
| 529 NotNumericMonthsContentsWithPlaceholder()}, | 535 NotNumericMonthsContentsWithPlaceholder()}, |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 891 bool has_filled = AutofillField::FillFormField( | 897 bool has_filled = AutofillField::FillFormField( |
| 892 field, ASCIIToUTF16(test_case.value_to_fill), "en-US", "en-US", &field); | 898 field, ASCIIToUTF16(test_case.value_to_fill), "en-US", "en-US", &field); |
| 893 | 899 |
| 894 EXPECT_EQ(test_case.should_fill, has_filled); | 900 EXPECT_EQ(test_case.should_fill, has_filled); |
| 895 EXPECT_EQ(ASCIIToUTF16(test_case.expected_value), field.value); | 901 EXPECT_EQ(ASCIIToUTF16(test_case.expected_value), field.value); |
| 896 } | 902 } |
| 897 } | 903 } |
| 898 | 904 |
| 899 } // namespace | 905 } // namespace |
| 900 } // namespace autofill | 906 } // namespace autofill |
| OLD | NEW |