#include "chrome/browser/ui/views/compose/compose_dialog_view.h"
#include "components/compose/core/browser/config.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
std::string ParamToTestSuffix(
::testing::TestParamInfo<compose::DialogFallbackPositioningStrategy>
paramInfo) { … }
gfx::Size DefaultWidgetSize() { … }
std::optional<gfx::Rect> DefaultBrowserWindow() { … }
std::optional<gfx::Rect> SmallBrowserWindow() { … }
gfx::Rect DefaultScreenWorkArea() { … }
gfx::Size DefaultAnchorSize() { … }
gfx::Size SmallAnchorSize() { … }
}
class ComposeDialogViewTest : public testing::TestWithParam<
compose::DialogFallbackPositioningStrategy> { … };
TEST_P(ComposeDialogViewTest, TestLayoutBelow) { … }
TEST_P(ComposeDialogViewTest, TestLayoutAbove) { … }
TEST_P(ComposeDialogViewTest, TestAnchorOnRight) { … }
TEST_P(ComposeDialogViewTest, TestAnchorOnLeft) { … }
TEST_P(ComposeDialogViewTest, TestFallbackVertical) { … }
INSTANTIATE_TEST_SUITE_P(…);
class ComposeDialogViewInWindowBoundsTest : public ComposeDialogViewTest { … };
TEST_P(ComposeDialogViewInWindowBoundsTest, TestLayoutBelow) { … }
TEST_P(ComposeDialogViewInWindowBoundsTest, TestLayoutAbove) { … }
TEST_P(ComposeDialogViewInWindowBoundsTest, TestAnchorOnRight) { … }
TEST_P(ComposeDialogViewInWindowBoundsTest, TestAnchorOnLeft) { … }
TEST_P(ComposeDialogViewInWindowBoundsTest, TestFallbackVertical) { … }
TEST_P(ComposeDialogViewInWindowBoundsTest,
TestFallbackVerticalWhenWindowIsTooSmall) { … }
INSTANTIATE_TEST_SUITE_P(…);