diff options
-rw-r--r-- | chrome/browser/drive/fake_drive_service.cc | 5 | ||||
-rw-r--r-- | chrome/browser/drive/fake_drive_service.h | 2 | ||||
-rw-r--r-- | chrome/browser/sync_file_system/drive_backend_v1/api_util_unittest.cc | 5 |
3 files changed, 10 insertions, 2 deletions
diff --git a/chrome/browser/drive/fake_drive_service.cc b/chrome/browser/drive/fake_drive_service.cc index 4605911..8ac7e34 100644 --- a/chrome/browser/drive/fake_drive_service.cc +++ b/chrome/browser/drive/fake_drive_service.cc @@ -178,6 +178,11 @@ FakeDriveService::FakeDriveService() offline_(false), never_return_all_resource_list_(false) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + + about_resource_->set_largest_change_id(654321); + about_resource_->set_quota_bytes_total(9876543210); + about_resource_->set_quota_bytes_used(6789012345); + about_resource_->set_root_folder_id(GetRootResourceId()); } FakeDriveService::~FakeDriveService() { diff --git a/chrome/browser/drive/fake_drive_service.h b/chrome/browser/drive/fake_drive_service.h index b38a1f3..5547a6c 100644 --- a/chrome/browser/drive/fake_drive_service.h +++ b/chrome/browser/drive/fake_drive_service.h @@ -32,6 +32,8 @@ class FakeDriveService : public DriveServiceInterface { // Loads the resource list for WAPI. Returns true on success. bool LoadResourceListForWapi(const std::string& relative_path); + // DEPRECATED DO NOT USE + // // Loads the account metadata for WAPI. Returns true on success. Also adds // the largest changestamp in the account metadata to the existing // entries. The changestamp information will be used to generate change diff --git a/chrome/browser/sync_file_system/drive_backend_v1/api_util_unittest.cc b/chrome/browser/sync_file_system/drive_backend_v1/api_util_unittest.cc index 23509c4..1b0318e 100644 --- a/chrome/browser/sync_file_system/drive_backend_v1/api_util_unittest.cc +++ b/chrome/browser/sync_file_system/drive_backend_v1/api_util_unittest.cc @@ -395,7 +395,8 @@ void APIUtilTest::TestListFiles() { } void APIUtilTest::TestListChanges() { - const int64 kStartChangestamp = 6; + const int64 old_changestamp = + fake_drive_service()->about_resource().largest_change_id(); const std::string sync_root_id = SetUpSyncRootDirectory(); const std::string origin_root_id = SetUpOriginRootDirectory(sync_root_id); @@ -423,7 +424,7 @@ void APIUtilTest::TestListChanges() { error = google_apis::GDATA_OTHER_ERROR; document_feed.reset(); api_util()->ListChanges( - kStartChangestamp, + old_changestamp + 6, base::Bind(&DidGetResourceList, &error, &document_feed)); base::MessageLoop::current()->RunUntilIdle(); |