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

Unified Diff: components/invalidation/impl/sync_system_resources_unittest.cc

Issue 2082333002: Remove calls to deprecated MessageLoop methods in components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
Index: components/invalidation/impl/sync_system_resources_unittest.cc
diff --git a/components/invalidation/impl/sync_system_resources_unittest.cc b/components/invalidation/impl/sync_system_resources_unittest.cc
index f6f240a2ed2bc80eb883bbc6a8923aca683a46fc..76446c6c4b71d2aace804aef3cef41c73c5da2d3 100644
--- a/components/invalidation/impl/sync_system_resources_unittest.cc
+++ b/components/invalidation/impl/sync_system_resources_unittest.cc
@@ -12,6 +12,7 @@
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
+#include "base/run_loop.h"
#include "components/invalidation/impl/push_client_channel.h"
#include "components/invalidation/impl/state_writer.h"
#include "google/cacheinvalidation/include/types.h"
@@ -135,7 +136,7 @@ TEST_F(SyncSystemResourcesTest, ScheduleImmediately) {
EXPECT_CALL(mock_closure, Run());
sync_system_resources_.internal_scheduler()->Schedule(
invalidation::Scheduler::NoDelay(), mock_closure.CreateClosure());
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
TEST_F(SyncSystemResourcesTest, ScheduleOnListenerThread) {
@@ -146,7 +147,7 @@ TEST_F(SyncSystemResourcesTest, ScheduleOnListenerThread) {
invalidation::Scheduler::NoDelay(), mock_closure.CreateClosure());
EXPECT_TRUE(
sync_system_resources_.internal_scheduler()->IsRunningOnThread());
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
TEST_F(SyncSystemResourcesTest, ScheduleWithZeroDelay) {
@@ -155,7 +156,7 @@ TEST_F(SyncSystemResourcesTest, ScheduleWithZeroDelay) {
EXPECT_CALL(mock_closure, Run());
sync_system_resources_.internal_scheduler()->Schedule(
invalidation::TimeDelta::FromSeconds(0), mock_closure.CreateClosure());
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
// TODO(akalin): Figure out how to test with a non-zero delay.
@@ -171,7 +172,7 @@ TEST_F(SyncSystemResourcesTest, WriteState) {
.WillOnce(SaveArg<0>(&results));
sync_system_resources_.storage()->WriteKey(
std::string(), "state", mock_storage_callback.CreateCallback());
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_EQ(invalidation::Status(invalidation::Status::SUCCESS, std::string()),
results);
}

Powered by Google App Engine
This is Rietveld 408576698