Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Side by Side Diff: components/autofill/browser/android/auxiliary_profile_unittest_android.cc

Issue 13697002: Make autofill's Address store country using the country code so that app locale isn't needed for th… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix remaining tests Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW
« no previous file with comments | « components/autofill/browser/address_unittest.cc ('k') | components/autofill/browser/android/auxiliary_profiles_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698