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

Unified Diff: sync/syncable/directory_backing_store_unittest.cc

Issue 1136953013: Sync: Change Local IDs to GUID based to avoid ID collision (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed setting KERNEL_SHARE_INFO_DIRTY when incrementing transaction version Created 5 years, 7 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: sync/syncable/directory_backing_store_unittest.cc
diff --git a/sync/syncable/directory_backing_store_unittest.cc b/sync/syncable/directory_backing_store_unittest.cc
index 0cc723fc7ce1e0958bb48f9eb5d5443623dc8dd4..72600719c1b387d2afdfe1649124bed29c37beb9 100644
--- a/sync/syncable/directory_backing_store_unittest.cc
+++ b/sync/syncable/directory_backing_store_unittest.cc
@@ -3205,36 +3205,16 @@ TEST_F(DirectoryBackingStoreTest, MigrateVersion77To78) {
}
TEST_F(DirectoryBackingStoreTest, MigrateVersion78To79) {
- const int kInitialNextId = -65542;
-
sql::Connection connection;
ASSERT_TRUE(connection.OpenInMemory());
SetUpVersion78Database(&connection);
- // Double-check the original next_id is what we think it is.
- sql::Statement s(connection.GetUniqueStatement(
- "SELECT next_id FROM share_info"));
- s.Step();
- ASSERT_EQ(kInitialNextId, s.ColumnInt(0));
-
scoped_ptr<TestDirectoryBackingStore> dbs(
new TestDirectoryBackingStore(GetUsername(), &connection));
ASSERT_FALSE(dbs->needs_column_refresh());
ASSERT_TRUE(dbs->MigrateVersion78To79());
ASSERT_EQ(79, dbs->GetVersion());
ASSERT_FALSE(dbs->needs_column_refresh());
-
- // Ensure the next_id has been incremented.
- Directory::MetahandlesMap handles_map;
- JournalIndex delete_journals;
- MetahandleSet metahandles_to_purge;
- STLValueDeleter<Directory::MetahandlesMap> deleter(&handles_map);
- Directory::KernelLoadInfo load_info;
-
- s.Clear();
- ASSERT_TRUE(dbs->Load(&handles_map, &delete_journals, &metahandles_to_purge,
- &load_info));
- EXPECT_LE(load_info.kernel_info.next_id, kInitialNextId - 65536);
}
TEST_F(DirectoryBackingStoreTest, MigrateVersion79To80) {

Powered by Google App Engine
This is Rietveld 408576698