chromium/components/subresource_filter/tools/ruleset_converter/ruleset_test_util.h

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

#ifndef COMPONENTS_SUBRESOURCE_FILTER_TOOLS_RULESET_CONVERTER_RULESET_TEST_UTIL_H_
#define COMPONENTS_SUBRESOURCE_FILTER_TOOLS_RULESET_CONVERTER_RULESET_TEST_UTIL_H_

#include <memory>
#include <ostream>
#include <string>
#include <vector>

#include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
#include "components/subresource_filter/tools/ruleset_converter/rule_stream.h"
#include "components/subresource_filter/tools/ruleset_converter/ruleset_format.h"
#include "components/url_pattern_index/proto/rules.pb.h"

namespace subresource_filter {

// Stores lists of the rules that a test ruleset consists of.
struct TestRulesetContents {};
std::ostream& operator<<(std::ostream& out,
                         const TestRulesetContents& contents);

// Stores identification information about a temporary File with a ruleset.
// Deletes the file automatically on destruction.
class ScopedTempRulesetFile {};

bool AreUrlRulesEqual(const url_pattern_index::proto::UrlRule& first,
                      const url_pattern_index::proto::UrlRule& second);

bool AreCssRulesEqual(const url_pattern_index::proto::CssRule& first,
                      const url_pattern_index::proto::CssRule& second);

}  // namespace subresource_filter

#endif  // COMPONENTS_SUBRESOURCE_FILTER_TOOLS_RULESET_CONVERTER_RULESET_TEST_UTIL_H_