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

Unified Diff: chrome/browser/autofill/autofill_manager_unittest.cc

Issue 2835026: Added inferred labels implementation. Label inferred from the person name + d... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/autofill/autofill_manager.cc ('k') | chrome/browser/autofill/autofill_profile.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_manager_unittest.cc
===================================================================
--- chrome/browser/autofill/autofill_manager_unittest.cc (revision 52727)
+++ chrome/browser/autofill/autofill_manager_unittest.cc (working copy)
@@ -311,8 +311,10 @@
EXPECT_EQ(ASCIIToUTF16("Elvis"), values[0]);
EXPECT_EQ(ASCIIToUTF16("Charles"), values[1]);
ASSERT_EQ(2U, labels.size());
- EXPECT_EQ(ASCIIToUTF16("Home"), labels[0]);
- EXPECT_EQ(ASCIIToUTF16("Work"), labels[1]);
+ // Inferred labels now include full first relevant field, which in this case
+ // the address #1.
+ EXPECT_EQ(ASCIIToUTF16("3734 Elvis Presley Blvd."), labels[0]);
+ EXPECT_EQ(ASCIIToUTF16("123 Apple St."), labels[1]);
}
TEST_F(AutoFillManagerTest, GetProfileSuggestionsMatchCharacter) {
@@ -346,7 +348,7 @@
ASSERT_EQ(1U, values.size());
EXPECT_EQ(ASCIIToUTF16("Elvis"), values[0]);
ASSERT_EQ(1U, labels.size());
- EXPECT_EQ(ASCIIToUTF16("Home"), labels[0]);
+ EXPECT_EQ(ASCIIToUTF16("3734 Elvis Presley Blvd."), labels[0]);
}
TEST_F(AutoFillManagerTest, GetCreditCardSuggestionsEmptyValue) {
@@ -590,8 +592,8 @@
EXPECT_EQ(ASCIIToUTF16("Jay"), values[2]);
EXPECT_EQ(ASCIIToUTF16("Jason"), values[3]);
ASSERT_EQ(4U, labels.size());
- EXPECT_EQ(ASCIIToUTF16("Home"), labels[0]);
- EXPECT_EQ(ASCIIToUTF16("Work"), labels[1]);
+ EXPECT_EQ(ASCIIToUTF16("3734 Elvis Presley Blvd."), labels[0]);
+ EXPECT_EQ(ASCIIToUTF16("123 Apple St."), labels[1]);
EXPECT_EQ(string16(), labels[2]);
EXPECT_EQ(string16(), labels[3]);
}
« no previous file with comments | « chrome/browser/autofill/autofill_manager.cc ('k') | chrome/browser/autofill/autofill_profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698