chromium/chrome/browser/extensions/api/omnibox/suggestion_parser_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 "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 =;

// A custom matcher for an omnibox::MatchClassification.
testing::Matcher<api::omnibox::MatchClassification> GetStyleMatcher(
    api::omnibox::DescriptionStyleType type,
    int offset,
    int length) {}

}  // namespace

class SuggestionParserUnitTest : public testing::Test {};

// Tests a number of basic cases for XML suggestion parsing.
TEST_F(SuggestionParserUnitTest, BasicCases) {}

// Tests parsing multiple entries passed to the suggestion parsing.
TEST_F(SuggestionParserUnitTest, MultipleEntries) {}

// Tests cases where XML parsing is expected to fail.
TEST_F(SuggestionParserUnitTest, ParsingFails) {}

// Tests that XML strings are properly sanitized from any forbidden characters.
TEST_F(SuggestionParserUnitTest, Sanitization) {}

// Tests that unknown tag types and attributes are properly ignored.
TEST_F(SuggestionParserUnitTest, UnknownTagsAndAttributesAreIgnored) {}

}  // namespace extensions