Index: google_apis/drive/drive_api_requests_unittest.cc |
diff --git a/google_apis/drive/drive_api_requests_unittest.cc b/google_apis/drive/drive_api_requests_unittest.cc |
index 247a5693db06ee25f0fe8a6a96c174a1d1db6f4b..c4cab5b187592e5776e1e72fe2d933a479bdecfa 100644 |
--- a/google_apis/drive/drive_api_requests_unittest.cc |
+++ b/google_apis/drive/drive_api_requests_unittest.cc |
@@ -51,7 +51,7 @@ const char kTestDownloadPathPrefix[] = "/download/"; |
// Used as a GetContentCallback. |
void AppendContent(std::string* out, |
- GDataErrorCode error, |
+ DriveApiErrorCode error, |
scoped_ptr<std::string> content) { |
EXPECT_EQ(HTTP_SUCCESS, error); |
out->append(*content); |
@@ -390,7 +390,7 @@ TEST_F(DriveApiRequestsTest, DriveApiDataRequest_Fields) { |
expected_data_file_path_ = test_util::GetTestFilePath( |
"drive/about.json"); |
- GDataErrorCode error = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
scoped_ptr<AboutResource> about_resource; |
{ |
@@ -433,7 +433,7 @@ TEST_F(DriveApiRequestsTest, FilesInsertRequest) { |
expected_data_file_path_ = |
test_util::GetTestFilePath("drive/directory_entry.json"); |
- GDataErrorCode error = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
scoped_ptr<FileResource> file_resource; |
// Create "new directory" in the root directory. |
@@ -490,7 +490,7 @@ TEST_F(DriveApiRequestsTest, FilesPatchRequest) { |
expected_data_file_path_ = |
test_util::GetTestFilePath("drive/file_entry.json"); |
- GDataErrorCode error = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
scoped_ptr<FileResource> file_resource; |
{ |
@@ -536,7 +536,7 @@ TEST_F(DriveApiRequestsTest, AboutGetRequest_ValidJson) { |
expected_data_file_path_ = test_util::GetTestFilePath( |
"drive/about.json"); |
- GDataErrorCode error = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
scoped_ptr<AboutResource> about_resource; |
{ |
@@ -570,7 +570,7 @@ TEST_F(DriveApiRequestsTest, AboutGetRequest_InvalidJson) { |
expected_data_file_path_ = test_util::GetTestFilePath( |
"drive/testfile.txt"); |
- GDataErrorCode error = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
scoped_ptr<AboutResource> about_resource; |
{ |
@@ -586,7 +586,7 @@ TEST_F(DriveApiRequestsTest, AboutGetRequest_InvalidJson) { |
} |
// "parse error" should be returned, and the about resource should be NULL. |
- EXPECT_EQ(GDATA_PARSE_ERROR, error); |
+ EXPECT_EQ(DRIVE_PARSE_ERROR, error); |
EXPECT_EQ(net::test_server::METHOD_GET, http_request_.method); |
EXPECT_EQ("/drive/v2/about", http_request_.relative_url); |
EXPECT_FALSE(about_resource); |
@@ -597,7 +597,7 @@ TEST_F(DriveApiRequestsTest, AppsListRequest) { |
expected_data_file_path_ = test_util::GetTestFilePath( |
"drive/applist.json"); |
- GDataErrorCode error = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
scoped_ptr<AppList> app_list; |
{ |
@@ -624,7 +624,7 @@ TEST_F(DriveApiRequestsTest, ChangesListRequest) { |
expected_data_file_path_ = test_util::GetTestFilePath( |
"drive/changelist.json"); |
- GDataErrorCode error = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
scoped_ptr<ChangeList> result; |
{ |
@@ -653,7 +653,7 @@ TEST_F(DriveApiRequestsTest, ChangesListNextPageRequest) { |
expected_data_file_path_ = test_util::GetTestFilePath( |
"drive/changelist.json"); |
- GDataErrorCode error = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
scoped_ptr<ChangeList> result; |
{ |
@@ -683,7 +683,7 @@ TEST_F(DriveApiRequestsTest, FilesCopyRequest) { |
expected_data_file_path_ = |
test_util::GetTestFilePath("drive/file_entry.json"); |
- GDataErrorCode error = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
scoped_ptr<FileResource> file_resource; |
// Copy the file to a new file named "new title". |
@@ -722,7 +722,7 @@ TEST_F(DriveApiRequestsTest, FilesCopyRequest_EmptyParentResourceId) { |
expected_data_file_path_ = |
test_util::GetTestFilePath("drive/file_entry.json"); |
- GDataErrorCode error = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
scoped_ptr<FileResource> file_resource; |
// Copy the file to a new file named "new title". |
@@ -755,7 +755,7 @@ TEST_F(DriveApiRequestsTest, FilesListRequest) { |
expected_data_file_path_ = test_util::GetTestFilePath( |
"drive/filelist.json"); |
- GDataErrorCode error = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
scoped_ptr<FileList> result; |
{ |
@@ -783,7 +783,7 @@ TEST_F(DriveApiRequestsTest, FilesListNextPageRequest) { |
expected_data_file_path_ = test_util::GetTestFilePath( |
"drive/filelist.json"); |
- GDataErrorCode error = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
scoped_ptr<FileList> result; |
{ |
@@ -806,7 +806,7 @@ TEST_F(DriveApiRequestsTest, FilesListNextPageRequest) { |
} |
TEST_F(DriveApiRequestsTest, FilesDeleteRequest) { |
- GDataErrorCode error = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
// Delete a resource with the given resource id. |
{ |
@@ -835,7 +835,7 @@ TEST_F(DriveApiRequestsTest, FilesTrashRequest) { |
expected_data_file_path_ = |
test_util::GetTestFilePath("drive/directory_entry.json"); |
- GDataErrorCode error = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
scoped_ptr<FileResource> file_resource; |
// Trash a resource with the given resource id. |
@@ -864,7 +864,7 @@ TEST_F(DriveApiRequestsTest, ChildrenInsertRequest) { |
expected_content_type_ = "application/json"; |
expected_content_ = kTestChildrenResponse; |
- GDataErrorCode error = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
// Add a resource with "resource_id" to a directory with |
// "parent_resource_id". |
@@ -893,7 +893,7 @@ TEST_F(DriveApiRequestsTest, ChildrenInsertRequest) { |
} |
TEST_F(DriveApiRequestsTest, ChildrenDeleteRequest) { |
- GDataErrorCode error = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
// Remove a resource with "resource_id" from a directory with |
// "parent_resource_id". |
@@ -928,7 +928,7 @@ TEST_F(DriveApiRequestsTest, UploadNewFileRequest) { |
temp_dir_.path().AppendASCII("upload_file.txt"); |
ASSERT_TRUE(test_util::WriteStringToFile(kTestFilePath, kTestContent)); |
- GDataErrorCode error = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
GURL upload_url; |
// Initiate uploading a new file to the directory with |
@@ -1021,7 +1021,7 @@ TEST_F(DriveApiRequestsTest, UploadNewEmptyFileRequest) { |
temp_dir_.path().AppendASCII("empty_file.txt"); |
ASSERT_TRUE(test_util::WriteStringToFile(kTestFilePath, kTestContent)); |
- GDataErrorCode error = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
GURL upload_url; |
// Initiate uploading a new file to the directory with "parent_resource_id". |
@@ -1110,7 +1110,7 @@ TEST_F(DriveApiRequestsTest, UploadNewLargeFileRequest) { |
temp_dir_.path().AppendASCII("upload_file.txt"); |
ASSERT_TRUE(test_util::WriteStringToFile(kTestFilePath, kTestContent)); |
- GDataErrorCode error = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
GURL upload_url; |
// Initiate uploading a new file to the directory with "parent_resource_id". |
@@ -1289,7 +1289,7 @@ TEST_F(DriveApiRequestsTest, UploadNewFileWithMetadataRequest) { |
const char kTestContentType[] = "text/plain"; |
const std::string kTestContent(100, 'a'); |
- GDataErrorCode error = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
GURL upload_url; |
// Initiate uploading a new file to the directory with "parent_resource_id". |
@@ -1342,7 +1342,7 @@ TEST_F(DriveApiRequestsTest, UploadExistingFileRequest) { |
temp_dir_.path().AppendASCII("upload_file.txt"); |
ASSERT_TRUE(test_util::WriteStringToFile(kTestFilePath, kTestContent)); |
- GDataErrorCode error = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
GURL upload_url; |
// Initiate uploading a new file to the directory with "parent_resource_id". |
@@ -1429,7 +1429,7 @@ TEST_F(DriveApiRequestsTest, UploadExistingFileRequestWithETag) { |
temp_dir_.path().AppendASCII("upload_file.txt"); |
ASSERT_TRUE(test_util::WriteStringToFile(kTestFilePath, kTestContent)); |
- GDataErrorCode error = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
GURL upload_url; |
// Initiate uploading a new file to the directory with "parent_resource_id". |
@@ -1518,7 +1518,7 @@ TEST_F(DriveApiRequestsTest, UploadExistingFileRequestWithETagConflicting) { |
const char kTestContentType[] = "text/plain"; |
const std::string kTestContent(100, 'a'); |
- GDataErrorCode error = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
GURL upload_url; |
// Initiate uploading a new file to the directory with "parent_resource_id". |
@@ -1563,7 +1563,7 @@ TEST_F(DriveApiRequestsTest, |
temp_dir_.path().AppendASCII("upload_file.txt"); |
ASSERT_TRUE(test_util::WriteStringToFile(kTestFilePath, kTestContent)); |
- GDataErrorCode error = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
GURL upload_url; |
// Initiate uploading a new file to the directory with "parent_resource_id". |
@@ -1659,7 +1659,7 @@ TEST_F(DriveApiRequestsTest, UploadExistingFileWithMetadataRequest) { |
const char kTestContentType[] = "text/plain"; |
const std::string kTestContent(100, 'a'); |
- GDataErrorCode error = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
GURL upload_url; |
// Initiate uploading a new file to the directory with "parent_resource_id". |
@@ -1712,7 +1712,7 @@ TEST_F(DriveApiRequestsTest, DownloadFileRequest) { |
temp_dir_.path().AppendASCII("cache_file"); |
const std::string kTestId("dummyId"); |
- GDataErrorCode result_code = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode result_code = DRIVE_OTHER_ERROR; |
base::FilePath temp_file; |
{ |
base::RunLoop run_loop; |
@@ -1748,7 +1748,7 @@ TEST_F(DriveApiRequestsTest, DownloadFileRequest_GetContentCallback) { |
temp_dir_.path().AppendASCII("cache_file"); |
const std::string kTestId("dummyId"); |
- GDataErrorCode result_code = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode result_code = DRIVE_OTHER_ERROR; |
base::FilePath temp_file; |
std::string contents; |
{ |
@@ -1782,7 +1782,7 @@ TEST_F(DriveApiRequestsTest, PermissionsInsertRequest) { |
expected_content_type_ = "application/json"; |
expected_content_ = kTestPermissionResponse; |
- GDataErrorCode error = GDATA_OTHER_ERROR; |
+ DriveApiErrorCode error = DRIVE_OTHER_ERROR; |
// Add comment permission to the user "user@example.com". |
{ |
@@ -1818,7 +1818,7 @@ TEST_F(DriveApiRequestsTest, PermissionsInsertRequest) { |
EXPECT_TRUE(base::Value::Equals(expected.get(), result.get())); |
// Add "can edit" permission to users in "example.com". |
- error = GDATA_OTHER_ERROR; |
+ error = DRIVE_OTHER_ERROR; |
{ |
base::RunLoop run_loop; |
drive::PermissionsInsertRequest* request = |