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

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

Issue 6213002: Propagate correct data to the Toolbar servers (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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
Index: chrome/browser/autofill/personal_data_manager_unittest.cc
===================================================================
--- chrome/browser/autofill/personal_data_manager_unittest.cc (revision 71339)
+++ chrome/browser/autofill/personal_data_manager_unittest.cc (working copy)
@@ -279,6 +279,9 @@
EXPECT_EQ(creditcard0, *results2.at(0));
EXPECT_EQ(creditcard1, *results2.at(1));
+ // The message loop will exit when the mock observer is notified.
+ MessageLoop::current()->Run();
+
// Determine uniqueness by inserting all of the GUIDs into a set and verifying
// the size of the set matches the number of GUIDs.
std::set<std::string> guids;
@@ -322,13 +325,17 @@
// Add a new profile.
AutoFillProfile profile1;
+ // Need to be different from results2[0] by contents or it will be dropped.
autofill_test::SetProfileInfo(&profile1,
- "", "y", "", "", "", "", "", "", "", "", "", "", "", "");
+ "", "y", "1", "", "", "", "", "", "", "", "", "", "", "");
update.clear();
update.push_back(*results2[0]);
update.push_back(profile1);
personal_data_->SetProfiles(&update);
+ // The message loop will exit when the PersonalDataLoadedObserver is notified.
+ MessageLoop::current()->Run();
+
// Make sure the two profiles have different ids (and neither equal to 0,
// which is an invalid id).
const std::vector<AutoFillProfile*>& results3 = personal_data_->profiles();
@@ -1387,3 +1394,4 @@
ASSERT_EQ(1U, results2.size());
EXPECT_EQ(0, expected2.Compare(*results2[0]));
}
+

Powered by Google App Engine
This is Rietveld 408576698