#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/omnibox/browser/shortcuts_database.h"
#include <stddef.h>
#include "base/files/scoped_temp_dir.h"
#include "base/format_macros.h"
#include "base/path_service.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "components/omnibox/browser/autocomplete_match.h"
#include "components/omnibox/browser/autocomplete_match_type.h"
#include "components/omnibox/browser/shortcuts_constants.h"
#include "sql/statement.h"
#include "sql/test/scoped_error_expecter.h"
#include "sql/test/test_helpers.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/page_transition_types.h"
ASCIIToUTF16;
namespace {
struct ShortcutsDatabaseTestInfo { … } shortcut_test_db[] = …;
ShortcutsDatabaseMigrationTest;
void CheckV0ColumnExistence(const base::FilePath& db_path, bool is_v0) { … }
void CheckV2Migration(base::FilePath sql_path) { … }
const base::FilePath GetTestDataDir() { … }
}
class ShortcutsDatabaseTest : public testing::Test { … };
void ShortcutsDatabaseTest::SetUp() { … }
void ShortcutsDatabaseTest::TearDown() { … }
void ShortcutsDatabaseTest::ClearDB() { … }
size_t ShortcutsDatabaseTest::CountRecords() const { … }
ShortcutsDatabase::Shortcut ShortcutsDatabaseTest::ShortcutFromTestInfo(
const ShortcutsDatabaseTestInfo& info) { … }
void ShortcutsDatabaseTest::AddAll() { … }
TEST_F(ShortcutsDatabaseTest, AddShortcut) { … }
TEST_F(ShortcutsDatabaseTest, UpdateShortcut) { … }
TEST_F(ShortcutsDatabaseTest, DeleteShortcutsWithIds) { … }
TEST_F(ShortcutsDatabaseTest, DeleteShortcutsWithURL) { … }
TEST_F(ShortcutsDatabaseTest, DeleteAllShortcuts) { … }
TEST(ShortcutsDatabaseMigrationTest, MigrateTableAddFillIntoEdit) { … }
TEST(ShortcutsDatabaseMigrationTest, MigrateV0ToV1) { … }
TEST(ShortcutsDatabaseMigrationTest, MigrateToV2) { … }
TEST(ShortcutsDatabaseMigrationTest, Recovery1) { … }