chromium/extensions/common/api/commands/commands_manifest_unittest.cc

// Copyright 2012 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/command_line.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "extensions/common/api/commands/commands_handler.h"
#include "extensions/common/features/feature_channel.h"
#include "extensions/common/manifest_constants.h"
#include "extensions/common/manifest_test.h"
#include "extensions/common/warnings_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace extensions {

errors;

CommandsManifestTest;

#if BUILDFLAG(IS_MAC)
constexpr int kControlKey = ui::EF_COMMAND_DOWN;
#else
constexpr int kControlKey =;
#endif

TEST_F(CommandsManifestTest, CommandManifestParseCommandsBrowserAction) {}

TEST_F(CommandsManifestTest, CommandManifestParseCommandsPageAction) {}

TEST_F(CommandsManifestTest, CommandManifestParseCommandsAction) {}

// Tests that when only a custom action command is specified we create a
// default action command for the action type for MV2.
TEST_F(CommandsManifestTest,
       CommandManifestParseCommandsOnlyCustomCommandGetsDefault_MV2) {}

// Tests that when only a custom action command is specified we create a
// default action command for the action type for MV3.
TEST_F(CommandsManifestTest,
       CommandManifestParseCommandsOnlyCustomCommandGetsDefault_MV3) {}

// Tests that only the correct action command (_execute_browser_action) is
// used from the manifest for MV2, but others are ignored and we install a
// warning for the incorrect command. See https://crbug.com/1353210.
TEST_F(CommandsManifestTest,
       CommandManifestIgnoreInvalidActionCommandsAndInstallWarning_MV2) {}

// Tests that only the correct action command (_execute_action) is used
// from the manifest for MV3, but others are ignored and we install a warning
// for the incorrect command. See https://crbug.com/1353210.
TEST_F(CommandsManifestTest,
       CommandManifestIgnoreInvalidActionCommandsAndInstallWarning_MV3) {}

// Tests that when only incorrect action commands are specified we install
// a warning and set a default (for MV2). See https://crbug.com/1353210.
TEST_F(CommandsManifestTest,
       CommandManifestAllInvalidActionCommandsInstallWarning_MV2) {}

// Tests that when only incorrect execute commands are specified we install
// a warning and set a default (for MV3). See https://crbug.com/1353210.
TEST_F(CommandsManifestTest,
       CommandManifestAllInvalidActionCommandsInstallWarning_MV3) {}

TEST_F(CommandsManifestTest, CommandManifestShortcutsTooMany) {}

TEST_F(CommandsManifestTest, CommandManifestManyButWithinBounds) {}

TEST_F(CommandsManifestTest, CommandManifestAllowNumbers) {}

TEST_F(CommandsManifestTest, CommandManifestRejectJustShift) {}

TEST_F(CommandsManifestTest, BrowserActionSynthesizesCommand) {}

// An extension with an action but no extension command specified should get a
// command assigned to it.
TEST_F(CommandsManifestTest, ActionSynthesizesCommand) {}

// This test makes sure that the "commands" feature and the "commands.global"
// property load properly.
TEST_F(CommandsManifestTest, LoadsOnStable) {}

TEST_F(CommandsManifestTest, CommandManifestShouldNotCountMediaKeys) {}

}  // namespace extensions