chromium/chrome/browser/permissions/permission_context_base_permissions_policy_unittest.cc

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

#include "base/functional/bind.h"
#include "build/build_config.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/notifications/notification_permission_context.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/testing_profile.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/permissions/contexts/geolocation_permission_context.h"
#include "components/permissions/contexts/midi_permission_context.h"
#include "components/permissions/permission_request_id.h"
#include "components/permissions/permission_util.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/navigation_simulator.h"
#include "content/public/test/test_renderer_host.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/common/permissions_policy/permissions_policy.h"
#include "third_party/blink/public/mojom/permissions_policy/permissions_policy.mojom.h"
#include "url/gurl.h"
#include "url/origin.h"

#if BUILDFLAG(IS_ANDROID)
#include "chrome/browser/geolocation/geolocation_permission_context_delegate_android.h"
#else
#include "chrome/browser/geolocation/geolocation_permission_context_delegate.h"
#endif

// Integration tests for querying permissions that have a permissions policy
// set. These tests are not meant to cover every edge case as the
// PermissionsPolicy class itself is tested thoroughly in
// permissions_policy_unittest.cc and in
// render_frame_host_permissions_policy_unittest.cc. Instead they are meant to
// ensure that integration with content::PermissionContextBase works correctly.
class PermissionContextBasePermissionsPolicyTest
    : public ChromeRenderViewHostTestHarness {};

TEST_F(PermissionContextBasePermissionsPolicyTest, DefaultPolicy) {}

TEST_F(PermissionContextBasePermissionsPolicyTest,
       DefaultPolicyBlockMidiByDefault) {}

TEST_F(PermissionContextBasePermissionsPolicyTest, DisabledTopLevelFrame) {}

TEST_F(PermissionContextBasePermissionsPolicyTest, EnabledForChildFrame) {}

TEST_F(PermissionContextBasePermissionsPolicyTest,
       EnabledForChildFrameBlockMidiByDefault) {}

TEST_F(PermissionContextBasePermissionsPolicyTest, RequestPermission) {}