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

Unified Diff: components/autofill/core/browser/webdata/web_data_service_unittest.cc

Issue 582783003: fix flaky autofill test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/webdata/web_data_service_unittest.cc
diff --git a/components/autofill/core/browser/webdata/web_data_service_unittest.cc b/components/autofill/core/browser/webdata/web_data_service_unittest.cc
index ddd19f104e55ef02d2f1c9378b01db8e8e015883..803e25dc8615e483eca05d20050cebd5433c77f9 100644
--- a/components/autofill/core/browser/webdata/web_data_service_unittest.cc
+++ b/components/autofill/core/browser/webdata/web_data_service_unittest.cc
@@ -374,16 +374,16 @@ TEST_F(WebDataServiceAutofillTest, ProfileUpdate) {
EXPECT_EQ(profile2, *consumer.result()[1]);
STLDeleteElements(&consumer.result());
Evan Stade 2014/09/18 17:51:34 I was able to reproduce the flake consistently by
- AutofillProfile profile1_changed(profile1);
- profile1_changed.SetRawInfo(NAME_FIRST, ASCIIToUTF16("Bill"));
+ AutofillProfile profile2_changed(profile2);
+ profile2_changed.SetRawInfo(NAME_FIRST, ASCIIToUTF16("Bill"));
const AutofillProfileChange expected_change(
- AutofillProfileChange::UPDATE, profile1.guid(), &profile1_changed);
+ AutofillProfileChange::UPDATE, profile2.guid(), &profile2_changed);
EXPECT_CALL(observer_, AutofillProfileChanged(expected_change))
.WillOnce(SignalEvent(&done_event_));
// Update the profile.
- wds_->UpdateAutofillProfile(profile1_changed);
+ wds_->UpdateAutofillProfile(profile2_changed);
done_event_.TimedWait(test_timeout_);
// Check that the updates were made.
@@ -392,9 +392,9 @@ TEST_F(WebDataServiceAutofillTest, ProfileUpdate) {
base::MessageLoop::current()->Run();
EXPECT_EQ(handle2, consumer2.handle());
ASSERT_EQ(2U, consumer2.result().size());
- EXPECT_NE(profile1, *consumer2.result()[0]);
- EXPECT_EQ(profile1_changed, *consumer2.result()[0]);
- EXPECT_EQ(profile2, *consumer2.result()[1]);
+ EXPECT_EQ(profile1, *consumer2.result()[0]);
+ EXPECT_EQ(profile2_changed, *consumer2.result()[1]);
+ EXPECT_NE(profile2, *consumer2.result()[1]);
STLDeleteElements(&consumer2.result());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698