#include "chrome/browser/extensions/api/omnibox/suggestion_parser.h"
#include <memory>
#include <string_view>
#include "base/run_loop.h"
#include "base/test/bind.h"
#include "base/test/test_future.h"
#include "content/public/test/browser_task_environment.h"
#include "services/data_decoder/public/cpp/test_support/in_process_data_decoder.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace extensions {
namespace {
constexpr api::omnibox::DescriptionStyleType kMatch = …;
constexpr api::omnibox::DescriptionStyleType kDim = …;
constexpr api::omnibox::DescriptionStyleType kUrl = …;
testing::Matcher<api::omnibox::MatchClassification> GetStyleMatcher(
api::omnibox::DescriptionStyleType type,
int offset,
int length) { … }
}
class SuggestionParserUnitTest : public testing::Test { … };
TEST_F(SuggestionParserUnitTest, BasicCases) { … }
TEST_F(SuggestionParserUnitTest, MultipleEntries) { … }
TEST_F(SuggestionParserUnitTest, ParsingFails) { … }
TEST_F(SuggestionParserUnitTest, Sanitization) { … }
TEST_F(SuggestionParserUnitTest, UnknownTagsAndAttributesAreIgnored) { … }
}