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

Unified Diff: sync/engine/sync_scheduler_unittest.cc

Issue 915373002: Migrate sync/ to base::RunLoop::RunUntilIdle() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build error Created 5 years, 10 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 | sync/internal_api/attachments/attachment_service_proxy_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/sync_scheduler_unittest.cc
diff --git a/sync/engine/sync_scheduler_unittest.cc b/sync/engine/sync_scheduler_unittest.cc
index 21d7f28513c756b2d8fca02ef124fa8cc867d89d..7d9036f9baebb8fc386d730da4b1014e38661d24 100644
--- a/sync/engine/sync_scheduler_unittest.cc
+++ b/sync/engine/sync_scheduler_unittest.cc
@@ -6,7 +6,7 @@
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/memory/weak_ptr.h"
-#include "base/message_loop/message_loop.h"
+#include "base/run_loop.h"
#include "base/test/test_timeouts.h"
#include "sync/engine/backoff_delay_provider.h"
#include "sync/engine/sync_scheduler_impl.h"
@@ -1164,12 +1164,12 @@ TEST_F(SyncSchedulerTest, StartWhenNotConnected) {
scheduler()->ScheduleLocalNudge(ModelTypeSet(THEMES), FROM_HERE);
// Should save the nudge for until after the server is reachable.
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
scheduler()->OnConnectionStatusChange();
connection()->SetServerReachable();
connection()->UpdateConnectionStatus();
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
TEST_F(SyncSchedulerTest, ServerConnectionChangeDuringBackoff) {
@@ -1196,7 +1196,7 @@ TEST_F(SyncSchedulerTest, ServerConnectionChangeDuringBackoff) {
scheduler()->OnConnectionStatusChange();
connection()->SetServerReachable();
connection()->UpdateConnectionStatus();
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
// This was supposed to test the scenario where we receive a nudge while a
@@ -1231,7 +1231,7 @@ TEST_F(SyncSchedulerTest, ConnectionChangeCanaryPreemptedByNudge) {
connection()->SetServerReachable();
connection()->UpdateConnectionStatus();
scheduler()->ScheduleLocalNudge(ModelTypeSet(THEMES), FROM_HERE);
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
// Tests that we don't crash trying to run two canaries at once if we receive
« no previous file with comments | « no previous file | sync/internal_api/attachments/attachment_service_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698