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

Unified Diff: components/favicon/core/large_icon_service_unittest.cc

Issue 2053913002: Remove MessageLoop::current()->RunUntilIdle() 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/favicon/core/large_icon_service_unittest.cc
diff --git a/components/favicon/core/large_icon_service_unittest.cc b/components/favicon/core/large_icon_service_unittest.cc
index 41581139628caea686c4996d95680744f5e57702..4775eaff067f77f32af01acde286880015a7c7e8 100644
--- a/components/favicon/core/large_icon_service_unittest.cc
+++ b/components/favicon/core/large_icon_service_unittest.cc
@@ -11,6 +11,7 @@
#include "base/macros.h"
#include "base/memory/ref_counted_memory.h"
#include "base/message_loop/message_loop.h"
+#include "base/run_loop.h"
#include "base/task/cancelable_task_tracker.h"
#include "components/favicon/core/favicon_client.h"
#include "components/favicon/core/favicon_service.h"
@@ -164,7 +165,7 @@ TEST_F(LargeIconServiceTest, SameSize) {
24, // |desired_size_in_pixel|
base::Bind(&LargeIconServiceTest::ResultCallback, base::Unretained(this)),
&cancelable_task_tracker_);
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(is_callback_invoked_);
}
@@ -177,7 +178,7 @@ TEST_F(LargeIconServiceTest, ScaleDown) {
24,
base::Bind(&LargeIconServiceTest::ResultCallback, base::Unretained(this)),
&cancelable_task_tracker_);
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(is_callback_invoked_);
}
@@ -190,7 +191,7 @@ TEST_F(LargeIconServiceTest, ScaleUp) {
24,
base::Bind(&LargeIconServiceTest::ResultCallback, base::Unretained(this)),
&cancelable_task_tracker_);
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(is_callback_invoked_);
}
@@ -204,7 +205,7 @@ TEST_F(LargeIconServiceTest, NoScale) {
0,
base::Bind(&LargeIconServiceTest::ResultCallback, base::Unretained(this)),
&cancelable_task_tracker_);
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(is_callback_invoked_);
}
@@ -218,7 +219,7 @@ TEST_F(LargeIconServiceTest, FallbackSinceIconTooSmall) {
24,
base::Bind(&LargeIconServiceTest::ResultCallback, base::Unretained(this)),
&cancelable_task_tracker_);
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(is_callback_invoked_);
}
@@ -232,7 +233,7 @@ TEST_F(LargeIconServiceTest, FallbackSinceIconNotSquare) {
24,
base::Bind(&LargeIconServiceTest::ResultCallback, base::Unretained(this)),
&cancelable_task_tracker_);
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(is_callback_invoked_);
}
@@ -246,7 +247,7 @@ TEST_F(LargeIconServiceTest, FallbackSinceIconMissing) {
24,
base::Bind(&LargeIconServiceTest::ResultCallback, base::Unretained(this)),
&cancelable_task_tracker_);
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(is_callback_invoked_);
}
@@ -260,7 +261,7 @@ TEST_F(LargeIconServiceTest, FallbackSinceIconMissingNoScale) {
0,
base::Bind(&LargeIconServiceTest::ResultCallback, base::Unretained(this)),
&cancelable_task_tracker_);
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(is_callback_invoked_);
}
@@ -276,7 +277,7 @@ TEST_F(LargeIconServiceTest, FallbackSinceTooPicky) {
24,
base::Bind(&LargeIconServiceTest::ResultCallback, base::Unretained(this)),
&cancelable_task_tracker_);
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(is_callback_invoked_);
}
« no previous file with comments | « components/dom_distiller/core/distiller_unittest.cc ('k') | components/google/core/browser/google_url_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698