#include "components/history/core/browser/top_sites_database.h"
#include <stddef.h>
#include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "components/history/core/browser/features.h"
#include "components/history/core/browser/history_types.h"
#include "components/history/core/test/database_test_utils.h"
#include "components/history/core/test/thumbnail-inl.h"
#include "sql/database.h"
#include "sql/recovery.h"
#include "sql/sqlite_result_code_values.h"
#include "sql/test/scoped_error_expecter.h"
#include "sql/test/test_helpers.h"
#include "sql/transaction.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
namespace {
void VerifyTablesAndColumns(sql::Database* db) { … }
void VerifyDatabaseEmpty(sql::Database* db) { … }
void VerifyURLsEqual(const std::vector<GURL>& expected,
const history::MostVisitedURLList& actual) { … }
}
namespace history {
class TopSitesDatabaseTest : public testing::Test { … };
TEST_F(TopSitesDatabaseTest, Version1) { … }
TEST_F(TopSitesDatabaseTest, Version2) { … }
TEST_F(TopSitesDatabaseTest, Version3) { … }
TEST_F(TopSitesDatabaseTest, Version4) { … }
TEST_F(TopSitesDatabaseTest, Version5) { … }
TEST_F(TopSitesDatabaseTest, Recovery1) { … }
TEST_F(TopSitesDatabaseTest, Recovery2) { … }
TEST_F(TopSitesDatabaseTest, Recovery4_CorruptHeader) { … }
TEST_F(TopSitesDatabaseTest, Recovery5_CorruptIndex) { … }
TEST_F(TopSitesDatabaseTest, Recovery5_CorruptIndexAndLostRow) { … }
TEST_F(TopSitesDatabaseTest, ApplyDelta_Delete) { … }
TEST_F(TopSitesDatabaseTest, ApplyDelta_Add) { … }
TEST_F(TopSitesDatabaseTest, ApplyDelta_Move) { … }
TEST_F(TopSitesDatabaseTest, ApplyDelta_All) { … }
TEST_F(TopSitesDatabaseTest, ApplyDelta_UpdatesAddedSiteTitle) { … }
}