chromium/components/omnibox/browser/featured_search_provider_unittest.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

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

#include <stddef.h>

#include <memory>
#include <string>
#include <utility>
#include <vector>

#include "base/format_macros.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "components/history_embeddings/history_embeddings_features.h"
#include "components/omnibox/browser/autocomplete_input.h"
#include "components/omnibox/browser/autocomplete_match.h"
#include "components/omnibox/browser/autocomplete_match_type.h"
#include "components/omnibox/browser/autocomplete_result.h"
#include "components/omnibox/browser/fake_autocomplete_provider_client.h"
#include "components/omnibox/browser/omnibox_prefs.h"
#include "components/omnibox/browser/test_scheme_classifier.h"
#include "components/omnibox/common/omnibox_features.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/testing_pref_service.h"
#include "components/search_engines/template_url.h"
#include "components/search_engines/template_url_data.h"
#include "components/search_engines/template_url_service.h"
#include "components/search_engines/template_url_starter_pack_data.h"
#include "components/sync_preferences/testing_pref_service_syncable.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/metrics_proto/omnibox_event.pb.h"
#include "third_party/metrics_proto/omnibox_focus_type.pb.h"
#include "url/gurl.h"

namespace {

constexpr char16_t kBookmarksKeyword[] =;
constexpr char16_t kHistoryKeyword[] =;
constexpr char16_t kTabsKeyword[] =;
constexpr char16_t kGeminiKeyword[] =;

constexpr char16_t kFeaturedKeyword1[] =;
constexpr char16_t kFeaturedKeyword2[] =;
constexpr char16_t kFeaturedKeyword3[] =;

const char* const kBookmarksUrl =;
const char* const kHistoryUrl =;
const char* const kTabsUrl =;
const char* const kGeminiUrl =;

constexpr char kFeaturedUrl1[] =;
constexpr char kFeaturedUrl2[] =;
constexpr char kFeaturedUrl3[] =;

struct TestData {};

struct IphData {};

}  // namespace

class FeaturedSearchProviderTest : public testing::Test {};

TEST_F(FeaturedSearchProviderTest, NonAtPrefix) {}

TEST_F(FeaturedSearchProviderTest, DoesNotSupportMatchesOnFocus) {}

TEST_F(FeaturedSearchProviderTest, StarterPack) {}

TEST_F(FeaturedSearchProviderTest, StarterPackExpansion) {}

TEST_F(FeaturedSearchProviderTest, StarterPackExpansionRelevance) {}

TEST_F(FeaturedSearchProviderTest, FeaturedEnterpriseSearch) {}

TEST_F(FeaturedSearchProviderTest, ZeroSuggestStarterPackIPHSuggestion) {}

TEST_F(FeaturedSearchProviderTest,
       ZeroSuggestStarterPackIPHSuggestion_DeleteMatch) {}

TEST_F(FeaturedSearchProviderTest, ZeroSuggestFeaturedSearchIPHSuggestion) {}

TEST_F(FeaturedSearchProviderTest,
       ZeroSuggestFeaturedSearchIPHSuggestion_DeleteMatch) {}

TEST_F(FeaturedSearchProviderTest,
       ZeroSuggestStarerPackIPHAfterFeaturedSearchIPHDeleted) {}

TEST_F(FeaturedSearchProviderTest, HistoryEmbedding_Iphs) {}

TEST_F(FeaturedSearchProviderTest, IphShownLimit) {}