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

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

Issue 3806008: Never allow empty preview entries. As some data is always present (we drop co... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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
Index: chrome/browser/autofill/personal_data_manager_unittest.cc
===================================================================
--- chrome/browser/autofill/personal_data_manager_unittest.cc (revision 63786)
+++ chrome/browser/autofill/personal_data_manager_unittest.cc (working copy)
@@ -501,8 +501,11 @@
profile0.set_unique_id(update[0].unique_id());
profile1.set_unique_id(update[1].unique_id());
- profile0.set_label(update[0].Label());
- profile1.set_label(update[1].Label());
+ // Labels depend on other profiles in the list - update labels manually/
+ std::vector<AutoFillProfile *> profile_pointers;
+ profile_pointers.push_back(&profile0);
+ profile_pointers.push_back(&profile1);
+ AutoFillProfile::AdjustInferredLabels(&profile_pointers);
// Wait for the refresh.
EXPECT_CALL(personal_data_observer_,
@@ -521,6 +524,10 @@
"joewayne@me.xyz", "Fox", "1212 Center.", "Bld. 5", "Orlando", "FL",
"32801", "US", "19482937549", "13502849239");
+ // Adjust all labels.
+ profile_pointers.push_back(profile2.get());
+ AutoFillProfile::AdjustInferredLabels(&profile_pointers);
+
WebDataService* wds = profile_->GetWebDataService(Profile::EXPLICIT_ACCESS);
ASSERT_TRUE(wds);
wds->AddAutoFillProfile(*profile2.get());
« no previous file with comments | « chrome/browser/autofill/personal_data_manager.cc ('k') | chrome/browser/dom_ui/options/autofill_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698