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

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

Issue 23441049: drive: Enable recursive fast-fetch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Made the test to surely use fast-fetch. Created 7 years, 3 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/file_system.cc ('k') | chrome/browser/drive/fake_drive_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « chrome/browser/chromeos/drive/file_system.cc ('k') | chrome/browser/drive/fake_drive_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698