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

Unified Diff: chrome/browser/chromeos/drive/file_system/truncate_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/truncate_operation_unittest.cc
diff --git a/chrome/browser/chromeos/drive/file_system/truncate_operation_unittest.cc b/chrome/browser/chromeos/drive/file_system/truncate_operation_unittest.cc
index ce9312a880998f810333ad215193c3a05d72bbcd..f17eda181c32d1ae6db407ed80ef2690429f655f 100644
--- a/chrome/browser/chromeos/drive/file_system/truncate_operation_unittest.cc
+++ b/chrome/browser/chromeos/drive/file_system/truncate_operation_unittest.cc
@@ -10,7 +10,7 @@
#include "chrome/browser/chromeos/drive/drive.pb.h"
#include "chrome/browser/chromeos/drive/fake_free_disk_space_getter.h"
#include "chrome/browser/chromeos/drive/file_system/operation_test_base.h"
-#include "google_apis/drive/test_util.h"
+#include "content/public/test/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace drive {
@@ -43,7 +43,7 @@ TEST_F(TruncateOperationTest, Truncate) {
file_in_root,
1, // Truncate to 1 byte.
google_apis::test_util::CreateCopyResultCallback(&error));
- test_util::RunBlockingPoolTask();
+ content::RunAllBlockingPoolTasksUntilIdle();
EXPECT_EQ(FILE_ERROR_OK, error);
base::FilePath local_path;
@@ -55,7 +55,7 @@ TEST_F(TruncateOperationTest, Truncate) {
base::Unretained(cache()),
GetLocalId(file_in_root), &local_path),
google_apis::test_util::CreateCopyResultCallback(&error));
- test_util::RunBlockingPoolTask();
+ content::RunAllBlockingPoolTasksUntilIdle();
ASSERT_EQ(FILE_ERROR_OK, error);
// The local file should be truncated.
@@ -78,7 +78,7 @@ TEST_F(TruncateOperationTest, NegativeSize) {
file_in_root,
-1, // Truncate to "-1" byte.
google_apis::test_util::CreateCopyResultCallback(&error));
- test_util::RunBlockingPoolTask();
+ content::RunAllBlockingPoolTasksUntilIdle();
EXPECT_EQ(FILE_ERROR_INVALID_OPERATION, error);
}
@@ -91,7 +91,7 @@ TEST_F(TruncateOperationTest, HostedDocument) {
file_in_root,
1, // Truncate to 1 byte.
google_apis::test_util::CreateCopyResultCallback(&error));
- test_util::RunBlockingPoolTask();
+ content::RunAllBlockingPoolTasksUntilIdle();
EXPECT_EQ(FILE_ERROR_INVALID_OPERATION, error);
}
@@ -106,7 +106,7 @@ TEST_F(TruncateOperationTest, Extend) {
file_in_root,
file_size + 10, // Extend to 10 bytes.
google_apis::test_util::CreateCopyResultCallback(&error));
- test_util::RunBlockingPoolTask();
+ content::RunAllBlockingPoolTasksUntilIdle();
EXPECT_EQ(FILE_ERROR_OK, error);
base::FilePath local_path;
@@ -118,7 +118,7 @@ TEST_F(TruncateOperationTest, Extend) {
base::Unretained(cache()),
GetLocalId(file_in_root), &local_path),
google_apis::test_util::CreateCopyResultCallback(&error));
- test_util::RunBlockingPoolTask();
+ content::RunAllBlockingPoolTasksUntilIdle();
ASSERT_EQ(FILE_ERROR_OK, error);
// The local file should be truncated.

Powered by Google App Engine
This is Rietveld 408576698