chromium/components/link_header_util/link_header_util_unittest.cc

// Copyright 2016 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/link_header_util/link_header_util.h"

#include "base/run_loop.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace link_header_util {

namespace {

void SplitLinkHeaderForTesting(const std::string& header,
                               std::vector<std::string>* values) {}

bool ParseLinkHeaderValueForTesting(
    std::string value,
    std::string* url,
    std::unordered_map<std::string, std::optional<std::string>>* params) {}

TEST(LinkHeaderTest, SplitEmpty) {}

TEST(LinkHeaderTest, SplitSimple) {}

TEST(LinkHeaderTest, SplitSkipsEmpty) {}

TEST(LinkHeaderTest, SplitQuotes) {}

TEST(LinkHeaderTest, SplitEscapedQuotes) {}

struct SimpleParseTestData {};

void PrintTo(const SimpleParseTestData& test, std::ostream* os) {}

class SimpleParseTest : public ::testing::TestWithParam<SimpleParseTestData> {};

TEST_P(SimpleParseTest, Simple) {}

// Test data mostly copied from blink::LinkHeaderTest. Expectations for a small
// subset of test cases are different though. Mostly because blink::LinkHeader
// factors in knowledge about semantics of Link headers (parameters that are
// required to have a value if they occur, some parameters are auto-lower-cased,
// headers with an "anchor" parameter are rejected by base::LinkHeader).
// The code this tests purely parses without actually interpreting the data, as
// it is expected that another layer on top will do more specific validations.
const SimpleParseTestData simple_parse_tests[] =;

INSTANTIATE_TEST_SUITE_P();

}  // namespace

}  // namespace link_header_util