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())); |
} |