chromium/components/subresource_filter/tools/ruleset_converter/rule_stream_unittest.cc

// 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.

#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 {

// Returns a small number of predefined rules in text format.
std::vector<std::string> GetSomeRules() {}

// Returns some rules which Chrome doesn't support fully or partially, mixed
// with a couple of supported rules, or otherwise weird ones.
std::vector<std::string> GetSomeChromeUnfriendlyRules() {}

// Generates and returns many rules in text format.
std::vector<std::string> GetManyRules() {}

// Reads the provided |ruleset_file| skipping every second rule (independently
// for URL and CSS rules), and EXPECTs that it contains exactly all the rules
// from |expected_contents| in the same order.
void ReadHalfRulesOfTestRulesetAndExpectContents(
    const ScopedTempRulesetFile& ruleset_file,
    const TestRulesetContents& expected_contents) {}

}  // namespace

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) {}

}  // namespace subresource_filter