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

Unified Diff: chrome/browser/sync_file_system/drive_backend/metadata_database_unittest.cc

Issue 62583003: [Retry][SyncFS] Implement LargestKnownChangeID handling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: +comment Created 7 years, 1 month 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/sync_file_system/drive_backend/metadata_database.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync_file_system/drive_backend/metadata_database_unittest.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/metadata_database_unittest.cc b/chrome/browser/sync_file_system/drive_backend/metadata_database_unittest.cc
index 27da341017e981dd0c37721016d4e9dd6b3e031c..f9724b45928a6ba845691dd54ff6090c0cf0c7f8 100644
--- a/chrome/browser/sync_file_system/drive_backend/metadata_database_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend/metadata_database_unittest.cc
@@ -401,6 +401,10 @@ class MetadataDatabaseTest : public testing::Test {
details->set_change_id(++current_change_id_);
}
+ void ApplyNoopChangeToMetadata(FileMetadata* file) {
+ file->mutable_details()->set_change_id(++current_change_id_);
+ }
+
void PushToChangeList(scoped_ptr<google_apis::ChangeResource> change,
ScopedVector<google_apis::ChangeResource>* changes) {
changes->push_back(change.release());
@@ -749,6 +753,9 @@ TEST_F(MetadataDatabaseTest, UpdateByChangeListTest) {
&reorganized_file.metadata);
ApplyContentChangeToMetadata(&updated_file.metadata);
+ // Update change ID.
+ ApplyNoopChangeToMetadata(&noop_file.metadata);
+
ScopedVector<google_apis::ChangeResource> changes;
PushToChangeList(
CreateChangeResourceFromMetadata(renamed_file.metadata), &changes);
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend/metadata_database.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698