chromium/components/omnibox/browser/scored_history_match_unittest.cc

// Copyright 2012 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/scored_history_match.h"

#include <memory>
#include <numeric>
#include <string>
#include <utility>

#include "base/auto_reset.h"
#include "base/functional/bind.h"
#include "base/i18n/break_iterator.h"
#include "base/ranges/algorithm.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/gtest_util.h"
#include "base/test/scoped_feature_list.h"
#include "build/build_config.h"
#include "components/omnibox/browser/omnibox_field_trial.h"
#include "components/omnibox/common/omnibox_features.h"
#include "components/search_engines/search_terms_data.h"
#include "components/variations/scoped_variations_ids_provider.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

ASCIIToUTF16;
ElementsAre;
Pair;

namespace {

// Returns a VisitInfoVector that includes |num_visits| spread over the
// last |frequency|*|num_visits| days (relative to |now|).  A frequency of
// one means one visit each day, two means every other day, etc.
VisitInfoVector CreateVisitInfoVector(int num_visits,
                                      int frequency,
                                      base::Time now) {}

}  // namespace

class ScoredHistoryMatchPublic : public ScoredHistoryMatch {};

class ScoredHistoryMatchTest : public testing::Test {};

history::URLRow ScoredHistoryMatchTest::MakeURLRow(const char* url,
                                                   const char* title,
                                                   int visit_count,
                                                   int days_since_last_visit,
                                                   int typed_count) {}

void ScoredHistoryMatchTest::PopulateWordStarts(const history::URLRow& url_row,
                                                RowWordStarts* word_starts) {}

String16Vector ScoredHistoryMatchTest::Make1Term(const char* term) const {}

String16Vector ScoredHistoryMatchTest::Make2Terms(const char* term_1,
                                                  const char* term_2) const {}

float ScoredHistoryMatchTest::GetTopicalityScoreOfTermAgainstURLAndTitle(
    const std::vector<std::string>& terms,
    const WordStarts term_word_starts,
    const GURL& url,
    const std::u16string& title) {}

TEST_F(ScoredHistoryMatchTest, Scoring) {}

TEST_F(ScoredHistoryMatchTest, ScoringBookmarks) {}

TEST_F(ScoredHistoryMatchTest, ScoringTLD) {}

TEST_F(ScoredHistoryMatchTest, ScoringScheme) {}

TEST_F(ScoredHistoryMatchTest, MatchURLComponents) {}

TEST_F(ScoredHistoryMatchTest, GetTopicalityScoreTrailingSlash) {}

TEST_F(ScoredHistoryMatchTest, FilterMatches) {}

TEST_F(ScoredHistoryMatchTest, GetFrequency) {}

TEST_F(ScoredHistoryMatchTest, GetDocumentSpecificityScore) {}

// This function only tests scoring of single terms that match exactly
// once somewhere in the URL or title.
TEST_F(ScoredHistoryMatchTest, GetTopicalityScore) {}

TEST_F(ScoredHistoryMatchTest, GetTopicalityScore_MidwordMatching) {}

// Test the function GetFinalRelevancyScore().
TEST_F(ScoredHistoryMatchTest, GetFinalRelevancyScore) {}

// Test the function GetHQPBucketsFromString().
TEST_F(ScoredHistoryMatchTest, GetHQPBucketsFromString) {}

TEST_F(ScoredHistoryMatchTest, GetDomainRelevancyScore) {}