#include <optional>
#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "base/test/scoped_feature_list.h"
#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings_types.h"
#include "components/permissions/permission_context_base.h"
#include "components/permissions/permissions_client.h"
#include "components/permissions/test/mock_permission_prompt_factory.h"
#include "components/permissions/test/mock_permission_request.h"
#include "components/permissions/test/permission_test_util.h"
#include "components/permissions/test/test_permissions_client.h"
#include "content/public/browser/permission_controller_delegate.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/test/navigation_simulator.h"
#include "content/public/test/render_frame_host_test_support.h"
#include "content/public/test/test_browser_context.h"
#include "content/public/test/test_renderer_host.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/permissions_policy/origin_with_possible_wildcards.h"
#include "third_party/blink/public/mojom/permissions/permission.mojom.h"
#include "url/gurl.h"
namespace permissions {
namespace {
EmbeddedPermissionRequestDescriptor;
EmbeddedPermissionRequestDescriptorPtr;
PermissionDescriptor;
PermissionDescriptorPtr;
PermissionName;
}
class PEPCInitiatedPermissionRequestTest
: public content::RenderViewHostTestHarness { … };
TEST_F(PEPCInitiatedPermissionRequestTest, PEPCRequestWhenSettingAllowed) { … }
TEST_F(PEPCInitiatedPermissionRequestTest, PEPCRequestWhenSettingBlocked) { … }
TEST_F(PEPCInitiatedPermissionRequestTest, PEPCRequestBlockedInFencedFrame) { … }
TEST_F(PEPCInitiatedPermissionRequestTest,
PEPCRequestAllowedWithFeaturePolicy) { … }
TEST_F(PEPCInitiatedPermissionRequestTest,
PEPCRequestBlockedWithoutFeaturePolicy) { … }
TEST_F(PEPCInitiatedPermissionRequestTest, PEPCRequestBlockedByKillSwitch) { … }
TEST_F(PEPCInitiatedPermissionRequestTest, PEPCRequestBlockedOnInsecureOrigin) { … }
}