#include "extensions/browser/api/declarative_net_request/ruleset_manager.h"
#include <optional>
#include <string_view>
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/test/metrics/histogram_tester.h"
#include "chrome/browser/extensions/api/declarative_net_request/dnr_test_base.h"
#include "chrome/browser/extensions/chrome_test_extension_loader.h"
#include "chrome/browser/extensions/extension_util.h"
#include "components/version_info/channel.h"
#include "extensions/browser/api/declarative_net_request/composite_matcher.h"
#include "extensions/browser/api/declarative_net_request/file_backed_ruleset_source.h"
#include "extensions/browser/api/declarative_net_request/prefs_helper.h"
#include "extensions/browser/api/declarative_net_request/request_action.h"
#include "extensions/browser/api/declarative_net_request/ruleset_matcher.h"
#include "extensions/browser/api/declarative_net_request/test_utils.h"
#include "extensions/browser/api/web_request/web_request_info.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/extension_util.h"
#include "extensions/common/api/declarative_net_request.h"
#include "extensions/common/api/declarative_net_request/constants.h"
#include "extensions/common/api/declarative_net_request/test_utils.h"
#include "extensions/common/extension_features.h"
#include "extensions/common/features/feature_channel.h"
#include "extensions/common/file_util.h"
#include "extensions/common/manifest_handlers/background_info.h"
#include "extensions/common/url_pattern.h"
#include "net/http/http_request_headers.h"
#include "net/http/http_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
#include "url/origin.h"
namespace extensions::declarative_net_request {
dnr_api;
namespace {
class RulesetManagerTest : public DNRTestBase { … };
TEST_P(RulesetManagerTest, MultipleRulesets) { … }
TEST_P(RulesetManagerTest, IncognitoRequests) { … }
TEST_P(RulesetManagerTest, EvaluationHistograms) { … }
TEST_P(RulesetManagerTest, Redirect) { … }
TEST_P(RulesetManagerTest, ExtensionScheme) { … }
TEST_P(RulesetManagerTest, ModifyHeaders) { … }
TEST_P(RulesetManagerTest, ModifyHeadersWithAllowRules) { … }
TEST_P(RulesetManagerTest, ModifyHeaders_HostPermissions) { … }
TEST_P(RulesetManagerTest, HostPermissionForInitiator) { … }
class RulesetManagerResponseHeadersTest : public RulesetManagerTest { … };
TEST_P(RulesetManagerResponseHeadersTest, MergeModifyHeaderActions) { … }
TEST_P(RulesetManagerTest, CrossExtensionRequestBlocking) { … }
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
}
}