chromium/chrome/common/extensions/manifest_tests/permissions_parser_unittest.cc

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

#include "extensions/common/manifest_handlers/permissions_parser.h"

#include "base/containers/contains.h"
#include "base/strings/stringprintf.h"
#include "base/test/values_test_util.h"
#include "chrome/common/extensions/manifest_tests/chrome_manifest_test.h"
#include "extensions/common/error_utils.h"
#include "extensions/common/extension.h"
#include "extensions/common/manifest_constants.h"
#include "extensions/common/mojom/api_permission_id.mojom.h"
#include "extensions/common/permissions/permissions_data.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace extensions {

PermissionsParserTest;

TEST_F(PermissionsParserTest, RemoveOverlappingAPIPermissions) {}

TEST_F(PermissionsParserTest, RemoveOverlappingHostPermissions) {}

// Same as the above test, except host permissions are specified in
// `host_permissions` and `optional_host_permissions` as the extension is
// running Manifest V3.
TEST_F(PermissionsParserTest, RemoveOverlappingHostPermissions_ManifestV3) {}

TEST_F(PermissionsParserTest, RequiredHostPermissionsAllURLs) {}

TEST_F(PermissionsParserTest, OptionalHostPermissionsAllURLs) {}

TEST_F(PermissionsParserTest, OptionalHostPermissionsInvalidScheme) {}

TEST_F(PermissionsParserTest, HostPermissionsKey) {}

TEST_F(PermissionsParserTest, HostPermissionsKeyInvalidHosts) {}

TEST_F(PermissionsParserTest, HostPermissionsKeyInvalidScheme) {}

// Tests that listing a permissions as optional when that permission cannot be
// optional produces a warning and doesn't add the permission.
TEST_F(PermissionsParserTest, UnsupportedOptionalPermissionWarning) {}

// Test that chrome://favicon is a supported permission in MV2, but not MV3.
TEST_F(PermissionsParserTest, ChromeFavicon) {}

TEST_F(PermissionsParserTest, InternalPermissionsAreNotAllowedInTheManifest) {}

}  // namespace extensions