#include "chrome/browser/ui/views/toolbar/toolbar_controller.h"
#include <gtest/gtest.h>
#include "base/memory/raw_ptr.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/toolbar/overflow_button.h"
#include "chrome/browser/ui/views/toolbar/pinned_toolbar_button_status_indicator.h"
#include "chrome/test/views/chrome_views_test_base.h"
#include "components/vector_icons/vector_icons.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "ui/actions/actions.h"
#include "ui/base/models/simple_menu_model.h"
#include "ui/events/test/event_generator.h"
#include "ui/gfx/geometry/size.h"
#include "ui/views/controls/menu/menu_item_view.h"
#include "ui/views/controls/menu/submenu_view.h"
#include "ui/views/interaction/element_tracker_views.h"
#include "ui/views/layout/fill_layout.h"
#include "ui/views/layout/flex_layout.h"
#include "ui/views/layout/flex_layout_types.h"
#include "ui/views/test/views_test_base.h"
#include "ui/views/test/views_test_utils.h"
#include "ui/views/view_class_properties.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_utils.h"
namespace {
constexpr gfx::Size kButtonSize(34, 34);
DEFINE_LOCAL_ELEMENT_IDENTIFIER_VALUE(…);
DEFINE_LOCAL_ELEMENT_IDENTIFIER_VALUE(…);
DEFINE_LOCAL_ELEMENT_IDENTIFIER_VALUE(…);
DEFINE_LOCAL_ELEMENT_IDENTIFIER_VALUE(…);
DEFINE_LOCAL_ELEMENT_IDENTIFIER_VALUE(…);
DEFINE_LOCAL_ELEMENT_IDENTIFIER_VALUE(…);
class TestDelegate : public ToolbarController::PinnedActionsDelegate { … };
class MockToolbarController : public ToolbarController { … };
class PopOutHandlerTest : public ChromeViewsTestBase { … };
TEST_F(PopOutHandlerTest, PopOutAndEndPopOut) { … }
constexpr int kElementFlexOrderStart = …;
}
class TestToolbarController : public ToolbarController { … };
class ToolbarControllerUnitTest : public ChromeViewsTestBase { … };
TEST_F(ToolbarControllerUnitTest, OverflowButtonVisibility) { … }
TEST_F(ToolbarControllerUnitTest, OverflowedButtonsMatchMenu) { … }
TEST_F(ToolbarControllerUnitTest, RunningMenuAddsStatusIndicator) { … }
TEST_F(ToolbarControllerUnitTest, MenuSeparator) { … }
TEST_F(ToolbarControllerUnitTest, InValidFirstSectionAddsNoLeadingSeparator) { … }
TEST_F(ToolbarControllerUnitTest, InValidSectionInMiddleAddsNoExtraSeparator) { … }
TEST_F(ToolbarControllerUnitTest, InValidLastSectionAddsNoTrailingSeparator) { … }
TEST_F(ToolbarControllerUnitTest, PopOutState) { … }
TEST_F(ToolbarControllerUnitTest, PopOutButton) { … }
TEST_F(ToolbarControllerUnitTest, ButtonsOverflowRightToLeftInContainer) { … }
TEST_F(ToolbarControllerUnitTest, ButtonsOverflowLeftToRightInContainer) { … }
TEST_F(ToolbarControllerUnitTest, MenuItemUsability) { … }
TEST_F(ToolbarControllerUnitTest, SupportActionIds) { … }
TEST_F(ToolbarControllerUnitTest, StatusIndicatorVisibilityUpdates) { … }