OLD | NEW |
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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/guid.h" | 6 #include "base/guid.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
11 #include "base/strings/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
13 #include "components/autofill/browser/autofill_common_test.h" | 13 #include "components/autofill/browser/autofill_common_test.h" |
14 #include "components/autofill/browser/autofill_profile.h" | 14 #include "components/autofill/browser/autofill_profile.h" |
15 #include "components/autofill/common/form_field_data.h" | 15 #include "components/autofill/core/common/form_field_data.h" |
16 #include "grit/component_resources.h" | 16 #include "grit/component_resources.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 | 18 |
19 namespace autofill { | 19 namespace autofill { |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 bool UpdateProfileLabel(AutofillProfile *profile) { | 23 bool UpdateProfileLabel(AutofillProfile *profile) { |
24 std::vector<AutofillProfile*> profiles; | 24 std::vector<AutofillProfile*> profiles; |
25 profiles.push_back(profile); | 25 profiles.push_back(profile); |
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
889 field.option_values = values; | 889 field.option_values = values; |
890 field.option_contents = contents; | 890 field.option_contents = contents; |
891 | 891 |
892 AutofillProfile profile(base::GenerateGUID(), "https://www.example.com/"); | 892 AutofillProfile profile(base::GenerateGUID(), "https://www.example.com/"); |
893 profile.SetRawInfo(ADDRESS_HOME_STATE, ASCIIToUTF16("California")); | 893 profile.SetRawInfo(ADDRESS_HOME_STATE, ASCIIToUTF16("California")); |
894 profile.FillSelectControl(ADDRESS_HOME_STATE, "en-US", &field); | 894 profile.FillSelectControl(ADDRESS_HOME_STATE, "en-US", &field); |
895 EXPECT_EQ(ASCIIToUTF16("2"), field.value); | 895 EXPECT_EQ(ASCIIToUTF16("2"), field.value); |
896 } | 896 } |
897 | 897 |
898 } // namespace autofill | 898 } // namespace autofill |
OLD | NEW |