#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/subresource_filter/core/browser/async_document_subresource_filter.h"
#include <memory>
#include <vector>
#include "base/check.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "base/test/test_simple_task_runner.h"
#include "components/subresource_filter/core/browser/async_document_subresource_filter_test_utils.h"
#include "components/subresource_filter/core/common/constants.h"
#include "components/subresource_filter/core/common/load_policy.h"
#include "components/subresource_filter/core/common/memory_mapped_ruleset.h"
#include "components/subresource_filter/core/common/test_ruleset_creator.h"
#include "components/subresource_filter/core/common/test_ruleset_utils.h"
#include "components/url_pattern_index/proto/rules.pb.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace subresource_filter {
proto;
class AsyncDocumentSubresourceFilterTest : public ::testing::Test { … };
namespace {
class TestCallbackReceiver { … };
class LoadPolicyCallbackReceiver { … };
class MultiLoadPolicyCallbackReceiver { … };
}
TEST_F(AsyncDocumentSubresourceFilterTest, ActivationStateIsReported) { … }
TEST_F(AsyncDocumentSubresourceFilterTest, DeleteFilter_NoActivationCallback) { … }
TEST_F(AsyncDocumentSubresourceFilterTest, ActivationStateIsComputedCorrectly) { … }
TEST_F(AsyncDocumentSubresourceFilterTest, DisabledForCorruptRuleset) { … }
TEST_F(AsyncDocumentSubresourceFilterTest, GetLoadPolicyForSubdocument) { … }
TEST_F(AsyncDocumentSubresourceFilterTest, GetLoadPolicyForSubdocumentURLs) { … }
TEST_F(AsyncDocumentSubresourceFilterTest, FirstDisallowedLoadIsReported) { … }
TEST_F(AsyncDocumentSubresourceFilterTest, UpdateActivationState) { … }
TEST_F(AsyncDocumentSubresourceFilterTest,
ActivationStateProvided_ActivationStateImmediatelyAvailable) { … }
class SubresourceFilterComputeActivationStateTest : public ::testing::Test { … };
TEST_F(SubresourceFilterComputeActivationStateTest,
ActivationBitsCorrectlyPropagateToChildDocument) { … }
}