OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "app/sql/connection.h" | 9 #include "app/sql/connection.h" |
10 #include "app/sql/statement.h" | 10 #include "app/sql/statement.h" |
(...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1084 connection.DoesColumnExist("models", "last_download_timestamp")); | 1084 connection.DoesColumnExist("models", "last_download_timestamp")); |
1085 ASSERT_TRUE( | 1085 ASSERT_TRUE( |
1086 connection.DoesColumnExist("models", "model_id")); | 1086 connection.DoesColumnExist("models", "model_id")); |
1087 | 1087 |
1088 sql::Statement s(connection.GetUniqueStatement("SELECT model_id, " | 1088 sql::Statement s(connection.GetUniqueStatement("SELECT model_id, " |
1089 "initial_sync_ended, last_download_timestamp FROM models")); | 1089 "initial_sync_ended, last_download_timestamp FROM models")); |
1090 ASSERT_TRUE(s.Step()); | 1090 ASSERT_TRUE(s.Step()); |
1091 std::string model_id = s.ColumnString(0); | 1091 std::string model_id = s.ColumnString(0); |
1092 EXPECT_EQ("C2881000", base::HexEncode(model_id.data(), model_id.size())) | 1092 EXPECT_EQ("C2881000", base::HexEncode(model_id.data(), model_id.size())) |
1093 << "Model ID is expected to be the empty BookmarkSpecifics proto."; | 1093 << "Model ID is expected to be the empty BookmarkSpecifics proto."; |
1094 EXPECT_EQ(true, s.ColumnBool(1)); | 1094 EXPECT_TRUE(s.ColumnBool(1)); |
1095 EXPECT_EQ(694, s.ColumnInt64(2)); | 1095 EXPECT_EQ(694, s.ColumnInt64(2)); |
1096 ASSERT_FALSE(s.Step()); | 1096 ASSERT_FALSE(s.Step()); |
1097 } | 1097 } |
1098 | 1098 |
1099 | 1099 |
1100 TEST_F(DirectoryBackingStoreTest, MigrateVersion71To72) { | 1100 TEST_F(DirectoryBackingStoreTest, MigrateVersion71To72) { |
1101 SetUpVersion71Database(); | 1101 SetUpVersion71Database(); |
1102 | 1102 |
1103 { | 1103 { |
1104 sql::Connection connection; | 1104 sql::Connection connection; |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1552 | 1552 |
1553 STLDeleteElements(&index); | 1553 STLDeleteElements(&index); |
1554 dbs->LoadEntries(&index); | 1554 dbs->LoadEntries(&index); |
1555 EXPECT_EQ(0U, index.size()); | 1555 EXPECT_EQ(0U, index.size()); |
1556 | 1556 |
1557 dbs->EndLoad(); | 1557 dbs->EndLoad(); |
1558 dbs->EndSave(); | 1558 dbs->EndSave(); |
1559 } | 1559 } |
1560 | 1560 |
1561 } // namespace syncable | 1561 } // namespace syncable |
OLD | NEW |