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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 NotNumericMonthsContentsNoPlaceholder()}, | 549 NotNumericMonthsContentsNoPlaceholder()}, |
550 // Values start at 0 and the first content is a placeholder. | 550 // Values start at 0 and the first content is a placeholder. |
551 {{"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, | 551 {{"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, |
552 NotNumericMonthsContentsWithPlaceholder()}, | 552 NotNumericMonthsContentsWithPlaceholder()}, |
553 // Values start at 1 and the first content is a placeholder. | 553 // Values start at 1 and the first content is a placeholder. |
554 {{"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13"}, | 554 {{"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13"}, |
555 NotNumericMonthsContentsWithPlaceholder()}, | 555 NotNumericMonthsContentsWithPlaceholder()}, |
556 // Values start at 01 and the first content is a placeholder. | 556 // Values start at 01 and the first content is a placeholder. |
557 {{"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", | 557 {{"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", |
558 "13"}, | 558 "13"}, |
| 559 NotNumericMonthsContentsWithPlaceholder()}, |
| 560 // Values start at 0 after a placeholder. |
| 561 {{"?", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11"}, |
| 562 NotNumericMonthsContentsWithPlaceholder()}, |
| 563 // Values start at 1 after a placeholder. |
| 564 {{"?", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, |
559 NotNumericMonthsContentsWithPlaceholder()}}; | 565 NotNumericMonthsContentsWithPlaceholder()}}; |
560 | 566 |
561 for (TestCase test_case : test_cases) { | 567 for (TestCase test_case : test_cases) { |
562 ASSERT_EQ(test_case.select_values.size(), test_case.select_contents.size()); | 568 ASSERT_EQ(test_case.select_values.size(), test_case.select_contents.size()); |
563 | 569 |
564 TestFillingExpirationMonth(test_case.select_values, | 570 TestFillingExpirationMonth(test_case.select_values, |
565 test_case.select_contents, | 571 test_case.select_contents, |
566 test_case.select_values.size()); | 572 test_case.select_values.size()); |
567 } | 573 } |
568 } | 574 } |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
878 index = kBadIndex; | 884 index = kBadIndex; |
879 ret = AutofillField::FindValueInSelectControl( | 885 ret = AutofillField::FindValueInSelectControl( |
880 field, UTF8ToUTF16("NoVaScOtIa"), &index); | 886 field, UTF8ToUTF16("NoVaScOtIa"), &index); |
881 EXPECT_TRUE(ret); | 887 EXPECT_TRUE(ret); |
882 EXPECT_EQ(2U, index); | 888 EXPECT_EQ(2U, index); |
883 } | 889 } |
884 } | 890 } |
885 | 891 |
886 } // namespace | 892 } // namespace |
887 } // namespace autofill | 893 } // namespace autofill |
OLD | NEW |