chromium/ui/views/layout/box_layout_unittest.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ui/views/layout/box_layout.h"

#include <stddef.h>

#include <memory>
#include <utility>
#include <vector>

#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/views/controls/label.h"
#include "ui/views/layout/layout_provider.h"
#include "ui/views/test/test_views.h"
#include "ui/views/test/views_test_utils.h"
#include "ui/views/view.h"
#include "ui/views/view_class_properties.h"

namespace views {

namespace {

constexpr BoxLayout::MainAxisAlignment kMainAlignments[3] =;

class BoxLayoutTest : public testing::Test {};

}  // namespace

TEST_F(BoxLayoutTest, Empty) {}

TEST_F(BoxLayoutTest, AlignmentHorizontal) {}

TEST_F(BoxLayoutTest, AlignmentVertical) {}

TEST_F(BoxLayoutTest, SetInsideBorderInsets) {}

TEST_F(BoxLayoutTest, Spacing) {}

TEST_F(BoxLayoutTest, Overflow) {}

TEST_F(BoxLayoutTest, NoSpace) {}

TEST_F(BoxLayoutTest, InvisibleChild) {}

TEST_F(BoxLayoutTest, ChildIgnoredByLayout) {}

TEST_F(BoxLayoutTest, UseHeightForWidth) {}

TEST_F(BoxLayoutTest, EmptyPreferredSize) {}

// Verifies that a BoxLayout correctly handles child spacing, flex layout, and
// empty preferred size, simultaneously.
TEST_F(BoxLayoutTest, EmptyPreferredSizeWithFlexLayoutAndChildSpacing) {}

TEST_F(BoxLayoutTest, MainAxisAlignmentHorizontal) {}

TEST_F(BoxLayoutTest, MainAxisAlignmentVertical) {}

TEST_F(BoxLayoutTest, CrossAxisAlignmentHorizontal) {}

TEST_F(BoxLayoutTest, CrossAxisAlignmentVertical) {}

TEST_F(BoxLayoutTest, CrossAxisAlignmentVerticalChildPreferredWidth) {}

TEST_F(BoxLayoutTest, CrossAxisAlignmentVerticalChildHugePreferredWidth) {}

TEST_F(BoxLayoutTest, FlexAll) {}

TEST_F(BoxLayoutTest, FlexGrowVertical) {}

TEST_F(BoxLayoutTest, FlexGrowHorizontalWithRemainder) {}

TEST_F(BoxLayoutTest, FlexGrowHorizontalWithRemainder2) {}

TEST_F(BoxLayoutTest, FlexShrinkHorizontal) {}

TEST_F(BoxLayoutTest, FlexShrinkVerticalWithRemainder) {}

TEST_F(BoxLayoutTest, FlexBehavior) {}

TEST_F(BoxLayoutTest, MinimumCrossAxisVertical) {}

TEST_F(BoxLayoutTest, MinimumCrossAxisHorizontal) {}

TEST_F(BoxLayoutTest, MarginsUncollapsedHorizontal) {}

TEST_F(BoxLayoutTest, MarginsCollapsedHorizontal) {}

TEST_F(BoxLayoutTest, MarginsUncollapsedVertical) {}

TEST_F(BoxLayoutTest, MarginsCollapsedVertical) {}

TEST_F(BoxLayoutTest, UnbalancedMarginsUncollapsedHorizontal) {}

TEST_F(BoxLayoutTest, UnbalancedMarginsCollapsedHorizontal) {}

TEST_F(BoxLayoutTest, UnbalancedMarginsUncollapsedVertical) {}

TEST_F(BoxLayoutTest, UnbalancedMarginsCollapsedVertical) {}

TEST_F(BoxLayoutTest, OverlappingCrossMarginsAlignEnd) {}

TEST_F(BoxLayoutTest, OverlappingCrossMarginsAlignStretch) {}

TEST_F(BoxLayoutTest, OverlappingCrossMarginsAlignStart) {}

TEST_F(BoxLayoutTest, NegativeBetweenChildSpacing) {}

TEST_F(BoxLayoutTest, MinimumChildSize) {}

// Regression test for crbug.com/331484014.
// In a horizontal layout, a label's height should grow when it is wrapped into
// multiple lines due to insufficient width.
TEST_F(BoxLayoutTest, HeightIsAdjustedForInsufficientWidth) {}

}  // namespace views