| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 1934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1945 ASSERT_FALSE(connection.DoesColumnExist("share_info", | 1945 ASSERT_FALSE(connection.DoesColumnExist("share_info", |
| 1946 "autofill_entries_added_during_migration")); | 1946 "autofill_entries_added_during_migration")); |
| 1947 ASSERT_FALSE(connection.DoesColumnExist("share_info", | 1947 ASSERT_FALSE(connection.DoesColumnExist("share_info", |
| 1948 "autofill_profiles_added_during_migration")); | 1948 "autofill_profiles_added_during_migration")); |
| 1949 | 1949 |
| 1950 // Column added in version 78. | 1950 // Column added in version 78. |
| 1951 ASSERT_TRUE(connection.DoesColumnExist("metas", "base_server_specifics")); | 1951 ASSERT_TRUE(connection.DoesColumnExist("metas", "base_server_specifics")); |
| 1952 | 1952 |
| 1953 // Check download_progress state (v75 migration) | 1953 // Check download_progress state (v75 migration) |
| 1954 ASSERT_EQ(694, | 1954 ASSERT_EQ(694, |
| 1955 dir_info.kernel_info.download_progress[syncable::BOOKMARKS] | 1955 dir_info.kernel_info.download_progress[syncer::BOOKMARKS] |
| 1956 .timestamp_token_for_migration()); | 1956 .timestamp_token_for_migration()); |
| 1957 ASSERT_FALSE( | 1957 ASSERT_FALSE( |
| 1958 dir_info.kernel_info.download_progress[syncable::BOOKMARKS] | 1958 dir_info.kernel_info.download_progress[syncer::BOOKMARKS] |
| 1959 .has_token()); | 1959 .has_token()); |
| 1960 ASSERT_EQ(32904, | 1960 ASSERT_EQ(32904, |
| 1961 dir_info.kernel_info.download_progress[syncable::BOOKMARKS] | 1961 dir_info.kernel_info.download_progress[syncer::BOOKMARKS] |
| 1962 .data_type_id()); | 1962 .data_type_id()); |
| 1963 ASSERT_FALSE( | 1963 ASSERT_FALSE( |
| 1964 dir_info.kernel_info.download_progress[syncable::THEMES] | 1964 dir_info.kernel_info.download_progress[syncer::THEMES] |
| 1965 .has_timestamp_token_for_migration()); | 1965 .has_timestamp_token_for_migration()); |
| 1966 ASSERT_TRUE( | 1966 ASSERT_TRUE( |
| 1967 dir_info.kernel_info.download_progress[syncable::THEMES] | 1967 dir_info.kernel_info.download_progress[syncer::THEMES] |
| 1968 .has_token()); | 1968 .has_token()); |
| 1969 ASSERT_TRUE( | 1969 ASSERT_TRUE( |
| 1970 dir_info.kernel_info.download_progress[syncable::THEMES] | 1970 dir_info.kernel_info.download_progress[syncer::THEMES] |
| 1971 .token().empty()); | 1971 .token().empty()); |
| 1972 ASSERT_EQ(41210, | 1972 ASSERT_EQ(41210, |
| 1973 dir_info.kernel_info.download_progress[syncable::THEMES] | 1973 dir_info.kernel_info.download_progress[syncer::THEMES] |
| 1974 .data_type_id()); | 1974 .data_type_id()); |
| 1975 | 1975 |
| 1976 // Check metas | 1976 // Check metas |
| 1977 EXPECT_EQ(GetExpectedMetaProtoTimes(DONT_INCLUDE_DELETED_ITEMS), | 1977 EXPECT_EQ(GetExpectedMetaProtoTimes(DONT_INCLUDE_DELETED_ITEMS), |
| 1978 GetMetaProtoTimes(&connection)); | 1978 GetMetaProtoTimes(&connection)); |
| 1979 ExpectTimes(index, GetExpectedMetaTimes()); | 1979 ExpectTimes(index, GetExpectedMetaTimes()); |
| 1980 | 1980 |
| 1981 MetahandlesIndex::iterator it = index.begin(); | 1981 MetahandlesIndex::iterator it = index.begin(); |
| 1982 ASSERT_TRUE(it != index.end()); | 1982 ASSERT_TRUE(it != index.end()); |
| 1983 ASSERT_EQ(1, (*it)->ref(META_HANDLE)); | 1983 ASSERT_EQ(1, (*it)->ref(META_HANDLE)); |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2154 const std::string& guid2 = TestDirectoryBackingStore::GenerateCacheGUID(); | 2154 const std::string& guid2 = TestDirectoryBackingStore::GenerateCacheGUID(); |
| 2155 EXPECT_EQ(24U, guid1.size()); | 2155 EXPECT_EQ(24U, guid1.size()); |
| 2156 EXPECT_EQ(24U, guid2.size()); | 2156 EXPECT_EQ(24U, guid2.size()); |
| 2157 // In theory this test can fail, but it won't before the universe | 2157 // In theory this test can fail, but it won't before the universe |
| 2158 // dies of heat death. | 2158 // dies of heat death. |
| 2159 EXPECT_NE(guid1, guid2); | 2159 EXPECT_NE(guid1, guid2); |
| 2160 } | 2160 } |
| 2161 | 2161 |
| 2162 } // namespace syncable | 2162 } // namespace syncable |
| 2163 } // namespace syncer | 2163 } // namespace syncer |
| OLD | NEW |