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

Unified Diff: chrome/browser/sync/profile_sync_service_autofill_unittest.cc

Issue 1511333003: [Sync] Enable ProfileSyncServiceAutofillTest.ServerChangeRace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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: chrome/browser/sync/profile_sync_service_autofill_unittest.cc
diff --git a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
index 256d7264724ac637e91645ab0cef3587979ae4b2..c24d4a42f6da17ee1ad4180db93c79ceb1e467ba 100644
--- a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
@@ -16,7 +16,7 @@
#include "base/location.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
-#include "base/message_loop/message_loop.h"
+#include "base/run_loop.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
#include "base/synchronization/waitable_event.h"
@@ -529,7 +529,9 @@ class ProfileSyncServiceAutofillTest
sync_service_->RegisterDataTypeController(CreateDataTypeController(type));
sync_service_->Initialize();
- base::MessageLoop::current()->Run();
+
+ base::RunLoop run_loop;
+ run_loop.Run();
// It's possible this test triggered an unrecoverable error, in which case
// we can't get the sync count.
@@ -1269,8 +1271,7 @@ TEST_F(ProfileSyncServiceAutofillTest, ProcessUserChangeRemoveProfile) {
ASSERT_EQ(0U, new_sync_profiles.size());
}
-// http://crbug.com/57884
-TEST_F(ProfileSyncServiceAutofillTest, DISABLED_ServerChangeRace) {
+TEST_F(ProfileSyncServiceAutofillTest, ServerChangeRace) {
// Once for MergeDataAndStartSyncing() and twice for ProcessSyncChanges(), via
// LoadAutofillData().
EXPECT_CALL(autofill_table_, GetAllAutofillEntries(_)).
@@ -1307,6 +1308,10 @@ TEST_F(ProfileSyncServiceAutofillTest, DISABLED_ServerChangeRace) {
// to clean up.
updater->CreateNewEntryAndWait(MakeAutofillEntry("server2", "entry2", 3));
+ // Let callbacks posted on UI thread execute.
+ base::RunLoop run_loop;
+ run_loop.RunUntilIdle();
+
std::vector<AutofillEntry> sync_entries;
std::vector<AutofillProfile> sync_profiles;
ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles));
« 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