#include "ui/views/controls/menu/menu_item_view.h"
#include <memory>
#include <string>
#include <utility>
#include "base/memory/raw_ptr.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/bind.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/accessibility/ax_action_data.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/themed_vector_icon.h"
#include "ui/compositor/canvas_painter.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/strings/grit/ui_strings.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/controls/image_view.h"
#include "ui/views/controls/menu/menu_runner.h"
#include "ui/views/controls/menu/submenu_view.h"
#include "ui/views/controls/menu/test_menu_item_view.h"
#include "ui/views/test/menu_test_utils.h"
#include "ui/views/test/views_test_base.h"
#include "ui/views/vector_icons.h"
#include "ui/views/view_class_properties.h"
#include "ui/views/view_test_api.h"
#include "ui/views/view_utils.h"
namespace views {
MenuItemViewUnitTest;
TEST_F(MenuItemViewUnitTest, AddAndRemoveChildren) { … }
namespace {
class SquareView : public views::View { … };
BEGIN_METADATA(…)
}
TEST_F(MenuItemViewUnitTest, TestMenuItemViewWithFlexibleWidthChild) { … }
TEST_F(MenuItemViewUnitTest, TestEmptyWhenAllItemsAreHidden) { … }
TEST_F(MenuItemViewUnitTest, UseMnemonicOnPlatform) { … }
TEST_F(MenuItemViewUnitTest, NotifiesSelectedChanged) { … }
TEST_F(MenuItemViewUnitTest, AccessibleKeyShortcutsTest) { … }
class TouchableMenuItemViewTest : public ViewsTestBase { … };
TEST_F(TouchableMenuItemViewTest, MinAndMaxWidth) { … }
class MenuItemViewLayoutTest : public ViewsTestBase { … };
TEST_F(MenuItemViewLayoutTest, ContainerLayoutRespectsMarginsAndPreferredSize) { … }
class MenuItemViewPaintUnitTest : public ViewsTestBase { … };
TEST_F(MenuItemViewPaintUnitTest, MinorTextAndIconAssertionCoverage) { … }
TEST_F(MenuItemViewPaintUnitTest, CustomColorAssertionCoverage) { … }
TEST_F(MenuItemViewPaintUnitTest, DontSchedulePaintFromOnPaint) { … }
TEST_F(MenuItemViewPaintUnitTest,
SelectionBasedStateNotUpdatedWhenScheduledForDeletion) { … }
TEST_F(MenuItemViewPaintUnitTest, SelectionBasedStateUpdatedWhenIconChanges) { … }
TEST_F(MenuItemViewPaintUnitTest, SelectionBasedStateUpdatedDuringDragAndDrop) { … }
TEST_F(MenuItemViewPaintUnitTest, AccessibleCheckedStateChange) { … }
class MenuItemViewAccessTest : public MenuItemViewPaintUnitTest { … };
TEST_F(MenuItemViewAccessTest, DontAskForFontsWhenAddingSubmenu) { … }
MenuItemViewA11yTest;
TEST_F(MenuItemViewA11yTest, HandlesExpandCollapseActions) { … }
TEST_F(MenuItemViewA11yTest, AccessibleSelectedTest) { … }
}