#include "components/history_clusters/core/on_device_clustering_backend.h"
#include "base/containers/flat_set.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "components/history/core/browser/history_types.h"
#include "components/history_clusters/core/clustering_test_utils.h"
#include "components/history_clusters/core/config.h"
#include "components/history_clusters/core/history_clusters_util.h"
#include "components/history_clusters/core/on_device_clustering_features.h"
#include "components/optimization_guide/core/test_optimization_guide_decider.h"
#include "components/site_engagement/core/site_engagement_score_provider.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace history_clusters {
namespace {
ElementsAre;
FloatEq;
UnorderedElementsAre;
class TestSiteEngagementScoreProvider
: public site_engagement::SiteEngagementScoreProvider { … };
class TestOptimizationGuideDecider
: public optimization_guide::TestOptimizationGuideDecider { … };
class OnDeviceClusteringWithoutContentBackendTest : public ::testing::Test { … };
TEST_F(OnDeviceClusteringWithoutContentBackendTest, ClusterNoVisits) { … }
TEST_F(OnDeviceClusteringWithoutContentBackendTest,
ClusterOneVisitNoRequiresUiAndTriggerability) { … }
TEST_F(OnDeviceClusteringWithoutContentBackendTest, ClusterOneVisit) { … }
TEST_F(OnDeviceClusteringWithoutContentBackendTest,
ClusterTwoVisitsTiedByReferringVisit) { … }
TEST_F(OnDeviceClusteringWithoutContentBackendTest,
ClusterTwoVisitsTiedByOpenerVisit) { … }
TEST_F(OnDeviceClusteringWithoutContentBackendTest, ClusterTwoVisitsTiedByURL) { … }
TEST_F(OnDeviceClusteringWithoutContentBackendTest,
GetClustersForUISimpleCase) { … }
TEST_F(OnDeviceClusteringWithoutContentBackendTest,
GetClustersForUIFilterApplied) { … }
TEST_F(OnDeviceClusteringWithoutContentBackendTest,
GetClusterTriggerabilitySimpleCase) { … }
TEST_F(OnDeviceClusteringWithoutContentBackendTest, DedupeClusters) { … }
TEST_F(OnDeviceClusteringWithoutContentBackendTest,
DedupeRespectsDifferentURLs) { … }
TEST_F(OnDeviceClusteringWithoutContentBackendTest, MultipleClusters) { … }
TEST_F(OnDeviceClusteringWithoutContentBackendTest,
SplitClusterOnNavigationTime) { … }
class OnDeviceClusteringWithAllTheBackendsTest
: public OnDeviceClusteringWithoutContentBackendTest { … };
TEST_F(OnDeviceClusteringWithoutContentBackendTest, EngagementScoreCache) { … }
}
}