Index: chrome/browser/chromeos/drive/file_system/create_file_operation_unittest.cc |
diff --git a/chrome/browser/chromeos/drive/file_system/create_file_operation_unittest.cc b/chrome/browser/chromeos/drive/file_system/create_file_operation_unittest.cc |
index 4a55793b1ff87a549827bcb6268a30c8dbc49d9d..cff1f12afccb1227798866b51500e8ff2bc5adc6 100644 |
--- a/chrome/browser/chromeos/drive/file_system/create_file_operation_unittest.cc |
+++ b/chrome/browser/chromeos/drive/file_system/create_file_operation_unittest.cc |
@@ -6,6 +6,7 @@ |
#include "chrome/browser/chromeos/drive/file_change.h" |
#include "chrome/browser/chromeos/drive/file_system/operation_test_base.h" |
+#include "content/public/test/test_utils.h" |
#include "google_apis/drive/test_util.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -26,7 +27,7 @@ TEST_F(CreateFileOperationTest, CreateFile) { |
true, // is_exclusive |
std::string(), // no predetermined mime type |
google_apis::test_util::CreateCopyResultCallback(&error)); |
- test_util::RunBlockingPoolTask(); |
+ content::RunAllBlockingPoolTasksUntilIdle(); |
EXPECT_EQ(FILE_ERROR_OK, error); |
ResourceEntry entry; |
@@ -64,7 +65,7 @@ TEST_F(CreateFileOperationTest, CreateFileIsExclusive) { |
true, // is_exclusive |
std::string(), // no predetermined mime type |
google_apis::test_util::CreateCopyResultCallback(&error)); |
- test_util::RunBlockingPoolTask(); |
+ content::RunAllBlockingPoolTasksUntilIdle(); |
EXPECT_EQ(FILE_ERROR_EXISTS, error); |
// Create succeeds if is_exclusive = false and a file exists. |
@@ -73,7 +74,7 @@ TEST_F(CreateFileOperationTest, CreateFileIsExclusive) { |
false, // is_exclusive |
std::string(), // no predetermined mime type |
google_apis::test_util::CreateCopyResultCallback(&error)); |
- test_util::RunBlockingPoolTask(); |
+ content::RunAllBlockingPoolTasksUntilIdle(); |
EXPECT_EQ(FILE_ERROR_OK, error); |
// Create fails if a directory existed even when is_exclusive = false. |
@@ -82,7 +83,7 @@ TEST_F(CreateFileOperationTest, CreateFileIsExclusive) { |
false, // is_exclusive |
std::string(), // no predetermined mime type |
google_apis::test_util::CreateCopyResultCallback(&error)); |
- test_util::RunBlockingPoolTask(); |
+ content::RunAllBlockingPoolTasksUntilIdle(); |
EXPECT_EQ(FILE_ERROR_EXISTS, error); |
// Create succeeds if no entry exists. |
@@ -91,7 +92,7 @@ TEST_F(CreateFileOperationTest, CreateFileIsExclusive) { |
true, // is_exclusive |
std::string(), // no predetermined mime type |
google_apis::test_util::CreateCopyResultCallback(&error)); |
- test_util::RunBlockingPoolTask(); |
+ content::RunAllBlockingPoolTasksUntilIdle(); |
EXPECT_EQ(FILE_ERROR_OK, error); |
// Create fails if the parent directory does not exist. |
@@ -100,7 +101,7 @@ TEST_F(CreateFileOperationTest, CreateFileIsExclusive) { |
false, // is_exclusive |
std::string(), // no predetermined mime type |
google_apis::test_util::CreateCopyResultCallback(&error)); |
- test_util::RunBlockingPoolTask(); |
+ content::RunAllBlockingPoolTasksUntilIdle(); |
EXPECT_EQ(FILE_ERROR_NOT_A_DIRECTORY, error); |
} |
@@ -120,7 +121,7 @@ TEST_F(CreateFileOperationTest, CreateFileMimeType) { |
false, // is_exclusive |
std::string(), // no predetermined mime type |
google_apis::test_util::CreateCopyResultCallback(&error)); |
- test_util::RunBlockingPoolTask(); |
+ content::RunAllBlockingPoolTasksUntilIdle(); |
EXPECT_EQ(FILE_ERROR_OK, error); |
// If no mime type is specified, it is guessed from the file name. |
@@ -134,7 +135,7 @@ TEST_F(CreateFileOperationTest, CreateFileMimeType) { |
false, // is_exclusive |
kSpecialMimeType, |
google_apis::test_util::CreateCopyResultCallback(&error)); |
- test_util::RunBlockingPoolTask(); |
+ content::RunAllBlockingPoolTasksUntilIdle(); |
EXPECT_EQ(FILE_ERROR_OK, error); |
// If the mime type is explicitly set, respect it. |
@@ -147,7 +148,7 @@ TEST_F(CreateFileOperationTest, CreateFileMimeType) { |
false, // is_exclusive |
std::string(), // no predetermined mime type |
google_apis::test_util::CreateCopyResultCallback(&error)); |
- test_util::RunBlockingPoolTask(); |
+ content::RunAllBlockingPoolTasksUntilIdle(); |
EXPECT_EQ(FILE_ERROR_OK, error); |
// If the mime type is not set and unknown, default to octet-stream. |