#include "components/url_pattern_index/url_rule_util.h"
#include <cmath>
#include <string>
#include <utility>
#include <vector>
#include "components/url_pattern_index/flat/url_pattern_index_generated.h"
#include "components/url_pattern_index/url_pattern.h"
#include "components/url_pattern_index/url_pattern_index.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 url_pattern_index {
namespace {
proto::UrlRule MakeProtoRule(proto::RuleSemantics semantics,
const UrlPattern& url_pattern,
proto::SourceType source_type,
proto::ElementType types,
const std::vector<std::string>& domains) { … }
struct RuleTest { … };
class UrlRuleUtilTest : public ::testing::Test { … };
TEST_F(UrlRuleUtilTest, Blocklist) { … }
TEST_F(UrlRuleUtilTest, Allowlist) { … }
TEST_F(UrlRuleUtilTest, LeftAnchor) { … }
TEST_F(UrlRuleUtilTest, RightAnchor) { … }
TEST_F(UrlRuleUtilTest, BothSidesAnchored) { … }
TEST_F(UrlRuleUtilTest, NonRegex) { … }
TEST_F(UrlRuleUtilTest, Party) { … }
TEST_F(UrlRuleUtilTest, MultipleOptions) { … }
TEST_F(UrlRuleUtilTest, ElementType) { … }
TEST_F(UrlRuleUtilTest, ActivationType) { … }
TEST_F(UrlRuleUtilTest, DomainList) { … }
TEST_F(UrlRuleUtilTest, IgnoredTypes) { … }
}
}