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

Unified Diff: chrome/browser/webdata/web_database_unittest.cc

Issue 545175: Add the ability to save and remove AutoFill profiles from the AutoFillDialog.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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/webdata/web_database.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/webdata/web_database_unittest.cc
===================================================================
--- chrome/browser/webdata/web_database_unittest.cc (revision 36778)
+++ chrome/browser/webdata/web_database_unittest.cc (working copy)
@@ -52,40 +52,6 @@
return os << " " << change.key();
}
-// So we can compare AutoFillProfiles with EXPECT_EQ().
-std::ostream& operator<<(std::ostream& os, const AutoFillProfile& profile) {
- return os
- << UTF16ToASCII(profile.Label())
- << " "
- << UTF16ToUTF8(profile.GetFieldText(AutoFillType(NAME_FIRST)))
- << " "
- << UTF16ToUTF8(profile.GetFieldText(AutoFillType(NAME_MIDDLE)))
- << " "
- << UTF16ToUTF8(profile.GetFieldText(AutoFillType(NAME_LAST)))
- << " "
- << UTF16ToUTF8(profile.GetFieldText(AutoFillType(EMAIL_ADDRESS)))
- << " "
- << UTF16ToUTF8(profile.GetFieldText(AutoFillType(COMPANY_NAME)))
- << " "
- << UTF16ToUTF8(profile.GetFieldText(AutoFillType(ADDRESS_HOME_LINE1)))
- << " "
- << UTF16ToUTF8(profile.GetFieldText(AutoFillType(ADDRESS_HOME_LINE2)))
- << " "
- << UTF16ToUTF8(profile.GetFieldText(AutoFillType(ADDRESS_HOME_CITY)))
- << " "
- << UTF16ToUTF8(profile.GetFieldText(AutoFillType(ADDRESS_HOME_STATE)))
- << " "
- << UTF16ToUTF8(profile.GetFieldText(AutoFillType(ADDRESS_HOME_ZIP)))
- << " "
- << UTF16ToUTF8(profile.GetFieldText(AutoFillType(ADDRESS_HOME_COUNTRY)))
- << " "
- << UTF16ToUTF8(profile.GetFieldText(AutoFillType(
- PHONE_HOME_WHOLE_NUMBER)))
- << " "
- << UTF16ToUTF8(profile.GetFieldText(AutoFillType(
- PHONE_FAX_WHOLE_NUMBER)));
-}
-
class WebDatabaseTest : public testing::Test {
protected:
typedef std::vector<AutofillChange> AutofillChangeList;
@@ -963,7 +929,7 @@
delete db_profile;
// Remove the 'Billing' profile.
- EXPECT_TRUE(db.RemoveAutoFillProfile(billing_profile));
+ EXPECT_TRUE(db.RemoveAutoFillProfile(billing_profile.unique_id()));
EXPECT_FALSE(db.GetAutoFillProfileForLabel(ASCIIToUTF16("Billing"),
&db_profile));
}
« no previous file with comments | « chrome/browser/webdata/web_database.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698