#include "chrome/browser/component_updater/subresource_filter_component_installer.h"
#include <map>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/memory/raw_ptr.h"
#include "base/metrics/field_trial.h"
#include "base/run_loop.h"
#include "base/strings/string_util.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/scoped_feature_list.h"
#include "base/values.h"
#include "base/version.h"
#include "chrome/test/base/testing_browser_process.h"
#include "components/component_updater/mock_component_updater_service.h"
#include "components/prefs/testing_pref_service.h"
#include "components/subresource_filter/content/browser/safe_browsing_ruleset_publisher.h"
#include "components/subresource_filter/content/shared/browser/ruleset_publisher.h"
#include "components/subresource_filter/content/shared/browser/ruleset_service.h"
#include "components/subresource_filter/core/browser/subresource_filter_features.h"
#include "components/subresource_filter/core/browser/subresource_filter_features_test_support.h"
#include "components/subresource_filter/core/common/constants.h"
#include "content/public/test/browser_task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
namespace {
constexpr char kTestRulesetVersion[] = …;
class TestRulesetService : public subresource_filter::RulesetService { … };
class SubresourceFilterMockComponentUpdateService
: public component_updater::MockComponentUpdateService { … };
subresource_filter::Configuration CreateConfigUsingRulesetFlavor(
const std::string& ruleset_flavor) { … }
}
namespace component_updater {
class SubresourceFilterComponentInstallerTest : public PlatformTest { … };
TEST_F(SubresourceFilterComponentInstallerTest,
TestComponentRegistrationWhenFeatureDisabled) { … }
TEST_F(SubresourceFilterComponentInstallerTest,
TestComponentRegistrationWhenFeatureEnabled) { … }
TEST_F(SubresourceFilterComponentInstallerTest, LoadEmptyRuleset) { … }
TEST_F(SubresourceFilterComponentInstallerTest, FutureVersionIgnored) { … }
TEST_F(SubresourceFilterComponentInstallerTest, LoadFileWithData) { … }
TEST_F(SubresourceFilterComponentInstallerTest, InstallerTag) { … }
TEST_F(SubresourceFilterComponentInstallerTest, InstallerAttributesDefault) { … }
TEST_F(SubresourceFilterComponentInstallerTest, InstallerAttributesCustomTag) { … }
}