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

Unified Diff: chrome/test/live_sync/two_client_live_autofill_sync_test.cc

Issue 3169019: Fix failing sync integration tests. (Closed)
Patch Set: Created 10 years, 4 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 | chrome/test/live_sync/two_client_live_preferences_sync_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"));
« no previous file with comments | « no previous file | chrome/test/live_sync/two_client_live_preferences_sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698