#include "components/omnibox/browser/titled_url_match_utils.h"
#include <memory>
#include <string_view>
#include "base/memory/scoped_refptr.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "components/bookmarks/browser/titled_url_match.h"
#include "components/bookmarks/browser/titled_url_node.h"
#include "components/omnibox/browser/autocomplete_input.h"
#include "components/omnibox/browser/autocomplete_match.h"
#include "components/omnibox/browser/autocomplete_provider.h"
#include "components/omnibox/browser/fake_autocomplete_provider.h"
#include "components/omnibox/browser/test_scheme_classifier.h"
#include "components/omnibox/common/omnibox_features.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/metrics_proto/omnibox_event.pb.h"
#include "url/gurl.h"
TitledUrlMatchToAutocompleteMatch;
namespace {
class MockTitledUrlNode : public bookmarks::TitledUrlNode { … };
std::string ACMatchClassificationsAsString(
const ACMatchClassifications& classifications) { … }
class TitledUrlMatchUtilsTest : public testing::Test { … };
}
TEST_F(TitledUrlMatchUtilsTest, TitledUrlMatchToAutocompleteMatch) { … }
AutocompleteMatch BuildTestAutocompleteMatch(
scoped_refptr<FakeAutocompleteProvider> provider,
const std::string& input_text_s,
const GURL& match_url,
const bookmarks::TitledUrlMatch::MatchPositions& match_positions) { … }
TEST_F(TitledUrlMatchUtilsTest, DoTrimHttpScheme) { … }
TEST_F(TitledUrlMatchUtilsTest, DontTrimHttpSchemeIfInputHasScheme) { … }
TEST_F(TitledUrlMatchUtilsTest, DoTrimHttpsScheme) { … }
TEST_F(TitledUrlMatchUtilsTest, DontTrimHttpsSchemeIfInputHasScheme) { … }
TEST_F(TitledUrlMatchUtilsTest, EmptyInlineAutocompletion) { … }
TEST_F(TitledUrlMatchUtilsTest, PathsInContentsAndDescription) { … }