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

Unified Diff: components/precache/core/fetcher_pool_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/precache/core/fetcher_pool_unittest.cc
diff --git a/components/precache/core/fetcher_pool_unittest.cc b/components/precache/core/fetcher_pool_unittest.cc
index a15388ed91ff010722be90a451c5aa01879b3bd0..09296a17d7a73a64b40f83dc1f4e78ce1fb9542e 100644
--- a/components/precache/core/fetcher_pool_unittest.cc
+++ b/components/precache/core/fetcher_pool_unittest.cc
@@ -13,6 +13,7 @@
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
+#include "base/run_loop.h"
#include "net/http/http_status_code.h"
#include "net/url_request/test_url_fetcher_factory.h"
#include "net/url_request/url_fetcher_delegate.h"
@@ -62,7 +63,7 @@ TEST(FetcherPoolTest, AddDelete) {
EXPECT_FALSE(pool.IsEmpty());
EXPECT_CALL(delegate, OnURLFetchComplete(url_fetcher_ptr));
- loop.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
pool.Delete(*url_fetcher_ptr);
EXPECT_TRUE(pool.IsEmpty());
@@ -86,7 +87,7 @@ TEST(FetcherPoolTest, Delete) {
EXPECT_TRUE(pool.IsEmpty());
EXPECT_CALL(delegate, OnURLFetchComplete(_)).Times(0);
- loop.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
TEST(FetcherPoolTest, ParallelURLFetchers) {
@@ -116,7 +117,7 @@ TEST(FetcherPoolTest, ParallelURLFetchers) {
pool.Delete(*fetcher);
}));
- loop.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(pool.IsEmpty());
EXPECT_TRUE(pool.IsAvailable());
@@ -139,7 +140,7 @@ TEST(FetcherPoolTest, DeleteAll) {
pool.DeleteAll();
- loop.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(pool.IsEmpty());
EXPECT_TRUE(pool.IsAvailable());
@@ -208,7 +209,7 @@ TEST(FetcherPoolTest, ExampleUsage) {
EXPECT_FALSE(pool.IsEmpty());
EXPECT_FALSE(pool.IsAvailable());
- loop.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(pool.IsEmpty());
EXPECT_TRUE(pool.IsAvailable());

Powered by Google App Engine
This is Rietveld 408576698