#include "components/subresource_filter/tools/ruleset_converter/rule_stream.h"
#include <algorithm>
#include <memory>
#include <string>
#include <vector>
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "components/subresource_filter/tools/rule_parser/rule_parser.h"
#include "components/subresource_filter/tools/ruleset_converter/ruleset_test_util.h"
#include "components/url_pattern_index/proto/rules.pb.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace subresource_filter {
namespace {
std::vector<std::string> GetSomeRules() { … }
std::vector<std::string> GetSomeChromeUnfriendlyRules() { … }
std::vector<std::string> GetManyRules() { … }
void ReadHalfRulesOfTestRulesetAndExpectContents(
const ScopedTempRulesetFile& ruleset_file,
const TestRulesetContents& expected_contents) { … }
}
TEST(RuleStreamTest, WriteAndReadRuleset) { … }
TEST(RuleStreamTest, WriteAndReadHalfRuleset) { … }
TEST(RuleStreamTest, TransferAllRulesToSameStream) { … }
TEST(RuleStreamTest, TransferUrlRulesToOneStream) { … }
TEST(RuleStreamTest, TransferCssRulesToOneStream) { … }
TEST(RuleStreamTest, TransferAllRulesToDifferentStreams) { … }
TEST(RuleStreamTest, TransferRulesAndDiscardRegexpRules) { … }
TEST(RuleStreamTest, TransferRulesChromeVersion) { … }
TEST(RuleStreamTest, TransferRulesFromFilterListWithUnsupportedOptions) { … }
TEST(RuleStreamTest, DeleteUrlRuleOrAmend) { … }
}