#include "chrome/browser/ui/views/toolbar/toolbar_action_view.h"
#include <memory>
#include <string>
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "chrome/browser/sessions/session_tab_helper_factory.h"
#include "chrome/browser/ui/toolbar/test_toolbar_action_view_controller.h"
#include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/views/chrome_views_test_base.h"
#include "content/public/test/test_web_contents_factory.h"
#include "ui/accessibility/ax_enums.mojom.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/base/dragdrop/drag_drop_types.h"
#include "ui/events/test/event_generator.h"
#include "ui/views/controls/button/menu_button.h"
namespace {
class TestToolbarActionViewDelegate : public ToolbarActionView::Delegate { … };
class OpenMenuListener : public views::ContextMenuController { … };
}
class ToolbarActionViewUnitTest : public ChromeViewsTestBase { … };
class TestToolbarActionView : public ToolbarActionView { … };
TEST_F(ToolbarActionViewUnitTest,
NoCrashWhenDestroyingToolbarActionViewThatHasAPressedLock) { … }
TEST_F(ToolbarActionViewUnitTest,
NoCrashWhenPressingMouseOnToolbarActionViewThatHasAPressedLock) { … }
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
BUILDFLAG(IS_WIN)
#define MAYBE_BasicToolbarActionViewTest …
#else
#define MAYBE_BasicToolbarActionViewTest …
#endif
TEST_F(ToolbarActionViewUnitTest, MAYBE_BasicToolbarActionViewTest) { … }