Chromium Code Reviews| 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 1864ba9d9c6ab33734096ca027a61805c22d213c..571cf4ef4112d4463e29987819a5cdd6d419ffba 100644 |
| --- a/sync/syncable/directory_backing_store_unittest.cc |
| +++ b/sync/syncable/directory_backing_store_unittest.cc |
| @@ -2079,6 +2079,32 @@ TEST_F(DirectoryBackingStoreTest, MigrateVersion79To80) { |
| EXPECT_EQ(serialized_chip_bag, load_info.kernel_info.bag_of_chips); |
| } |
| +TEST_F(DirectoryBackingStoreTest, MigrateVersion80To81) { |
| + sql::Connection connection; |
| + ASSERT_TRUE(connection.OpenInMemory()); |
| + |
| + // Unfortunately there isn't a SetUpVersion80Database to use |
|
rlarocque
2012/09/27 23:10:12
You should fix this. I believe it was Nicolas who
|
| + // and I (vishwath) don't know enough about the bag_of_chips |
| + // to write it myself (yet). So assuming the previous test |
| + // passed, create at ver 79 and migrate up to 81 instead. |
| + SetupVersion79Database(&connection); |
| + |
| + sql::Statement s(connection.GetUniqueStatement( |
| + "SELECT id FROM metas WHERE unique_server_tag = 'google_chrome'")); |
| + ASSERT_TRUE(s.Step()); |
| + ASSERT_EQ(s.ColumnType(3), COLUMN_TYPE_INTEGER); |
| + |
| + scoped_ptr<TestDirectoryBackingStore> dbs( |
| + new TestDirectoryBackingStore(GetUsername(), &connection)); |
| + ASSERT_TRUE(dbs->MigrateVersion79To80()); |
| + ASSERT_TRUE(dbs->MigrateVersion80To81()); |
| + |
| + sql::Statement s(connection.GetUniqueStatement( |
| + "SELECT id FROM metas WHERE unique_server_tag = 'google_chrome'")); |
| + ASSERT_TRUE(s.Step()); |
| + ASSERT_EQ(s.ColumnType(3), COLUMN_TYPE_TEXT); |
|
rlarocque
2012/09/27 23:10:12
Shouldn't you check the values stored in the colum
|
| +} |
| + |
| TEST_P(MigrationTest, ToCurrentVersion) { |
| sql::Connection connection; |
| ASSERT_TRUE(connection.OpenInMemory()); |