#include "chrome/browser/ui/views/location_bar/icon_label_bubble_view.h"
#include <optional>
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/ui/layout_constants.h"
#include "chrome/browser/ui/views/location_bar/location_bar_view.h"
#include "chrome/test/views/chrome_views_test_base.h"
#include "components/strings/grit/components_strings.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/events/base_event_utils.h"
#include "ui/events/gesture_detection/gesture_configuration.h"
#include "ui/events/test/event_generator.h"
#include "ui/gfx/image/image_unittest_util.h"
#include "ui/views/animation/ink_drop.h"
#include "ui/views/animation/test/ink_drop_host_test_api.h"
#include "ui/views/animation/test/test_ink_drop.h"
#include "ui/views/controls/image_view.h"
#include "ui/views/widget/widget_utils.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "ui/aura/window.h"
#endif
InkDropHostTestApi;
TestInkDrop;
namespace {
const int kStayOpenTimeMS = …;
const int kOpenTimeMS = …;
const int kAnimationDurationMS = …;
const int kImageSize = …;
const int kNumberOfSteps = …;
class TestIconLabelBubbleView : public IconLabelBubbleView { … };
}
class IconLabelBubbleViewTestBase : public ChromeViewsTestBase,
public IconLabelBubbleView::Delegate { … };
class IconLabelBubbleViewTest : public IconLabelBubbleViewTestBase { … };
TEST_F(IconLabelBubbleViewTest, AnimateLayout) { … }
TEST_F(IconLabelBubbleViewTest, AnimateLayoutWithVisibleIcon) { … }
TEST_F(IconLabelBubbleViewTest, SecondClick) { … }
TEST_F(IconLabelBubbleViewTest, MouseInkDropState) { … }
TEST_F(IconLabelBubbleViewTest, SeparatorOpacity) { … }
#if !BUILDFLAG(IS_MAC)
TEST_F(IconLabelBubbleViewTest, GestureInkDropState) { … }
#endif
TEST_F(IconLabelBubbleViewTest, LabelVisibilityAfterAnimation) { … }
TEST_F(IconLabelBubbleViewTest, LabelVisibilityAfterAnimationReset) { … }
TEST_F(IconLabelBubbleViewTest,
LabelVisibilityAfterAnimationWithDefinedString) { … }
TEST_F(IconLabelBubbleViewTest, LabelPaintsBackgroundWithLabel) { … }
TEST_F(IconLabelBubbleViewTest, LabelPaintsBackgroundAlways) { … }
#if defined(USE_AURA)
IconLabelBubbleViewCrashTest;
TEST_F(IconLabelBubbleViewCrashTest,
GetPreferredSizeDoesntCrashWhenNoCompositor) { … }
#endif