| 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 "base/memory/scoped_vector.h" | 5 #include "base/memory/scoped_vector.h" |
| 6 #include "base/string16.h" | 6 #include "base/string16.h" |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "components/autofill/browser/android/auxiliary_profile_loader_android.h
" | 8 #include "components/autofill/browser/android/auxiliary_profile_loader_android.h
" |
| 9 #include "components/autofill/browser/android/auxiliary_profiles_android.h" | 9 #include "components/autofill/browser/android/auxiliary_profiles_android.h" |
| 10 #include "components/autofill/browser/android/test_auxiliary_profile_loader_andr
oid.h" | 10 #include "components/autofill/browser/android/test_auxiliary_profile_loader_andr
oid.h" |
| 11 #include "components/autofill/browser/autofill_profile.h" | 11 #include "components/autofill/browser/autofill_profile.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 13 |
| 14 class AuxiliaryProfileAndroidTest : public testing::Test { | 14 class AuxiliaryProfileAndroidTest : public testing::Test { |
| 15 public: | 15 public: |
| 16 AuxiliaryProfileAndroidTest() {} | 16 AuxiliaryProfileAndroidTest() {} |
| 17 | 17 |
| 18 AutofillProfile* GetAndLoadProfile() { | 18 AutofillProfile* GetAndLoadProfile() { |
| 19 autofill::AuxiliaryProfilesAndroid impl(profile_loader_); | 19 autofill::AuxiliaryProfilesAndroid impl(profile_loader_, "en-US"); |
| 20 profile_ = impl.LoadContactsProfile(); | 20 profile_ = impl.LoadContactsProfile(); |
| 21 return profile_.get(); | 21 return profile_.get(); |
| 22 } | 22 } |
| 23 | 23 |
| 24 TestAuxiliaryProfileLoader& profile_loader() { | 24 TestAuxiliaryProfileLoader& profile_loader() { |
| 25 return profile_loader_; | 25 return profile_loader_; |
| 26 } | 26 } |
| 27 | 27 |
| 28 private: | 28 private: |
| 29 TestAuxiliaryProfileLoader profile_loader_; | 29 TestAuxiliaryProfileLoader profile_loader_; |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 TEST_F(AuxiliaryProfileAndroidTest, SetAddressInfoEmpty) { | 150 TEST_F(AuxiliaryProfileAndroidTest, SetAddressInfoEmpty) { |
| 151 AutofillProfile* profile = GetAndLoadProfile(); | 151 AutofillProfile* profile = GetAndLoadProfile(); |
| 152 EXPECT_EQ(profile->GetRawInfo(ADDRESS_HOME_LINE1), string16()); | 152 EXPECT_EQ(profile->GetRawInfo(ADDRESS_HOME_LINE1), string16()); |
| 153 EXPECT_EQ(profile->GetRawInfo(ADDRESS_HOME_LINE2), string16()); | 153 EXPECT_EQ(profile->GetRawInfo(ADDRESS_HOME_LINE2), string16()); |
| 154 EXPECT_EQ(profile->GetRawInfo(ADDRESS_HOME_CITY), string16()); | 154 EXPECT_EQ(profile->GetRawInfo(ADDRESS_HOME_CITY), string16()); |
| 155 EXPECT_EQ(profile->GetRawInfo(ADDRESS_HOME_ZIP), string16()); | 155 EXPECT_EQ(profile->GetRawInfo(ADDRESS_HOME_ZIP), string16()); |
| 156 EXPECT_EQ(profile->GetRawInfo(ADDRESS_HOME_STATE), string16()); | 156 EXPECT_EQ(profile->GetRawInfo(ADDRESS_HOME_STATE), string16()); |
| 157 EXPECT_EQ(profile->GetRawInfo(ADDRESS_HOME_COUNTRY), string16()); | 157 EXPECT_EQ(profile->GetRawInfo(ADDRESS_HOME_COUNTRY), string16()); |
| 158 } | 158 } |
| 159 #endif | 159 #endif |
| OLD | NEW |