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

Unified Diff: ash/desktop_background/desktop_background_controller_unittest.cc

Issue 409743003: Use content::RunBlockingPoolTask() in tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed. Created 6 years, 3 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: ash/desktop_background/desktop_background_controller_unittest.cc
diff --git a/ash/desktop_background/desktop_background_controller_unittest.cc b/ash/desktop_background/desktop_background_controller_unittest.cc
index 8751a18c4db1ff788b0e9fc0bb4daabb6ca68dd2..01a71594ee0e7b878bc3398fca5897a12adbaa82 100644
--- a/ash/desktop_background/desktop_background_controller_unittest.cc
+++ b/ash/desktop_background/desktop_background_controller_unittest.cc
@@ -291,8 +291,7 @@ TEST_F(DesktopBackgroundControllerTest, ResizeCustomWallpaper) {
// that the resized image is the expected size.
controller_->SetWallpaperImage(image, WALLPAPER_LAYOUT_STRETCH);
EXPECT_TRUE(image.BackedBySameObjectAs(controller_->GetWallpaper()));
- content::BrowserThread::GetBlockingPool()->FlushForTesting();
- content::RunAllPendingInMessageLoop();
+ content::RunAllBlockingPoolTasksUntilIdle();
gfx::ImageSkia resized_image = controller_->GetWallpaper();
EXPECT_FALSE(image.BackedBySameObjectAs(resized_image));
EXPECT_EQ(gfx::Size(320, 200).ToString(), resized_image.size().ToString());
@@ -301,8 +300,7 @@ TEST_F(DesktopBackgroundControllerTest, ResizeCustomWallpaper) {
// previously-resized image instead of doing another resize
// (http://crbug.com/321402).
controller_->SetWallpaperImage(image, WALLPAPER_LAYOUT_STRETCH);
- content::BrowserThread::GetBlockingPool()->FlushForTesting();
- content::RunAllPendingInMessageLoop();
+ content::RunAllBlockingPoolTasksUntilIdle();
EXPECT_TRUE(resized_image.BackedBySameObjectAs(controller_->GetWallpaper()));
}

Powered by Google App Engine
This is Rietveld 408576698