#include "chrome/browser/ui/webui/history_clusters/history_clusters_handler.h"
#include "base/memory/raw_ptr.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/history_clusters/history_clusters_metrics_logger.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_enums.h"
#include "chrome/browser/ui/webui/history/history_ui.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/history_clusters/core/features.h"
#include "components/history_clusters/core/history_clusters_prefs.h"
#include "components/history_clusters/core/url_constants.h"
#include "components/prefs/pref_service.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "ui/webui/resources/cr_components/history_clusters/history_clusters.mojom.h"
namespace history_clusters {
namespace {
history::ClusterVisit CreateVisit(
std::string url,
float score,
std::vector<std::string> related_searches = { … }
}
class HistoryClustersHandlerBrowserTest : public InProcessBrowserTest { … };
IN_PROC_BROWSER_TEST_F(HistoryClustersHandlerBrowserTest,
OpenVisitUrlsInTabGroup) { … }
IN_PROC_BROWSER_TEST_F(HistoryClustersHandlerBrowserTest,
DISABLED_OpenVisitUrlsInTabGroupHardCap) { … }
IN_PROC_BROWSER_TEST_F(HistoryClustersHandlerBrowserTest,
RecordUIVisitActions) { … }
IN_PROC_BROWSER_TEST_F(HistoryClustersHandlerBrowserTest,
RecordUIClusterActions) { … }
IN_PROC_BROWSER_TEST_F(HistoryClustersHandlerBrowserTest,
RecordUIRelatedSearchActions) { … }
IN_PROC_BROWSER_TEST_F(HistoryClustersHandlerBrowserTest,
RecordUnsuccessfulOutcome) { … }
IN_PROC_BROWSER_TEST_F(HistoryClustersHandlerBrowserTest,
QueryClustersResultToMojom_Integration) { … }
}