| Index: components/subresource_filter/core/common/test_ruleset_creator.cc
|
| diff --git a/components/subresource_filter/core/common/test_ruleset_creator.cc b/components/subresource_filter/core/common/test_ruleset_creator.cc
|
| index d87cf1b408d46e0df12ebd37242485b23e992ca4..408a9845353bd54169d0c3b7eecb79194494d173 100644
|
| --- a/components/subresource_filter/core/common/test_ruleset_creator.cc
|
| +++ b/components/subresource_filter/core/common/test_ruleset_creator.cc
|
| @@ -45,11 +45,6 @@ std::vector<uint8_t> SerializeUnindexedRulesetWithMultipleRules(
|
| return std::vector<uint8_t>(data, data + ruleset_contents.size());
|
| }
|
|
|
| -std::vector<uint8_t> SerializeUnindexedRulesetWithSingleRule(
|
| - const proto::UrlRule& rule) {
|
| - return SerializeUnindexedRulesetWithMultipleRules({rule});
|
| -}
|
| -
|
| std::vector<uint8_t> SerializeIndexedRulesetWithMultipleRules(
|
| const std::vector<proto::UrlRule>& rules) {
|
| RulesetIndexer indexer;
|
| @@ -126,9 +121,8 @@ void TestRulesetCreator::CreateUnindexedRulesetToDisallowURLsWithPathSuffix(
|
| TestRuleset* test_unindexed_ruleset) {
|
| DCHECK(test_unindexed_ruleset);
|
| proto::UrlRule suffix_rule = CreateSuffixRule(suffix);
|
| - ASSERT_NO_FATAL_FAILURE(CreateTestRulesetFromContents(
|
| - SerializeUnindexedRulesetWithSingleRule(suffix_rule),
|
| - test_unindexed_ruleset));
|
| + ASSERT_NO_FATAL_FAILURE(
|
| + CreateUnindexedRulesetWithRules({suffix_rule}, test_unindexed_ruleset));
|
| }
|
|
|
| void TestRulesetCreator::CreateRulesetToDisallowURLsWithManySuffixes(
|
| @@ -157,6 +151,14 @@ void TestRulesetCreator::CreateRulesetWithRules(
|
| &test_ruleset_pair->indexed));
|
| }
|
|
|
| +void TestRulesetCreator::CreateUnindexedRulesetWithRules(
|
| + const std::vector<proto::UrlRule>& rules,
|
| + TestRuleset* test_unindexed_ruleset) {
|
| + ASSERT_NO_FATAL_FAILURE(CreateTestRulesetFromContents(
|
| + SerializeUnindexedRulesetWithMultipleRules(rules),
|
| + test_unindexed_ruleset));
|
| +}
|
| +
|
| void TestRulesetCreator::GetUniqueTemporaryPath(base::FilePath* path) {
|
| DCHECK(path);
|
| ASSERT_TRUE(scoped_temp_dir_.IsValid() ||
|
|
|