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

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

Issue 652193005: Fix more flaky autofill tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« 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 fc1ce2d8017cf5f0b3b24b40a2ef3df084d4af7e..e7a7e47c74dbcd1fde813422c88ad4023049fb0e 100644
--- a/components/autofill/core/browser/webdata/web_data_service_unittest.cc
+++ b/components/autofill/core/browser/webdata/web_data_service_unittest.cc
@@ -347,19 +347,12 @@ TEST_F(WebDataServiceAutofillTest, ProfileRemove) {
ASSERT_EQ(0U, consumer2.result().size());
}
-// This is flakey on iOS
-// http://crbug.com/420023
-#if defined(OS_IOS)
-#define MAYBE_ProfileUpdate DISABLED_ProfileUpdate
-#else
-#define MAYBE_ProfileUpdate ProfileUpdate
-#endif
-TEST_F(WebDataServiceAutofillTest, MAYBE_ProfileUpdate) {
+TEST_F(WebDataServiceAutofillTest, ProfileUpdate) {
// The GUIDs are alphabetical for easier testing.
- AutofillProfile profile1("087151C8-6AB1-487C-9095-28E80BE5DA15",
+ AutofillProfile profile1("6141084B-72D7-4B73-90CF-3D6AC154673B",
"http://example.com");
profile1.SetRawInfo(NAME_FIRST, ASCIIToUTF16("Abe"));
- AutofillProfile profile2("6141084B-72D7-4B73-90CF-3D6AC154673B",
+ AutofillProfile profile2("087151C8-6AB1-487C-9095-28E80BE5DA15",
"http://example.com");
profile2.SetRawInfo(NAME_FIRST, ASCIIToUTF16("Alice"));
@@ -377,8 +370,8 @@ TEST_F(WebDataServiceAutofillTest, MAYBE_ProfileUpdate) {
base::MessageLoop::current()->Run();
EXPECT_EQ(handle, consumer.handle());
ASSERT_EQ(2U, consumer.result().size());
- EXPECT_EQ(profile1, *consumer.result()[0]);
- EXPECT_EQ(profile2, *consumer.result()[1]);
+ EXPECT_EQ(profile2, *consumer.result()[0]);
+ EXPECT_EQ(profile1, *consumer.result()[1]);
STLDeleteElements(&consumer.result());
AutofillProfile profile2_changed(profile2);
@@ -399,9 +392,9 @@ TEST_F(WebDataServiceAutofillTest, MAYBE_ProfileUpdate) {
base::MessageLoop::current()->Run();
EXPECT_EQ(handle2, consumer2.handle());
ASSERT_EQ(2U, consumer2.result().size());
- EXPECT_EQ(profile1, *consumer2.result()[0]);
- EXPECT_EQ(profile2_changed, *consumer2.result()[1]);
- EXPECT_NE(profile2, *consumer2.result()[1]);
+ EXPECT_EQ(profile2_changed, *consumer2.result()[0]);
+ EXPECT_NE(profile2, *consumer2.result()[0]);
+ EXPECT_EQ(profile1, *consumer2.result()[1]);
STLDeleteElements(&consumer2.result());
}
@@ -449,10 +442,10 @@ TEST_F(WebDataServiceAutofillTest, CreditCardRemove) {
}
TEST_F(WebDataServiceAutofillTest, CreditUpdate) {
- CreditCard card1("B9C52112-BD5F-4080-84E1-C651D2CB90E2",
+ CreditCard card1("E4D2662E-5E16-44F3-AF5A-5A77FAE4A6F3",
"https://ejemplo.mx");
card1.SetRawInfo(CREDIT_CARD_NAME, ASCIIToUTF16("Abe"));
- CreditCard card2("E4D2662E-5E16-44F3-AF5A-5A77FAE4A6F3",
+ CreditCard card2("B9C52112-BD5F-4080-84E1-C651D2CB90E2",
"https://example.com");
card2.SetRawInfo(CREDIT_CARD_NAME, ASCIIToUTF16("Alice"));
@@ -466,14 +459,14 @@ TEST_F(WebDataServiceAutofillTest, CreditUpdate) {
base::MessageLoop::current()->Run();
EXPECT_EQ(handle, consumer.handle());
ASSERT_EQ(2U, consumer.result().size());
- EXPECT_EQ(card1, *consumer.result()[0]);
- EXPECT_EQ(card2, *consumer.result()[1]);
+ EXPECT_EQ(card2, *consumer.result()[0]);
+ EXPECT_EQ(card1, *consumer.result()[1]);
STLDeleteElements(&consumer.result());
- CreditCard card1_changed(card1);
- card1_changed.SetRawInfo(CREDIT_CARD_NAME, ASCIIToUTF16("Bill"));
+ CreditCard card2_changed(card2);
+ card2_changed.SetRawInfo(CREDIT_CARD_NAME, ASCIIToUTF16("Bill"));
- wds_->UpdateCreditCard(card1_changed);
+ wds_->UpdateCreditCard(card2_changed);
WaitForDatabaseThread();
// Check that the updates were made.
@@ -482,9 +475,9 @@ TEST_F(WebDataServiceAutofillTest, CreditUpdate) {
base::MessageLoop::current()->Run();
EXPECT_EQ(handle2, consumer2.handle());
ASSERT_EQ(2U, consumer2.result().size());
- EXPECT_NE(card1, *consumer2.result()[0]);
- EXPECT_EQ(card1_changed, *consumer2.result()[0]);
- EXPECT_EQ(card2, *consumer2.result()[1]);
+ EXPECT_NE(card2, *consumer2.result()[0]);
+ EXPECT_EQ(card2_changed, *consumer2.result()[0]);
+ EXPECT_EQ(card1, *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