#include "ui/views/window/dialog_client_view.h"
#include <algorithm>
#include <map>
#include <memory>
#include <string>
#include <utility>
#include "base/memory/raw_ptr.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "ui/base/mojom/dialog_button.mojom.h"
#include "ui/base/ui_base_types.h"
#include "ui/events/base_event_utils.h"
#include "ui/events/event.h"
#include "ui/events/event_constants.h"
#include "ui/events/gesture_event_details.h"
#include "ui/events/pointer_details.h"
#include "ui/events/types/event_type.h"
#include "ui/gfx/geometry/point.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/controls/button/checkbox.h"
#include "ui/views/controls/button/image_button.h"
#include "ui/views/controls/button/label_button.h"
#include "ui/views/metrics.h"
#include "ui/views/style/platform_style.h"
#include "ui/views/test/button_test_api.h"
#include "ui/views/test/test_layout_provider.h"
#include "ui/views/test/test_views.h"
#include "ui/views/test/views_test_utils.h"
#include "ui/views/test/widget_test.h"
#include "ui/views/widget/unique_widget_ptr.h"
#include "ui/views/widget/widget.h"
#include "ui/views/window/dialog_delegate.h"
namespace views {
class DialogClientViewTest : public test::WidgetTest { … };
TEST_F(DialogClientViewTest, UpdateButtons) { … }
TEST_F(DialogClientViewTest, RemoveAndUpdateButtons) { … }
TEST_F(DialogClientViewTest, SetupFocusChain) { … }
TEST_F(DialogClientViewTest, ContentsSize) { … }
TEST_F(DialogClientViewTest, LayoutWithButtons) { … }
TEST_F(DialogClientViewTest, MinMaxPreferredSize) { … }
TEST_F(DialogClientViewTest, LinkedWidthDoesLink) { … }
TEST_F(DialogClientViewTest, LinkedWidthDoesntLink) { … }
TEST_F(DialogClientViewTest, ButtonPosition) { … }
TEST_F(DialogClientViewTest, FocusUpdate) { … }
TEST_F(DialogClientViewTest, FocusMultipleButtons) { … }
TEST_F(DialogClientViewTest, FocusChangingButtons) { … }
TEST_F(DialogClientViewTest, IgnorePossiblyUnintendedClicks_ClickAfterShown) { … }
TEST_F(DialogClientViewTest, IgnorePossiblyUnintendedClicks_TapAfterShown) { … }
TEST_F(DialogClientViewTest, IgnorePossiblyUnintendedClicks_TouchAfterShown) { … }
#if !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_FUCHSIA)
class DesktopDialogClientViewTest : public DialogClientViewTest { … };
TEST_F(DesktopDialogClientViewTest,
IgnorePossiblyUnintendedClicks_TopLevelWindowBoundsChanged) { … }
TEST_F(DesktopDialogClientViewTest,
IgnorePossiblyUnintendedClicks_CloseRootWindow) { … }
#endif
#if BUILDFLAG(ENABLE_DESKTOP_AURA)
TEST_F(DialogClientViewTest,
IgnorePossiblyUnintendedClicks_ClickAfterClosingTooltip) { … }
#endif
TEST_F(DialogClientViewTest, IgnorePossiblyUnintendedClicks_RepeatedClicks) { … }
TEST_F(DialogClientViewTest, ButtonLayoutWithExtra) { … }
TEST_F(DialogClientViewTest, LayoutWithHiddenExtraView) { … }
}