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

Unified Diff: chrome/browser/chromeos/drive/fake_file_system_unittest.cc

Issue 16107004: drive: Stop returning FilePath from GetResourceEntryById (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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
« no previous file with comments | « chrome/browser/chromeos/drive/fake_file_system.cc ('k') | chrome/browser/chromeos/drive/file_system.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/fake_file_system_unittest.cc
diff --git a/chrome/browser/chromeos/drive/fake_file_system_unittest.cc b/chrome/browser/chromeos/drive/fake_file_system_unittest.cc
index 3d3384a60c225c5424ea2f52178b654bc3e44624..61f425a1b19bdd9bbad9492f9385ad4d273fa03f 100644
--- a/chrome/browser/chromeos/drive/fake_file_system_unittest.cc
+++ b/chrome/browser/chromeos/drive/fake_file_system_unittest.cc
@@ -46,52 +46,15 @@ class FakeFileSystemTest : public ::testing::Test {
TEST_F(FakeFileSystemTest, GetResourceEntryById) {
FileError error = FILE_ERROR_FAILED;
scoped_ptr<ResourceEntry> entry;
- base::FilePath file_path;
+ const std::string resource_id = "folder:sub_dir_folder_resource_id";
fake_file_system_->GetResourceEntryById(
- "folder:sub_dir_folder_resource_id",
- google_apis::test_util::CreateCopyResultCallback(
- &error, &file_path, &entry));
- google_apis::test_util::RunBlockingPoolTask();
-
- ASSERT_EQ(FILE_ERROR_OK, error);
- EXPECT_EQ(
- util::GetDriveMyDriveRootPath().AppendASCII(
- "Directory 1/Sub Directory Folder"),
- file_path);
- EXPECT_TRUE(entry); // Just make sure something is returned.
-}
-
-TEST_F(FakeFileSystemTest,
- GetResourceEntryById_PathCompatibleWithGetResourceEntryByPath) {
- const std::string document_resource_id = "document:5_document_resource_id";
-
- FileError error = FILE_ERROR_FAILED;
- scoped_ptr<ResourceEntry> entry;
- base::FilePath file_path;
-
- // Get resource entry by resource id.
- fake_file_system_->GetResourceEntryById(
- document_resource_id,
- google_apis::test_util::CreateCopyResultCallback(
- &error, &file_path, &entry));
- google_apis::test_util::RunBlockingPoolTask();
-
- ASSERT_EQ(FILE_ERROR_OK, error);
- ASSERT_TRUE(entry);
- EXPECT_TRUE(entry->file_specific_info().is_hosted_document());
-
- // Get resource entry by path given by GetResourceEntryById.
- error = FILE_ERROR_FAILED;
- entry.reset();
- fake_file_system_->GetResourceEntryByPath(
- file_path,
+ resource_id,
google_apis::test_util::CreateCopyResultCallback(&error, &entry));
google_apis::test_util::RunBlockingPoolTask();
ASSERT_EQ(FILE_ERROR_OK, error);
- ASSERT_TRUE(entry);
- EXPECT_EQ(document_resource_id, entry->resource_id());
+ EXPECT_EQ(resource_id, entry->resource_id());
}
TEST_F(FakeFileSystemTest, GetFileContentByPath) {
« no previous file with comments | « chrome/browser/chromeos/drive/fake_file_system.cc ('k') | chrome/browser/chromeos/drive/file_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698