chromium/services/data_decoder/xml_parser_unittest.cc

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

#include <memory>

#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/test/values_test_util.h"
#include "services/data_decoder/xml_parser.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace data_decoder {

namespace {

void TestParseXmlCallback(std::unique_ptr<base::Value>* value_out,
                          std::optional<std::string>* error_out,
                          std::optional<base::Value> value,
                          const std::optional<std::string>& error) {}

// Parses the passed in |xml| and compares the result to |json|.
// If |json| is empty, the parsing is expected to fail.
void TestParseXml(const std::string& xml,
                  const std::string& json,
                  const std::string& expected_error = "",
                  mojom::XmlParser::WhitespaceBehavior whitespace_behavior =
                      mojom::XmlParser::WhitespaceBehavior::kIgnore) {}

}  // namespace

XmlParserTest;

TEST_F(XmlParserTest, ParseBadXml) {}

TEST_F(XmlParserTest, IgnoreComments) {}

TEST_F(XmlParserTest, IgnoreProcessingCommands) {}

TEST_F(XmlParserTest, IgnoreDocumentTypes) {}

TEST_F(XmlParserTest, ParseSelfClosingTag) {}

TEST_F(XmlParserTest, ParseEmptyTag) {}

TEST_F(XmlParserTest, ParseBadTag) {}

TEST_F(XmlParserTest, ParseTextElement) {}

TEST_F(XmlParserTest, ParseBadTextElement) {}

TEST_F(XmlParserTest, ParseCDataElement) {}

TEST_F(XmlParserTest, ParseBadCDataElement) {}

TEST_F(XmlParserTest, ParseTextWithEntities) {}

TEST_F(XmlParserTest, ParseMultipleSimilarTextElement) {}

TEST_F(XmlParserTest, ParseMixMatchTextNonTextElement) {}

TEST_F(XmlParserTest, ParseElementsInText) {}

TEST_F(XmlParserTest, ParseNestedXml) {}

TEST_F(XmlParserTest, ParseMultipleSimilarElements) {}

TEST_F(XmlParserTest, LargeNumber) {}

TEST_F(XmlParserTest, JsonInjection) {}

TEST_F(XmlParserTest, ParseAttributes) {}

TEST_F(XmlParserTest, ParseBadAttributes) {}

TEST_F(XmlParserTest, MultipleNamespacesDefined) {}

TEST_F(XmlParserTest, NamespacesUsed) {}

TEST_F(XmlParserTest, WhitespaceBehavior) {}

TEST_F(XmlParserTest, ParseTypicalXml) {}

}  // namespace data_decoder