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

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

Issue 13456002: drive: Fills no-parent entiries in "/drive/other". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add a comment in ConvertResourceEntryToDriveEntryProto(). Created 7 years, 9 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/drive_file_system_unittest.cc
diff --git a/chrome/browser/chromeos/drive/drive_file_system_unittest.cc b/chrome/browser/chromeos/drive/drive_file_system_unittest.cc
index d2398760601194eccad024b4294d16d681160927..8c213ea9a4c4922aee7f2066a3659b6da11c2066 100644
--- a/chrome/browser/chromeos/drive/drive_file_system_unittest.cc
+++ b/chrome/browser/chromeos/drive/drive_file_system_unittest.cc
@@ -709,6 +709,16 @@ TEST_F(DriveFileSystemTest, SearchInSubSubdir) {
ASSERT_EQ("folder:sub_sub_directory_folder_id", entry->resource_id());
}
+TEST_F(DriveFileSystemTest, SearchOrphanFile) {
+ ASSERT_TRUE(LoadRootFeedDocument());
+
+ const base::FilePath kFilePath = base::FilePath(
+ FILE_PATH_LITERAL("drive/other/Orphan File 1.txt"));
+ scoped_ptr<DriveEntryProto> entry = GetEntryInfoByPathSync(kFilePath);
+ ASSERT_TRUE(entry.get());
+ EXPECT_EQ("file:1_orphanfile_resource_id", entry->resource_id());
+}
+
TEST_F(DriveFileSystemTest, ReadDirectoryByPath_Root) {
EXPECT_CALL(*mock_directory_observer_, OnDirectoryChanged(
Eq(base::FilePath(FILE_PATH_LITERAL("drive/root"))))).Times(1);

Powered by Google App Engine
This is Rietveld 408576698