chromium/components/permissions/permission_manager_unittest.cc

// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/permissions/permission_manager.h"

#include <memory>

#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/field_trial_params.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/permissions/features.h"
#include "components/permissions/permission_context_base.h"
#include "components/permissions/permission_request_manager.h"
#include "components/permissions/permission_util.h"
#include "components/permissions/test/mock_permission_prompt_factory.h"
#include "components/permissions/test/permission_test_util.h"
#include "components/permissions/test/test_permissions_client.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/permission_request_description.h"
#include "content/public/browser/permission_result.h"
#include "content/public/common/content_client.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/mock_render_process_host.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 "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/permissions/permission_utils.h"
#include "third_party/blink/public/common/permissions_policy/origin_with_possible_wildcards.h"
#include "third_party/blink/public/mojom/permissions_policy/permissions_policy.mojom.h"
#include "url/origin.h"

PermissionType;
PermissionsPolicyFeature;

namespace permissions {
namespace {

class ScopedPartitionedOriginBrowserClient
    : public content::ContentBrowserClient {};

}  // namespace

class PermissionManagerTest : public content::RenderViewHostTestHarness {};

TEST_F(PermissionManagerTest, GetPermissionStatusDefault) {}

TEST_F(PermissionManagerTest, GetPermissionStatusAfterSet) {}

TEST_F(PermissionManagerTest, CheckPermissionResultDefault) {}

TEST_F(PermissionManagerTest, CheckPermissionResultAfterSet) {}

TEST_F(PermissionManagerTest, PermissionIgnoredCleanup) {}

// Check PermissionResult shows requests denied due to insecure
// origins.
TEST_F(PermissionManagerTest, InsecureOrigin) {}

TEST_F(PermissionManagerTest, InsecureOriginIsNotOverridable) {}

TEST_F(PermissionManagerTest, MissingContextIsNotOverridable) {}

TEST_F(PermissionManagerTest, KillSwitchOnIsNotOverridable) {}

TEST_F(PermissionManagerTest, ResetPermission) {}

TEST_F(PermissionManagerTest, GetPermissionStatusDelegation) {}

TEST_F(PermissionManagerTest, GetCanonicalOrigin) {}

TEST_F(PermissionManagerTest, RequestPermissionInDifferentStoragePartition) {}

TEST_F(PermissionManagerTest, UpdatePermissionStatusWithDeviceStatus) {}

TEST_F(PermissionManagerTest,
       GetPermissionContextForNotAddedPermissionContext) {}

}  // namespace permissions