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

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: 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 52ff6376b8f29720c386ade8836894be857fd6ab..e295e06ae331196856ae41d7c3df6e1028edbbbf 100644
--- a/chrome/browser/chromeos/drive/drive_file_system_unittest.cc
+++ b/chrome/browser/chromeos/drive/drive_file_system_unittest.cc
@@ -798,6 +798,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