chromium/components/omnibox/browser/history_cluster_provider_unittest.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/omnibox/browser/history_cluster_provider.h"

#include <memory>

#include "base/files/scoped_temp_dir.h"
#include "base/memory/scoped_refptr.h"
#include "base/test/task_environment.h"
#include "components/history/core/browser/history_service.h"
#include "components/history_clusters/core/config.h"
#include "components/history_clusters/core/features.h"
#include "components/history_clusters/core/history_clusters_prefs.h"
#include "components/history_clusters/core/history_clusters_service.h"
#include "components/history_clusters/core/history_clusters_service_test_api.h"
#include "components/omnibox/browser/autocomplete_match.h"
#include "components/omnibox/browser/autocomplete_provider.h"
#include "components/omnibox/browser/autocomplete_provider_listener.h"
#include "components/omnibox/browser/fake_autocomplete_provider.h"
#include "components/omnibox/browser/fake_autocomplete_provider_client.h"
#include "components/omnibox/browser/omnibox_triggered_feature_service.h"
#include "components/omnibox/browser/search_provider.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/testing_pref_service.h"
#include "components/sync_preferences/testing_pref_service_syncable.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/metrics_proto/omnibox_event.pb.h"
#include "third_party/omnibox_proto/groups.pb.h"

AutocompleteMatch CreateMatch(std::u16string contents,
                              bool is_search = true,
                              int relevance = 100) {}

class HistoryClustersProviderTest : public testing::Test,
                                    public AutocompleteProviderListener {};

TEST_F(HistoryClustersProviderTest, WantAsynchronousMatchesFalse) {}

TEST_F(HistoryClustersProviderTest, SyncSearchMatches) {}

TEST_F(HistoryClustersProviderTest, AsyncSearchMatches) {}

TEST_F(HistoryClustersProviderTest, EmptySyncSearchMatches) {}

TEST_F(HistoryClustersProviderTest, EmptyAsyncSearchMatches) {}

TEST_F(HistoryClustersProviderTest, MultipassSearchMatches) {}

TEST_F(HistoryClustersProviderTest, MultipassSyncSearchMatches) {}

TEST_F(HistoryClustersProviderTest, NoKeywordMatches) {}

TEST_F(HistoryClustersProviderTest, MultipleKeyworddMatches) {}

TEST_F(HistoryClustersProviderTest, NavIntent_TopAndHighScoringNav) {}

TEST_F(HistoryClustersProviderTest, SearchIntent_TopScoringNav) {}

TEST_F(HistoryClustersProviderTest, SearchIntent_HighScoringNav) {}

TEST_F(HistoryClustersProviderTest, Counterfactual_Disabled) {}

TEST_F(HistoryClustersProviderTest, Counterfactual_Enabled) {}

TEST_F(HistoryClustersProviderTest, Grouping_Ranking) {}