| Index: chrome/browser/chromeos/drive/download_handler_unittest.cc
|
| diff --git a/chrome/browser/chromeos/drive/download_handler_unittest.cc b/chrome/browser/chromeos/drive/download_handler_unittest.cc
|
| index 012daa369ae61673ca51869def1c6319430737d8..222729c0bad24d84b206550ff4e04290a400d994 100644
|
| --- a/chrome/browser/chromeos/drive/download_handler_unittest.cc
|
| +++ b/chrome/browser/chromeos/drive/download_handler_unittest.cc
|
| @@ -7,11 +7,12 @@
|
| #include "base/files/scoped_temp_dir.h"
|
| #include "chrome/browser/chromeos/drive/dummy_file_system.h"
|
| #include "chrome/browser/chromeos/drive/file_system_util.h"
|
| -#include "chrome/browser/chromeos/drive/test_util.h"
|
| #include "chrome/test/base/testing_profile.h"
|
| #include "content/public/test/mock_download_item.h"
|
| #include "content/public/test/mock_download_manager.h"
|
| #include "content/public/test/test_browser_thread_bundle.h"
|
| +#include "content/public/test/test_utils.h"
|
| +#include "google_apis/drive/test_util.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| namespace drive {
|
| @@ -84,7 +85,7 @@ TEST_F(DownloadHandlerTest, SubstituteDriveDownloadPathNonDrivePath) {
|
| non_drive_path,
|
| &download_item_,
|
| google_apis::test_util::CreateCopyResultCallback(&substituted_path));
|
| - test_util::RunBlockingPoolTask();
|
| + content::RunAllBlockingPoolTasksUntilIdle();
|
|
|
| // Check the result.
|
| EXPECT_EQ(non_drive_path, substituted_path);
|
| @@ -104,7 +105,7 @@ TEST_F(DownloadHandlerTest, SubstituteDriveDownloadPath) {
|
| drive_path,
|
| &download_item_,
|
| google_apis::test_util::CreateCopyResultCallback(&substituted_path));
|
| - test_util::RunBlockingPoolTask();
|
| + content::RunAllBlockingPoolTasksUntilIdle();
|
|
|
| // Check the result.
|
| EXPECT_TRUE(temp_dir_.path().IsParent(substituted_path));
|
| @@ -126,7 +127,7 @@ TEST_F(DownloadHandlerTest, SubstituteDriveDownloadPathGetEntryFailure) {
|
| drive_path,
|
| &download_item_,
|
| google_apis::test_util::CreateCopyResultCallback(&substituted_path));
|
| - test_util::RunBlockingPoolTask();
|
| + content::RunAllBlockingPoolTasksUntilIdle();
|
|
|
| // Check the result.
|
| EXPECT_TRUE(substituted_path.empty());
|
| @@ -145,7 +146,7 @@ TEST_F(DownloadHandlerTest, SubstituteDriveDownloadPathForSavePackage) {
|
| drive_path,
|
| NULL, // DownloadItem is not available at this moment.
|
| google_apis::test_util::CreateCopyResultCallback(&substituted_path));
|
| - test_util::RunBlockingPoolTask();
|
| + content::RunAllBlockingPoolTasksUntilIdle();
|
|
|
| // Check the result of SubstituteDriveDownloadPath().
|
| EXPECT_TRUE(temp_dir_.path().IsParent(substituted_path));
|
| @@ -178,7 +179,7 @@ TEST_F(DownloadHandlerTest, CheckForFileExistence) {
|
| download_handler_->CheckForFileExistence(
|
| &download_item_,
|
| google_apis::test_util::CreateCopyResultCallback(&file_exists));
|
| - test_util::RunBlockingPoolTask();
|
| + content::RunAllBlockingPoolTasksUntilIdle();
|
|
|
| // Check the result.
|
| EXPECT_TRUE(file_exists);
|
| @@ -190,7 +191,7 @@ TEST_F(DownloadHandlerTest, CheckForFileExistence) {
|
| download_handler_->CheckForFileExistence(
|
| &download_item_,
|
| google_apis::test_util::CreateCopyResultCallback(&file_exists));
|
| - test_util::RunBlockingPoolTask();
|
| + content::RunAllBlockingPoolTasksUntilIdle();
|
|
|
| // Check the result.
|
| EXPECT_FALSE(file_exists);
|
|
|