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

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

Issue 22885006: Remove TransferFileFromRemoteToLocal, which are no longer used. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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/copy_operation_unittest.cc
diff --git a/chrome/browser/chromeos/drive/file_system/copy_operation_unittest.cc b/chrome/browser/chromeos/drive/file_system/copy_operation_unittest.cc
index 433c57da73ab02eb197e7fa1573852f4d5631477..cefdeba4e4a5e005f8594cd7903dfb83a62aee3d 100644
--- a/chrome/browser/chromeos/drive/file_system/copy_operation_unittest.cc
+++ b/chrome/browser/chromeos/drive/file_system/copy_operation_unittest.cc
@@ -144,66 +144,6 @@ TEST_F(CopyOperationTest, TransferFileFromLocalToRemote_HostedDocument) {
remote_dest_path.DirName()));
}
-TEST_F(CopyOperationTest, TransferFileFromRemoteToLocal_RegularFile) {
- base::FilePath remote_src_path(FILE_PATH_LITERAL("drive/root/File 1.txt"));
- base::FilePath local_dest_path = temp_dir().AppendASCII("local_copy.txt");
-
- ResourceEntry entry;
- ASSERT_EQ(FILE_ERROR_OK, GetLocalResourceEntry(remote_src_path, &entry));
-
- FileError error = FILE_ERROR_FAILED;
- operation_->TransferFileFromRemoteToLocal(
- remote_src_path,
- local_dest_path,
- google_apis::test_util::CreateCopyResultCallback(&error));
- test_util::RunBlockingPoolTask();
- EXPECT_EQ(FILE_ERROR_OK, error);
-
- // The content is "x"s of the file size.
- base::FilePath cache_path;
- cache()->GetFileOnUIThread(entry.resource_id(),
- google_apis::test_util::CreateCopyResultCallback(
- &error, &cache_path));
- test_util::RunBlockingPoolTask();
- EXPECT_EQ(FILE_ERROR_OK, error);
-
- const std::string kExpectedContent = "This is some test content.";
- std::string cache_file_data;
- EXPECT_TRUE(file_util::ReadFileToString(cache_path, &cache_file_data));
- EXPECT_EQ(kExpectedContent, cache_file_data);
-
- std::string local_dest_file_data;
- EXPECT_TRUE(file_util::ReadFileToString(local_dest_path,
- &local_dest_file_data));
- EXPECT_EQ(kExpectedContent, local_dest_file_data);
-
- // The transfered file is cached and the change of "offline available"
- // attribute is notified.
- EXPECT_EQ(1U, observer()->get_changed_paths().size());
- EXPECT_TRUE(observer()->get_changed_paths().count(remote_src_path.DirName()));
-}
-
-TEST_F(CopyOperationTest, TransferFileFromRemoteToLocal_HostedDocument) {
- base::FilePath local_dest_path = temp_dir().AppendASCII("local_copy.txt");
- base::FilePath remote_src_path(
- FILE_PATH_LITERAL("drive/root/Document 1 excludeDir-test.gdoc"));
-
- FileError error = FILE_ERROR_FAILED;
- operation_->TransferFileFromRemoteToLocal(
- remote_src_path,
- local_dest_path,
- google_apis::test_util::CreateCopyResultCallback(&error));
- test_util::RunBlockingPoolTask();
- EXPECT_EQ(FILE_ERROR_OK, error);
-
- ResourceEntry entry;
- EXPECT_EQ(FILE_ERROR_OK, GetLocalResourceEntry(remote_src_path, &entry));
- EXPECT_EQ(GURL(entry.file_specific_info().alternate_url()),
- util::ReadUrlFromGDocFile(local_dest_path));
- EXPECT_EQ(entry.resource_id(),
- util::ReadResourceIdFromGDocFile(local_dest_path));
- EXPECT_TRUE(observer()->get_changed_paths().empty());
-}
TEST_F(CopyOperationTest, CopyNotExistingFile) {
base::FilePath src_path(FILE_PATH_LITERAL("drive/root/Dummy file.txt"));
« no previous file with comments | « chrome/browser/chromeos/drive/file_system/copy_operation.cc ('k') | chrome/browser/chromeos/drive/file_system_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698