#include "components/subresource_filter/core/common/unindexed_ruleset.h"
#include <memory>
#include <string>
#include <vector>
#include "base/numerics/safe_conversions.h"
#include "base/strings/string_number_conversions.h"
#include "components/url_pattern_index/url_pattern.h"
#include "components/url_pattern_index/url_rule_test_support.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/protobuf/src/google/protobuf/io/zero_copy_stream.h"
#include "third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h"
namespace subresource_filter {
namespace {
proto;
testing;
UrlPattern;
bool IsEqual(const proto::UrlRule& lhs, const proto::UrlRule& rhs) { … }
class UnindexedRulesetTestBuilder { … };
bool IsRulesetValid(const std::string& ruleset_contents,
const std::vector<proto::UrlRule>& expected_url_rules) { … }
}
TEST(UnindexedRulesetTest, EmptyRuleset) { … }
TEST(UnindexedRulesetTest, OneUrlRule) { … }
TEST(UnindexedRulesetTest, ManyUrlRules) { … }
TEST(UnindexedRulesetTest, ExactlyMaxRulesPerChunk) { … }
TEST(UnindexedRulesetTest, MaxRulesPerChunkPlusOne) { … }
TEST(UnindexedRulesetTest, ErrorOnWrite) { … }
TEST(UnindexedRulesetTest, ReadCorruptedInput) { … }
}