#include "components/history_clusters/core/clustering_test_utils.h"
#include <vector>
#include "base/ranges/algorithm.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "components/history/core/browser/history_types.h"
#include "components/history_clusters/core/history_clusters_util.h"
namespace history_clusters::testing {
std::vector<history::VisitID> ExtractDuplicateVisitIds(
std::vector<history::DuplicateClusterVisit> duplicate_visits) { … }
VisitResult::VisitResult(
int visit_id,
float score,
const std::vector<history::DuplicateClusterVisit>& duplicate_visits,
std::u16string search_terms)
: … { … }
VisitResult::VisitResult(const history::ClusterVisit& visit)
: … { … }
VisitResult::VisitResult(const VisitResult& other) = default;
VisitResult::~VisitResult() = default;
std::string VisitResult::ToString() const { … }
std::ostream& operator<<(std::ostream& os, const VisitResult& vr) { … }
bool VisitResult::operator==(const VisitResult& rhs) const { … }
std::vector<std::vector<testing::VisitResult>> ToVisitResults(
const std::vector<history::Cluster>& clusters) { … }
history::AnnotatedVisit CreateDefaultAnnotatedVisit(int visit_id,
const GURL& url,
base::Time visit_time) { … }
history::ClusterVisit CreateClusterVisit(
const history::AnnotatedVisit& annotated_visit,
std::optional<GURL> normalized_url,
float score,
history::ClusterVisit::InteractionState interaction_state) { … }
history::DuplicateClusterVisit ClusterVisitToDuplicateClusterVisit(
history::ClusterVisit cluster_visit) { … }
history::Cluster CreateCluster(
std::vector<history::ClusterVisit>& cluster_visits) { … }
}