| Index: chrome/browser/google_apis/drive_api_operations_unittest.cc
|
| diff --git a/chrome/browser/google_apis/drive_api_operations_unittest.cc b/chrome/browser/google_apis/drive_api_operations_unittest.cc
|
| index 958fe2afe0964ed9bdc15e64cfbe4f85d005f69c..06e7744ec97a070a7294aa6088fdfda20eb5fe48 100644
|
| --- a/chrome/browser/google_apis/drive_api_operations_unittest.cc
|
| +++ b/chrome/browser/google_apis/drive_api_operations_unittest.cc
|
| @@ -104,7 +104,7 @@ class DriveApiOperationsTest : public testing::Test {
|
| ResetExpectedResponse();
|
| }
|
|
|
| - MessageLoopForUI message_loop_;
|
| + base::MessageLoopForUI message_loop_;
|
| content::TestBrowserThread ui_thread_;
|
| content::TestBrowserThread file_thread_;
|
| content::TestBrowserThread io_thread_;
|
| @@ -331,7 +331,7 @@ TEST_F(DriveApiOperationsTest, GetAboutOperation_ValidJson) {
|
| base::Bind(&test_util::RunAndQuit),
|
| test_util::CreateCopyResultCallback(&error, &about_resource)));
|
| operation_runner_->StartOperationWithRetry(operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| EXPECT_EQ(HTTP_SUCCESS, error);
|
| EXPECT_EQ(net::test_server::METHOD_GET, http_request_.method);
|
| @@ -363,7 +363,7 @@ TEST_F(DriveApiOperationsTest, GetAboutOperation_InvalidJson) {
|
| base::Bind(&test_util::RunAndQuit),
|
| test_util::CreateCopyResultCallback(&error, &about_resource)));
|
| operation_runner_->StartOperationWithRetry(operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| // "parse error" should be returned, and the about resource should be NULL.
|
| EXPECT_EQ(GDATA_PARSE_ERROR, error);
|
| @@ -388,7 +388,7 @@ TEST_F(DriveApiOperationsTest, GetApplistOperation) {
|
| base::Bind(&test_util::RunAndQuit),
|
| test_util::CreateCopyResultCallback(&error, &result)));
|
| operation_runner_->StartOperationWithRetry(operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| EXPECT_EQ(HTTP_SUCCESS, error);
|
| EXPECT_EQ(net::test_server::METHOD_GET, http_request_.method);
|
| @@ -415,7 +415,7 @@ TEST_F(DriveApiOperationsTest, GetChangelistOperation) {
|
| base::Bind(&test_util::RunAndQuit),
|
| test_util::CreateCopyResultCallback(&error, &result)));
|
| operation_runner_->StartOperationWithRetry(operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| EXPECT_EQ(HTTP_SUCCESS, error);
|
| EXPECT_EQ(net::test_server::METHOD_GET, http_request_.method);
|
| @@ -442,7 +442,7 @@ TEST_F(DriveApiOperationsTest, GetFilelistOperation) {
|
| base::Bind(&test_util::RunAndQuit),
|
| test_util::CreateCopyResultCallback(&error, &result)));
|
| operation_runner_->StartOperationWithRetry(operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| EXPECT_EQ(HTTP_SUCCESS, error);
|
| EXPECT_EQ(net::test_server::METHOD_GET, http_request_.method);
|
| @@ -468,7 +468,7 @@ TEST_F(DriveApiOperationsTest, ContinueGetFileListOperation) {
|
| base::Bind(&test_util::RunAndQuit),
|
| test_util::CreateCopyResultCallback(&error, &result)));
|
| operation_runner_->StartOperationWithRetry(operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| EXPECT_EQ(HTTP_SUCCESS, error);
|
| EXPECT_EQ(net::test_server::METHOD_GET, http_request_.method);
|
| @@ -496,7 +496,7 @@ TEST_F(DriveApiOperationsTest, CreateDirectoryOperation) {
|
| base::Bind(&test_util::RunAndQuit),
|
| test_util::CreateCopyResultCallback(&error, &file_resource)));
|
| operation_runner_->StartOperationWithRetry(operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| EXPECT_EQ(HTTP_SUCCESS, error);
|
| EXPECT_EQ(net::test_server::METHOD_POST, http_request_.method);
|
| @@ -538,7 +538,7 @@ TEST_F(DriveApiOperationsTest, RenameResourceOperation) {
|
| base::Bind(&test_util::RunAndQuit),
|
| test_util::CreateCopyResultCallback(&error)));
|
| operation_runner_->StartOperationWithRetry(operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| EXPECT_EQ(HTTP_SUCCESS, error);
|
| EXPECT_EQ(net::test_server::METHOD_PATCH, http_request_.method);
|
| @@ -573,7 +573,7 @@ TEST_F(DriveApiOperationsTest, TouchResourceOperation) {
|
| base::Bind(&test_util::RunAndQuit),
|
| test_util::CreateCopyResultCallback(&error, &file_resource)));
|
| operation_runner_->StartOperationWithRetry(operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| EXPECT_EQ(HTTP_SUCCESS, error);
|
| EXPECT_EQ(net::test_server::METHOD_PATCH, http_request_.method);
|
| @@ -610,7 +610,7 @@ TEST_F(DriveApiOperationsTest, CopyResourceOperation) {
|
| base::Bind(&test_util::RunAndQuit),
|
| test_util::CreateCopyResultCallback(&error, &file_resource)));
|
| operation_runner_->StartOperationWithRetry(operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| EXPECT_EQ(HTTP_SUCCESS, error);
|
| EXPECT_EQ(net::test_server::METHOD_POST, http_request_.method);
|
| @@ -646,7 +646,7 @@ TEST_F(DriveApiOperationsTest, CopyResourceOperation_EmptyParentResourceId) {
|
| base::Bind(&test_util::RunAndQuit),
|
| test_util::CreateCopyResultCallback(&error, &file_resource)));
|
| operation_runner_->StartOperationWithRetry(operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| EXPECT_EQ(HTTP_SUCCESS, error);
|
| EXPECT_EQ(net::test_server::METHOD_POST, http_request_.method);
|
| @@ -677,7 +677,7 @@ TEST_F(DriveApiOperationsTest, TrashResourceOperation) {
|
| base::Bind(&test_util::RunAndQuit),
|
| test_util::CreateCopyResultCallback(&error)));
|
| operation_runner_->StartOperationWithRetry(operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| EXPECT_EQ(HTTP_SUCCESS, error);
|
| EXPECT_EQ(net::test_server::METHOD_POST, http_request_.method);
|
| @@ -706,7 +706,7 @@ TEST_F(DriveApiOperationsTest, InsertResourceOperation) {
|
| base::Bind(&test_util::RunAndQuit),
|
| test_util::CreateCopyResultCallback(&error)));
|
| operation_runner_->StartOperationWithRetry(operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| EXPECT_EQ(HTTP_SUCCESS, error);
|
| EXPECT_EQ(net::test_server::METHOD_POST, http_request_.method);
|
| @@ -734,7 +734,7 @@ TEST_F(DriveApiOperationsTest, DeleteResourceOperation) {
|
| base::Bind(&test_util::RunAndQuit),
|
| test_util::CreateCopyResultCallback(&error)));
|
| operation_runner_->StartOperationWithRetry(operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| EXPECT_EQ(HTTP_NO_CONTENT, error);
|
| EXPECT_EQ(net::test_server::METHOD_DELETE, http_request_.method);
|
| @@ -772,7 +772,7 @@ TEST_F(DriveApiOperationsTest, UploadNewFileOperation) {
|
| base::Bind(&test_util::RunAndQuit),
|
| test_util::CreateCopyResultCallback(&error, &upload_url)));
|
| operation_runner_->StartOperationWithRetry(operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| EXPECT_EQ(HTTP_SUCCESS, error);
|
| EXPECT_EQ(kTestUploadNewFilePath, upload_url.path());
|
| @@ -812,7 +812,7 @@ TEST_F(DriveApiOperationsTest, UploadNewFileOperation) {
|
| test_util::CreateCopyResultCallback(&response, &new_entry)),
|
| ProgressCallback());
|
| operation_runner_->StartOperationWithRetry(resume_operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| // METHOD_PUT should be used to upload data.
|
| EXPECT_EQ(net::test_server::METHOD_PUT, http_request_.method);
|
| @@ -862,7 +862,7 @@ TEST_F(DriveApiOperationsTest, UploadNewEmptyFileOperation) {
|
| base::Bind(&test_util::RunAndQuit),
|
| test_util::CreateCopyResultCallback(&error, &upload_url)));
|
| operation_runner_->StartOperationWithRetry(operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| EXPECT_EQ(HTTP_SUCCESS, error);
|
| EXPECT_EQ(kTestUploadNewFilePath, upload_url.path());
|
| @@ -901,7 +901,7 @@ TEST_F(DriveApiOperationsTest, UploadNewEmptyFileOperation) {
|
| test_util::CreateCopyResultCallback(&response, &new_entry)),
|
| ProgressCallback());
|
| operation_runner_->StartOperationWithRetry(resume_operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| // METHOD_PUT should be used to upload data.
|
| EXPECT_EQ(net::test_server::METHOD_PUT, http_request_.method);
|
| @@ -952,7 +952,7 @@ TEST_F(DriveApiOperationsTest, UploadNewLargeFileOperation) {
|
| base::Bind(&test_util::RunAndQuit),
|
| test_util::CreateCopyResultCallback(&error, &upload_url)));
|
| operation_runner_->StartOperationWithRetry(operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| EXPECT_EQ(HTTP_SUCCESS, error);
|
| EXPECT_EQ(kTestUploadNewFilePath, upload_url.path());
|
| @@ -991,7 +991,7 @@ TEST_F(DriveApiOperationsTest, UploadNewLargeFileOperation) {
|
| base::Bind(&test_util::RunAndQuit),
|
| test_util::CreateCopyResultCallback(&response, &new_entry)));
|
| operation_runner_->StartOperationWithRetry(get_upload_status_operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| // METHOD_PUT should be used to upload data.
|
| EXPECT_EQ(net::test_server::METHOD_PUT, http_request_.method);
|
| @@ -1037,7 +1037,7 @@ TEST_F(DriveApiOperationsTest, UploadNewLargeFileOperation) {
|
| test_util::CreateCopyResultCallback(&response, &new_entry)),
|
| ProgressCallback());
|
| operation_runner_->StartOperationWithRetry(resume_operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| // METHOD_PUT should be used to upload data.
|
| EXPECT_EQ(net::test_server::METHOD_PUT, http_request_.method);
|
| @@ -1081,7 +1081,7 @@ TEST_F(DriveApiOperationsTest, UploadNewLargeFileOperation) {
|
| base::Bind(&test_util::RunAndQuit),
|
| test_util::CreateCopyResultCallback(&response, &new_entry)));
|
| operation_runner_->StartOperationWithRetry(get_upload_status_operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| // METHOD_PUT should be used to upload data.
|
| EXPECT_EQ(net::test_server::METHOD_PUT, http_request_.method);
|
| @@ -1130,7 +1130,7 @@ TEST_F(DriveApiOperationsTest, UploadExistingFileOperation) {
|
| base::Bind(&test_util::RunAndQuit),
|
| test_util::CreateCopyResultCallback(&error, &upload_url)));
|
| operation_runner_->StartOperationWithRetry(operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| EXPECT_EQ(HTTP_SUCCESS, error);
|
| EXPECT_EQ(kTestUploadExistingFilePath, upload_url.path());
|
| @@ -1165,7 +1165,7 @@ TEST_F(DriveApiOperationsTest, UploadExistingFileOperation) {
|
| test_util::CreateCopyResultCallback(&response, &new_entry)),
|
| ProgressCallback());
|
| operation_runner_->StartOperationWithRetry(resume_operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| // METHOD_PUT should be used to upload data.
|
| EXPECT_EQ(net::test_server::METHOD_PUT, http_request_.method);
|
| @@ -1215,7 +1215,7 @@ TEST_F(DriveApiOperationsTest, UploadExistingFileOperationWithETag) {
|
| base::Bind(&test_util::RunAndQuit),
|
| test_util::CreateCopyResultCallback(&error, &upload_url)));
|
| operation_runner_->StartOperationWithRetry(operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| EXPECT_EQ(HTTP_SUCCESS, error);
|
| EXPECT_EQ(kTestUploadExistingFilePath, upload_url.path());
|
| @@ -1250,7 +1250,7 @@ TEST_F(DriveApiOperationsTest, UploadExistingFileOperationWithETag) {
|
| test_util::CreateCopyResultCallback(&response, &new_entry)),
|
| ProgressCallback());
|
| operation_runner_->StartOperationWithRetry(resume_operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| // METHOD_PUT should be used to upload data.
|
| EXPECT_EQ(net::test_server::METHOD_PUT, http_request_.method);
|
| @@ -1297,7 +1297,7 @@ TEST_F(DriveApiOperationsTest, UploadExistingFileOperationWithETagConflicting) {
|
| base::Bind(&test_util::RunAndQuit),
|
| test_util::CreateCopyResultCallback(&error, &upload_url)));
|
| operation_runner_->StartOperationWithRetry(operation);
|
| - MessageLoop::current()->Run();
|
| + base::MessageLoop::current()->Run();
|
|
|
| EXPECT_EQ(HTTP_PRECONDITION, error);
|
| EXPECT_EQ(kTestContentType, http_request_.headers["X-Upload-Content-Type"]);
|
|
|