#include "components/history/core/browser/history_backend.h"
#include <stdint.h>
#include <cstdint>
#include <string>
#include <unordered_set>
#include "base/format_macros.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/i18n/case_conversion.h"
#include "base/run_loop.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "base/uuid.h"
#include "components/history/core/browser/download_constants.h"
#include "components/history/core/browser/download_row.h"
#include "components/history/core/browser/history_constants.h"
#include "components/history/core/browser/history_database.h"
#include "components/history/core/browser/history_types.h"
#include "components/history/core/browser/keyword_search_term.h"
#include "components/history/core/browser/page_usage_data.h"
#include "components/history/core/test/history_backend_db_base_test.h"
#include "components/history/core/test/test_history_database.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace history {
namespace {
class HistoryBackendDBTest : public HistoryBackendDBBaseTest { … };
TEST_F(HistoryBackendDBTest, ClearBrowsingData_Downloads) { … }
TEST_F(HistoryBackendDBTest, MigrateDownloadsState) { … }
TEST_F(HistoryBackendDBTest, MigrateDownloadsReasonPathsAndDangerType) { … }
TEST_F(HistoryBackendDBTest, MigrateReferrer) { … }
TEST_F(HistoryBackendDBTest, MigrateDownloadedByExtension) { … }
TEST_F(HistoryBackendDBTest, MigrateDownloadValidators) { … }
TEST_F(HistoryBackendDBTest, MigrateDownloadMimeType) { … }
bool IsValidRFC4122Ver4GUID(const std::string& guid) { … }
TEST_F(HistoryBackendDBTest, MigrateHashHttpMethodAndGenerateGuids) { … }
TEST_F(HistoryBackendDBTest, MigrateTabUrls) { … }
TEST_F(HistoryBackendDBTest, MigrateDownloadSiteInstanceUrl) { … }
TEST_F(HistoryBackendDBTest, MigrateEmbedderDownloadData) { … }
TEST_F(HistoryBackendDBTest, MigrateDownloadsSlicesTable) { … }
TEST_F(HistoryBackendDBTest, MigrateDownloadsLastAccessTimeAndTransient) { … }
TEST_F(HistoryBackendDBTest, DownloadCreateAndQuery) { … }
TEST_F(HistoryBackendDBTest, DownloadCreateAndUpdate_VolatileFields) { … }
TEST_F(HistoryBackendDBTest, ConfirmDownloadRowCreateAndDelete) { … }
TEST_F(HistoryBackendDBTest, DownloadNukeRecordsMissingURLs) { … }
TEST_F(HistoryBackendDBTest, ConfirmDownloadInProgressCleanup) { … }
TEST_F(HistoryBackendDBTest, CreateAndUpdateDownloadingSlice) { … }
TEST_F(HistoryBackendDBTest, UpdateDownloadWithNewSlice) { … }
TEST_F(HistoryBackendDBTest, DownloadSliceDeletedIfEmpty) { … }
TEST_F(HistoryBackendDBTest, UpdateDownloadByWebApp) { … }
TEST_F(HistoryBackendDBTest, MigratePresentations) { … }
TEST_F(HistoryBackendDBTest, CheckLastCompatibleVersion) { … }
TEST_F(HistoryBackendDBTest, MigrateVisitSegmentNames) { … }
TEST_F(HistoryBackendDBTest, MigrateDownloadSliceFinished) { … }
TEST_F(HistoryBackendDBTest, MigrateVisitsWithoutIncrementedOmniboxTypedScore) { … }
TEST_F(HistoryBackendDBTest,
MigrateVisitsWithoutIncrementedOmniboxTypedScore_BadRow) { … }
TEST_F(HistoryBackendDBTest, MigrateVisitsWithoutPubliclyRoutableColumn) { … }
TEST_F(HistoryBackendDBTest, MigrateFlocAllowedToAnnotationsTable) { … }
TEST_F(HistoryBackendDBTest, MigrateReplaceClusterVisitsTable) { … }
TEST_F(HistoryBackendDBTest, MigrateKeywordSearchTerms) { … }
TEST_F(HistoryBackendDBTest, MigrateContentAnnotationsWithoutEntitiesColumn) { … }
TEST_F(HistoryBackendDBTest,
MigrateContentAnnotationsAddRelatedSearchesColumn) { … }
TEST_F(HistoryBackendDBTest,
MigrateVisitsWithoutOpenerVisitColumnAndDropPubliclyRoutableColumn) { … }
TEST_F(HistoryBackendDBTest,
MigrateContextAnnotationsAddTotalForegroundDurationColumn) { … }
TEST_F(HistoryBackendDBTest,
MigrateContentAnnotationsAddSearchMetadataColumns) { … }
TEST_F(HistoryBackendDBTest, MigrateContentAnnotationsAddPageMetadataColumns) { … }
TEST_F(HistoryBackendDBTest,
MigrateVisitsAutoincrementIdAndAddOriginatorColumns) { … }
TEST_F(HistoryBackendDBTest,
MigrateVisitsAddOriginatorFromVisitAndOpenerVisitColumns) { … }
TEST_F(HistoryBackendDBTest, MigrateClustersAddColumns) { … }
TEST_F(HistoryBackendDBTest, MigrateAnnotationsAddColumnsForSync) { … }
TEST_F(HistoryBackendDBTest, MigrateVisitsAddIsKnownToSyncColumn) { … }
TEST_F(HistoryBackendDBTest, MigrateClustersAddTriggerabilityCalculatedColumn) { … }
TEST_F(HistoryBackendDBTest,
MigrateClustersAutoincrementIdAndAddOriginatorColumns) { … }
TEST_F(HistoryBackendDBTest, MigrateContentAnnotationsAddHasUrlKeyedImage) { … }
TEST_F(HistoryBackendDBTest,
MigrateVisitsAddConsiderForNewTabPageMostVisitedColumn) { … }
TEST_F(HistoryBackendDBTest, MigrateDownloadByWebApp) { … }
TEST_F(HistoryBackendDBTest, MigrateClustersAndVisitsAddInteractionState) { … }
TEST_F(HistoryBackendDBTest, MigrateVisitsAddExternalReferrerUrlColumn) { … }
TEST_F(HistoryBackendDBTest, MigrateVisitsAddVisitedLinkIdColumn) { … }
TEST_F(HistoryBackendDBTest, MigrateRemoveTypedUrlMetadataTable) { … }
TEST_F(HistoryBackendDBTest, MigrateVisitsAddAppId) { … }
TEST_F(HistoryBackendDBTest, VerifyTestSQLFileForCurrentVersionAlreadyExists) { … }
bool FilterURL(const GURL& url) { … }
TEST_F(HistoryBackendDBTest, QuerySegmentUsage) { … }
TEST_F(HistoryBackendDBTest, QuerySegmentUsageReturnsNothingForZeroVisits) { … }
}
}