Index: chrome/test/live_sync/two_client_live_autofill_sync_test.cc |
diff --git a/chrome/test/live_sync/two_client_live_autofill_sync_test.cc b/chrome/test/live_sync/two_client_live_autofill_sync_test.cc |
index 098affd175348a31bf78c4c5abdd7c0385fb0e27..42a9277be256747c3a604ce19fb4f2598ea6421b 100644 |
--- a/chrome/test/live_sync/two_client_live_autofill_sync_test.cc |
+++ b/chrome/test/live_sync/two_client_live_autofill_sync_test.cc |
@@ -5,9 +5,7 @@ |
#include "base/utf_string_conversions.h" |
#include "chrome/test/live_sync/live_autofill_sync_test.h" |
-// TODO(rsimha): Remove FAILS prefix after crbug.com/51956 is fixed. |
-IN_PROC_BROWSER_TEST_F(TwoClientLiveAutofillSyncTest, |
- FAILS_Client1HasData) { |
+IN_PROC_BROWSER_TEST_F(TwoClientLiveAutofillSyncTest, Client1HasData) { |
ASSERT_TRUE(SetupClients()) << "SetupClients() failed."; |
AutofillKeys keys; |
@@ -23,7 +21,16 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveAutofillSyncTest, |
AutofillKeys wd1_keys; |
GetAllAutofillKeys(GetWebDataService(1), &wd1_keys); |
- EXPECT_EQ(keys, wd1_keys); |
+ |
+ // Note: In this test, name0-value0 and name0-value1 were both added in the |
+ // same transaction on Client0. However, only the first entry with name0 is |
+ // added, due to changes made in r55781. See crbug.com/51727. |
+ AutofillKeys expected_keys; |
+ expected_keys.insert(AutofillKey("name0", "value0")); |
+ expected_keys.insert(AutofillKey("name1", "value2")); |
+ expected_keys.insert(AutofillKey(WideToUTF16(L"Sigur R\u00F3s"), |
+ WideToUTF16(L"\u00C1g\u00E6tis byrjun"))); |
+ EXPECT_EQ(expected_keys, wd1_keys); |
} |
IN_PROC_BROWSER_TEST_F(TwoClientLiveAutofillSyncTest, BothHaveData) { |
@@ -31,13 +38,11 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveAutofillSyncTest, BothHaveData) { |
AutofillKeys keys1; |
keys1.insert(AutofillKey("name0", "value0")); |
- keys1.insert(AutofillKey("name0", "value1")); |
keys1.insert(AutofillKey("name1", "value2")); |
AddFormFieldsToWebData(GetWebDataService(0), keys1); |
AutofillKeys keys2; |
keys2.insert(AutofillKey("name0", "value1")); |
- keys2.insert(AutofillKey("name1", "value2")); |
keys2.insert(AutofillKey("name2", "value3")); |
keys2.insert(AutofillKey("name3", "value3")); |
AddFormFieldsToWebData(GetWebDataService(1), keys2); |
@@ -45,6 +50,9 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveAutofillSyncTest, BothHaveData) { |
ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
EXPECT_TRUE(ProfileSyncServiceTestHarness::AwaitQuiescence(clients())); |
+ // Note: In this test, name0-value0 and name0-value1 were added in separate |
+ // transactions -- one on Client0 and the other on Client1. Therefore, we |
+ // expect to see both pairs once sync completes and the lists are merged. |
AutofillKeys expected_keys; |
expected_keys.insert(AutofillKey("name0", "value0")); |
expected_keys.insert(AutofillKey("name0", "value1")); |