chromium/components/url_rewrite/browser/url_request_rewrite_rules_validation_unittest.cc

// Copyright 2021 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/url_rewrite/browser/url_request_rewrite_rules_validation.h"

#include <string_view>

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

namespace url_rewrite {
namespace {

mojom::UrlRequestActionPtr CreateRewriteAddHeaders(
    std::string_view header_name,
    std::string_view header_value) {}

mojom::UrlRequestActionPtr CreateRewriteRemoveHeader(
    std::optional<std::string_view> query_pattern,
    std::string_view header_name) {}

mojom::UrlRequestActionPtr CreateRewriteSubstituteQueryPattern(
    std::string_view pattern,
    std::string_view substitution) {}

mojom::UrlRequestActionPtr CreateRewriteReplaceUrl(
    std::string_view url_ends_with,
    std::string_view new_url) {}

mojom::UrlRequestActionPtr CreateRewriteAppendToQuery(std::string_view query) {}

bool ValidateRulesFromAction(mojom::UrlRequestActionPtr action) {}

}  // namespace

// Tests AddHeaders rewrites are properly converted to their Mojo equivalent.
TEST(UrlRequestRewriteRulesValidationTest, ValidateAddHeaders) {}

// Tests RemoveHeader rewrites are properly converted to their Mojo equivalent.
TEST(UrlRequestRewriteRulesValidationTest, ValidateRemoveHeader) {}

// Tests SubstituteQueryPattern rewrites are properly converted to their Mojo
// equivalent.
TEST(UrlRequestRewriteRulesValidationTest, ValidateSubstituteQueryPattern) {}

// Tests ReplaceUrl rewrites are properly converted to their Mojo equivalent.
TEST(UrlRequestRewriteRulesValidationTest, ValidateReplaceUrl) {}

// Tests AppendToQuery rewrites are properly converted to their Mojo equivalent.
TEST(UrlRequestRewriteRulesValidationTest, ValidateAppendToQuery) {}

// Tests validation is working as expected.
TEST(UrlRequestRewriteRulesValidationTest, ValidateNullAction) {}

TEST(UrlRequestRewriteRulesValidationTest, ValidateNullRules) {}

}  // namespace url_rewrite