#include "content/browser/permissions/permission_controller_impl.h"
#include <cstdlib>
#include <memory>
#include "base/memory/ptr_util.h"
#include "base/test/mock_callback.h"
#include "content/public/browser/permission_controller.h"
#include "content/public/browser/permission_controller_delegate.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/mock_permission_manager.h"
#include "content/public/test/navigation_simulator.h"
#include "content/public/test/test_browser_context.h"
#include "content/public/test/test_renderer_host.h"
#include "content/public/test/web_contents_tester.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/permissions/permission_utils.h"
#include "url/origin.h"
PermissionType;
namespace content {
namespace {
Unused;
OverrideStatus;
RequestsCallback;
constexpr char kTestUrl[] = …;
class MockManagerWithRequests : public MockPermissionManager { … };
class TestPermissionManager : public MockPermissionManager { … };
const struct { … } kTestPermissionRequestCases[] = …;
}
class PermissionControllerImplTest : public ::testing::Test { … };
TEST_F(PermissionControllerImplTest,
RequestPermissionsFromCurrentDocumentDelegatesIffMissingOverrides) { … }
TEST_F(PermissionControllerImplTest,
RequestPermissionsDelegatesIffMissingOverrides) { … }
TEST_F(PermissionControllerImplTest,
NotifyChangedSubscriptionsCallsOnChangeOnly) { … }
TEST_F(PermissionControllerImplTest,
PermissionsCannotBeOverriddenIfNotOverridable) { … }
TEST_F(PermissionControllerImplTest,
GrantPermissionsReturnsStatusesBeingSetIfOverridable) { … }
class PermissionControllerImplWithDelegateTest
: public content::RenderViewHostTestHarness { … };
#if !BUILDFLAG(IS_ANDROID)
TEST_F(PermissionControllerImplWithDelegateTest, PermissionPolicyTest) { … }
#endif
}