#include "ui/gfx/geometry/resize_utils.h"
#include <string>
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
namespace gfx {
namespace {
constexpr float kAspectRatioSquare = …;
constexpr float kAspectRatioHorizontal = …;
constexpr float kAspectRatioVertical = …;
constexpr Size kMinSizeHorizontal(20, 10);
constexpr Size kMaxSizeHorizontal(50, 25);
constexpr Size kMinSizeVertical(10, 20);
constexpr Size kMaxSizeVertical(25, 50);
std::string HitTestToString(ResizeEdge resize_edge) { … }
}
struct SizingParams { … };
ResizeUtilsTest;
TEST_P(ResizeUtilsTest, SizeRectToAspectRatio) { … }
TEST_P(ResizeUtilsTest, SizeRectToAspectRatioWithExcludedMargin) { … }
const SizingParams kSizeRectToSquareAspectRatioTestCases[] = …;
const SizingParams kSizeRectToHorizontalAspectRatioTestCases[] = …;
const SizingParams kSizeRectToVerticalAspectRatioTestCases[] = …;
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
}