#include "chrome/browser/ui/views/toolbar/toolbar_button.h"
#include <memory>
#include <utility>
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/test/bind.h"
#include "build/build_config.h"
#include "chrome/browser/ui/layout_constants.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/tabs/test_tab_strip_model_delegate.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/views/chrome_views_test_base.h"
#include "components/vector_icons/vector_icons.h"
#include "content/public/test/browser_task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/actions/actions.h"
#include "ui/base/interaction/element_identifier.h"
#include "ui/base/interaction/element_tracker.h"
#include "ui/base/models/image_model.h"
#include "ui/base/models/simple_menu_model.h"
#include "ui/base/pointer/touch_ui_controller.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/menu/menu_runner.h"
#include "ui/views/interaction/element_tracker_views.h"
namespace test {
class ToolbarButtonTestApi { … };
}
namespace {
class CheckActiveWebContentsMenuModel : public ui::SimpleMenuModel { … };
class TestToolbarButton : public ToolbarButton { … };
}
ToolbarButtonViewsTest;
TEST_F(ToolbarButtonViewsTest, NoDefaultLayoutInsets) { … }
TEST_F(ToolbarButtonViewsTest, SetLayoutInsets) { … }
TEST_F(ToolbarButtonViewsTest, MenuDoesNotShowWhenTabStripIsEmpty) { … }
class ToolbarButtonUITest : public ChromeViewsTestBase { … };
TEST_F(ToolbarButtonUITest, ShowMenu) { … }
#if !BUILDFLAG(IS_MAC)
TEST_F(ToolbarButtonUITest, ShowMenuWithIdentifier) { … }
#endif
TEST_F(ToolbarButtonUITest, DeleteWithMenu) { … }
TEST_F(ToolbarButtonUITest, TestBorderUpdateColorChange) { … }
TEST_F(ToolbarButtonUITest, BorderUpdatedOnTouchModeSwitch) { … }
ToolbarButtonActionViewInterfaceTest;
TEST_F(ToolbarButtonActionViewInterfaceTest, TestActionChanged) { … }