#include "components/subresource_filter/core/common/indexed_ruleset.h"
#include <memory>
#include <string_view>
#include "base/check.h"
#include "base/strings/utf_string_conversions.h"
#include "components/subresource_filter/core/common/first_party_origin.h"
#include "components/subresource_filter/core/common/load_policy.h"
#include "components/url_pattern_index/proto/rules.pb.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 "url/gurl.h"
#include "url/origin.h"
namespace subresource_filter {
proto;
testing;
MakeUrlRule;
UrlPattern;
class SubresourceFilterIndexedRulesetTest : public ::testing::Test { … };
TEST_F(SubresourceFilterIndexedRulesetTest, EmptyRuleset) { … }
TEST_F(SubresourceFilterIndexedRulesetTest, NoRuleApplies) { … }
TEST_F(SubresourceFilterIndexedRulesetTest, SimpleBlocklist) { … }
TEST_F(SubresourceFilterIndexedRulesetTest, SimpleBlocklistSubdocument) { … }
TEST_F(SubresourceFilterIndexedRulesetTest, SimpleAllowlist) { … }
TEST_F(SubresourceFilterIndexedRulesetTest, SimpleAllowlistSubdocument) { … }
TEST_F(SubresourceFilterIndexedRulesetTest,
SimpleAllowlistWithMatchingBlocklist) { … }
TEST_F(SubresourceFilterIndexedRulesetTest,
SimpleAllowlistWithMatchingBlocklistSubdocument) { … }
TEST_F(SubresourceFilterIndexedRulesetTest, NonAsciiPatterns) { … }
TEST_F(SubresourceFilterIndexedRulesetTest, PercentEncodedPatterns) { … }
TEST_F(SubresourceFilterIndexedRulesetTest, IDNHosts) { … }
TEST_F(SubresourceFilterIndexedRulesetTest, NonAsciiDomain) { … }
TEST_F(SubresourceFilterIndexedRulesetTest, PercentEncodedHostPattern) { … }
TEST_F(SubresourceFilterIndexedRulesetTest, PercentEncodedDomain) { … }
TEST_F(SubresourceFilterIndexedRulesetTest, SimpleBlocklistAndAllowlist) { … }
TEST_F(SubresourceFilterIndexedRulesetTest,
OneBlocklistAndOneDeactivationRule) { … }
TEST_F(SubresourceFilterIndexedRulesetTest, MatchingEmptyRuleset) { … }
TEST_F(SubresourceFilterIndexedRulesetTest, MatchingNoRuleApplies) { … }
TEST_F(SubresourceFilterIndexedRulesetTest, MatchingSimpleBlocklist) { … }
TEST_F(SubresourceFilterIndexedRulesetTest, MatchingSimpleAllowlist) { … }
TEST_F(SubresourceFilterIndexedRulesetTest,
MatchingSimpleBlocklistAndAllowlist) { … }
TEST_F(SubresourceFilterIndexedRulesetTest,
MatchingOneBlocklistAndOneDeactivationRule) { … }
}