#include "chrome/browser/extensions/menu_manager.h"
#include <memory>
#include <utility>
#include <vector>
#include "base/files/scoped_temp_dir.h"
#include "base/functional/bind.h"
#include "base/json/json_reader.h"
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/single_thread_task_runner.h"
#include "base/values.h"
#include "chrome/browser/extensions/extension_menu_icon_loader.h"
#include "chrome/browser/extensions/extension_system_factory.h"
#include "chrome/browser/extensions/menu_manager_test_observer.h"
#include "chrome/browser/extensions/test_extension_menu_icon_loader.h"
#include "chrome/browser/extensions/test_extension_prefs.h"
#include "chrome/browser/extensions/test_extension_system.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/extensions/api/context_menus.h"
#include "chrome/test/base/testing_profile.h"
#include "components/prefs/pref_service.h"
#include "components/sync_preferences/pref_service_syncable.h"
#include "content/public/browser/context_menu_params.h"
#include "content/public/test/browser_task_environment.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/event_router_factory.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/state_store.h"
#include "extensions/browser/state_store_test_observer.h"
#include "extensions/common/extension.h"
#include "extensions/common/manifest_constants.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/context_menu/context_menu.mojom.h"
_;
AtLeast;
DeleteArg;
InSequence;
Return;
SaveArg;
namespace extensions {
context_menus;
class MenuManagerTest : public testing::Test { … };
TEST_F(MenuManagerTest, AddGetRemoveItems) { … }
TEST_F(MenuManagerTest, AddGetRemoveItemsNoExtension) { … }
TEST_F(MenuManagerTest, ChildFunctions) { … }
TEST_F(MenuManagerTest, PopulateFromValue) { … }
TEST_F(MenuManagerTest, DeleteParent) { … }
TEST_F(MenuManagerTest, ChangeParent) { … }
TEST_F(MenuManagerTest, ExtensionUnloadRemovesMenuItems) { … }
namespace {
class MockEventRouter : public EventRouter { … };
std::unique_ptr<KeyedService> MockEventRouterFactoryFunction(
content::BrowserContext* context) { … }
}
TEST_F(MenuManagerTest, RemoveAll) { … }
TEST_F(MenuManagerTest, RemoveOneByOne) { … }
TEST_F(MenuManagerTest, ExecuteCommand) { … }
TEST_F(MenuManagerTest, SanitizeRadioButtons) { … }
TEST_F(MenuManagerTest, SanitizeContextMenuWithMultipleRadioLists) { … }
TEST_F(MenuManagerTest, RemoveAllIncognito) { … }
TEST_F(MenuManagerTest, SetMenuIconLoader) { … }
enum class ContextType { … };
class MenuManagerStorageTest : public MenuManagerTest,
public testing::WithParamInterface<ContextType> { … };
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(MenuManagerStorageTest, WriteToAndReadFromStorage) { … }
}