| 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 "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "components/autofill/core/browser/autofill_type.h" | 10 #include "components/autofill/core/browser/autofill_type.h" |
| 11 #include "components/autofill/core/browser/field_types.h" | 11 #include "components/autofill/core/browser/field_types.h" |
| 12 #include "components/autofill/core/common/autofill_util.h" | 12 #include "components/autofill/core/common/autofill_util.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 14 |
| 15 using base::ASCIIToUTF16; | 15 using base::ASCIIToUTF16; |
| 16 using base::StringToInt; | 16 using base::StringToInt; |
| 17 using base::UTF8ToUTF16; | 17 using base::UTF8ToUTF16; |
| 18 | 18 |
| 19 namespace autofill { | 19 namespace autofill { |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 #if defined(OS_WIN) |
| 23 // VS 2015 gives a warning about its limitations: |
| 24 // warning C4592: symbol will be dynamically initialized |
| 25 #pragma warning(disable : 4592) |
| 26 #endif |
| 27 |
| 22 const std::vector<const char*> kNotNumericMonthsContentsNoPlaceholder = { | 28 const std::vector<const char*> kNotNumericMonthsContentsNoPlaceholder = { |
| 23 "Jan", "Fev", "Mar", "Apr", "May", "Jun", | 29 "Jan", "Fev", "Mar", "Apr", "May", "Jun", |
| 24 "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; | 30 "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; |
| 25 | 31 |
| 26 const std::vector<const char*> kNotNumericMonthsContentsWithPlaceholder = { | 32 const std::vector<const char*> kNotNumericMonthsContentsWithPlaceholder = { |
| 27 "Select a Month", | 33 "Select a Month", |
| 28 "Jan", | 34 "Jan", |
| 29 "Fev", | 35 "Fev", |
| 30 "Mar", | 36 "Mar", |
| 31 "Apr", | 37 "Apr", |
| (...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 index = kBadIndex; | 796 index = kBadIndex; |
| 791 ret = AutofillField::FindValueInSelectControl( | 797 ret = AutofillField::FindValueInSelectControl( |
| 792 field, UTF8ToUTF16("NoVaScOtIa"), &index); | 798 field, UTF8ToUTF16("NoVaScOtIa"), &index); |
| 793 EXPECT_TRUE(ret); | 799 EXPECT_TRUE(ret); |
| 794 EXPECT_EQ(2U, index); | 800 EXPECT_EQ(2U, index); |
| 795 } | 801 } |
| 796 } | 802 } |
| 797 | 803 |
| 798 } // namespace | 804 } // namespace |
| 799 } // namespace autofill | 805 } // namespace autofill |
| OLD | NEW |