From 3ad2398165694ba9243b7f9539d367ba3122f9ef Mon Sep 17 00:00:00 2001 From: "maniscalco@chromium.org" Date: Sat, 1 Mar 2014 01:24:24 +0000 Subject: Don't call RefreshColumns() in directory_backing_store_unittest.cc. Move "column deleted" checks from test case MigrateVersion85To86 to test case ToCurrentVersion where they will execute after a RefreshColumns(). RefreshColumns() should not be called from MigrateVersionXToY test cases because it will create in a metas table with all columns know to the code (i.e. the latest version). BUG= Review URL: https://codereview.chromium.org/182683004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254310 0039d316-1c4b-4281-b951-d872f2087c98 --- sync/syncable/directory_backing_store_unittest.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sync') diff --git a/sync/syncable/directory_backing_store_unittest.cc b/sync/syncable/directory_backing_store_unittest.cc index c40d564..f53dfb7 100644 --- a/sync/syncable/directory_backing_store_unittest.cc +++ b/sync/syncable/directory_backing_store_unittest.cc @@ -2980,10 +2980,6 @@ TEST_F(DirectoryBackingStoreTest, MigrateVersion85To86) { EXPECT_TRUE(connection.DoesColumnExist("metas", "server_unique_position")); EXPECT_TRUE(connection.DoesColumnExist("metas", "unique_bookmark_tag")); ASSERT_TRUE(dbs->needs_column_refresh_); - ASSERT_TRUE(dbs->RefreshColumns()); - EXPECT_FALSE(connection.DoesColumnExist("metas", "next_id")); - EXPECT_FALSE(connection.DoesColumnExist("metas", "prev_id")); - EXPECT_FALSE(connection.DoesColumnExist("metas", "server_ordinal_in_parent")); { Directory::MetahandlesMap handles_map; @@ -3236,6 +3232,11 @@ TEST_P(MigrationTest, ToCurrentVersion) { // Column removed in version 85. ASSERT_FALSE(connection.DoesColumnExist("models", "initial_sync_ended")); + // Columns removed in version 86. + ASSERT_FALSE(connection.DoesColumnExist("metas", "next_id")); + ASSERT_FALSE(connection.DoesColumnExist("metas", "prev_id")); + ASSERT_FALSE(connection.DoesColumnExist("metas", "server_ordinal_in_parent")); + // Check download_progress state (v75 migration) ASSERT_EQ(694, dir_info.kernel_info.download_progress[BOOKMARKS] -- cgit v1.1