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

Unified Diff: chrome/browser/chromeos/drive/file_system/open_file_operation_unittest.cc

Issue 380993002: Upstream RunBlockingPoolTask(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed. Created 6 years, 5 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: chrome/browser/chromeos/drive/file_system/open_file_operation_unittest.cc
diff --git a/chrome/browser/chromeos/drive/file_system/open_file_operation_unittest.cc b/chrome/browser/chromeos/drive/file_system/open_file_operation_unittest.cc
index 9cf6d10428337b96d87a15c445ab274759adb5c3..b930b2df2e8630b2790ba926e0103444976e73eb 100644
--- a/chrome/browser/chromeos/drive/file_system/open_file_operation_unittest.cc
+++ b/chrome/browser/chromeos/drive/file_system/open_file_operation_unittest.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/chromeos/drive/file_change.h"
#include "chrome/browser/chromeos/drive/file_errors.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"
@@ -50,7 +51,7 @@ TEST_F(OpenFileOperationTest, OpenExistingFile) {
std::string(), // mime_type
google_apis::test_util::CreateCopyResultCallback(
&error, &file_path, &close_callback));
- test_util::RunBlockingPoolTask();
+ content::RunAllBlockingPoolTasksUntilIdle();
EXPECT_EQ(FILE_ERROR_OK, error);
ASSERT_TRUE(base::PathExists(file_path));
@@ -76,7 +77,7 @@ TEST_F(OpenFileOperationTest, OpenNonExistingFile) {
std::string(), // mime_type
google_apis::test_util::CreateCopyResultCallback(
&error, &file_path, &close_callback));
- test_util::RunBlockingPoolTask();
+ content::RunAllBlockingPoolTasksUntilIdle();
EXPECT_EQ(FILE_ERROR_NOT_FOUND, error);
EXPECT_TRUE(close_callback.is_null());
}
@@ -96,7 +97,7 @@ TEST_F(OpenFileOperationTest, CreateExistingFile) {
std::string(), // mime_type
google_apis::test_util::CreateCopyResultCallback(
&error, &file_path, &close_callback));
- test_util::RunBlockingPoolTask();
+ content::RunAllBlockingPoolTasksUntilIdle();
EXPECT_EQ(FILE_ERROR_EXISTS, error);
EXPECT_TRUE(close_callback.is_null());
@@ -115,7 +116,7 @@ TEST_F(OpenFileOperationTest, CreateNonExistingFile) {
std::string(), // mime_type
google_apis::test_util::CreateCopyResultCallback(
&error, &file_path, &close_callback));
- test_util::RunBlockingPoolTask();
+ content::RunAllBlockingPoolTasksUntilIdle();
EXPECT_EQ(1U, observer()->get_changed_files().size());
EXPECT_TRUE(observer()->get_changed_files().count(file_in_root));
@@ -148,7 +149,7 @@ TEST_F(OpenFileOperationTest, OpenOrCreateExistingFile) {
std::string(), // mime_type
google_apis::test_util::CreateCopyResultCallback(
&error, &file_path, &close_callback));
- test_util::RunBlockingPoolTask();
+ content::RunAllBlockingPoolTasksUntilIdle();
// Notified because 'available offline' status of the existing file changes.
EXPECT_EQ(1U, observer()->get_changed_files().size());
@@ -183,7 +184,7 @@ TEST_F(OpenFileOperationTest, OpenOrCreateNonExistingFile) {
std::string(), // mime_type
google_apis::test_util::CreateCopyResultCallback(
&error, &file_path, &close_callback));
- test_util::RunBlockingPoolTask();
+ content::RunAllBlockingPoolTasksUntilIdle();
EXPECT_EQ(FILE_ERROR_OK, error);
ASSERT_TRUE(base::PathExists(file_path));
@@ -213,7 +214,7 @@ TEST_F(OpenFileOperationTest, OpenFileTwice) {
std::string(), // mime_type
google_apis::test_util::CreateCopyResultCallback(
&error, &file_path, &close_callback));
- test_util::RunBlockingPoolTask();
+ content::RunAllBlockingPoolTasksUntilIdle();
EXPECT_EQ(FILE_ERROR_OK, error);
ASSERT_TRUE(base::PathExists(file_path));
@@ -230,7 +231,7 @@ TEST_F(OpenFileOperationTest, OpenFileTwice) {
std::string(), // mime_type
google_apis::test_util::CreateCopyResultCallback(
&error, &file_path, &close_callback2));
- test_util::RunBlockingPoolTask();
+ content::RunAllBlockingPoolTasksUntilIdle();
EXPECT_EQ(FILE_ERROR_OK, error);
ASSERT_TRUE(base::PathExists(file_path));

Powered by Google App Engine
This is Rietveld 408576698