Chromium Code Reviews| Index: chrome/browser/chromeos/drive/file_system_unittest.cc |
| diff --git a/chrome/browser/chromeos/drive/file_system_unittest.cc b/chrome/browser/chromeos/drive/file_system_unittest.cc |
| index 04e5ba55b82d1415e76ca3c2a5a39abced98e824..86e1e718c7ad98e86f9705c55219b2190f1d69a2 100644 |
| --- a/chrome/browser/chromeos/drive/file_system_unittest.cc |
| +++ b/chrome/browser/chromeos/drive/file_system_unittest.cc |
| @@ -380,13 +380,19 @@ TEST_F(FileSystemTest, GetMyDriveRoot) { |
| } |
| TEST_F(FileSystemTest, GetExistingFile) { |
| + // Simulate the situation that full feed fetching takes very long time, |
| + // to test the "fast fetch" feature is properly working. |
|
satorux1
2013/09/06 08:32:25
"fast fetch" -> recursive "fast fetch"
kinaba
2013/09/06 10:12:14
Done.
|
| + fake_drive_service_->set_never_return_all_resource_list(true); |
| + |
| const base::FilePath kFilePath(FILE_PATH_LITERAL("drive/root/File 1.txt")); |
|
satorux1
2013/09/06 08:32:25
could you make this one level deeper, to make it m
kinaba
2013/09/06 10:12:14
Done.
|
| scoped_ptr<ResourceEntry> entry = GetResourceEntryByPathSync(kFilePath); |
| ASSERT_TRUE(entry); |
| EXPECT_EQ("file:2_file_resource_id", entry->resource_id()); |
| - EXPECT_EQ(1, fake_drive_service_->about_resource_load_count()); |
| - EXPECT_EQ(1, fake_drive_service_->resource_list_load_count()); |
| + // Directory load for "drive" and "drive/root" that loads about_resource, |
| + // and one background full resource list loading. |
| + EXPECT_EQ(2, fake_drive_service_->about_resource_load_count()); |
| + EXPECT_EQ(1, fake_drive_service_->blocked_resource_list_load_count()); |
| } |
| TEST_F(FileSystemTest, GetExistingDocument) { |
| @@ -467,6 +473,9 @@ TEST_F(FileSystemTest, GetInSubSubdir) { |
| } |
| TEST_F(FileSystemTest, GetOrphanFile) { |
| + ASSERT_TRUE(LoadFullResourceList()); |
| + |
| + // Entry without parents are placed under "drive/other". |
| const base::FilePath kFilePath( |
| FILE_PATH_LITERAL("drive/other/Orphan File 1.txt")); |
| scoped_ptr<ResourceEntry> entry = GetResourceEntryByPathSync(kFilePath); |