chromium/ui/views/layout/table_layout_unittest.cc

// Copyright 2021 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/table_layout.h"

#include "base/memory/raw_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/views/border.h"
#include "ui/views/view.h"
#include "ui/views/view_class_properties.h"

namespace views {

namespace {

void ExpectViewBoundsEquals(int x, int y, int w, int h, const View* view) {}

std::unique_ptr<View> CreateSizedView(const gfx::Size& size) {}

// View that lets you set the minimum size.
class MinSizeView : public View {};

std::unique_ptr<MinSizeView> CreateViewWithMinAndPref(const gfx::Size& min,
                                                      const gfx::Size& pref) {}

BEGIN_METADATA()

}  // namespace

class TableLayoutTest : public testing::Test {};

class TableLayoutAlignmentTest : public testing::Test {};

TEST_F(TableLayoutAlignmentTest, Fill) {}

TEST_F(TableLayoutAlignmentTest, Leading) {}

TEST_F(TableLayoutAlignmentTest, Center) {}

TEST_F(TableLayoutAlignmentTest, Trailing) {}

TEST_F(TableLayoutTest, TwoColumns) {}

// Test linked column sizes, and the column size limit.
TEST_F(TableLayoutTest, LinkedSizes) {}

TEST_F(TableLayoutTest, ColSpan1) {}

TEST_F(TableLayoutTest, ColSpan2) {}

TEST_F(TableLayoutTest, ColSpan3) {}

TEST_F(TableLayoutTest, ColSpan4) {}

// Verifies the sizing of a view that doesn't start in the first column
// and has a column span > 1 (crbug.com/254092).
TEST_F(TableLayoutTest, ColSpanStartSecondColumn) {}

TEST_F(TableLayoutTest, SameSizeColumns) {}

TEST_F(TableLayoutTest, HorizontalResizeTest1) {}

TEST_F(TableLayoutTest, HorizontalResizeTest2) {}

// Tests that space leftover due to rounding is distributed to the last
// resizable column.
TEST_F(TableLayoutTest, HorizontalResizeTest3) {}

TEST_F(TableLayoutTest, TestVerticalResize1) {}

TEST_F(TableLayoutTest, Border) {}

TEST_F(TableLayoutTest, FixedSize) {}

TEST_F(TableLayoutTest, RowSpanWithPaddingRow) {}

TEST_F(TableLayoutTest, RowSpan) {}

TEST_F(TableLayoutTest, RowSpan2) {}

// Make sure that for views that span columns the underlying columns are resized
// based on the resize percent of the column.
TEST_F(TableLayoutTest, ColumnSpanResizing) {}

// Make sure that for views that span both fixed and resizable columns the
// underlying resiable column is resized and the fixed sized column is not.
TEST_F(TableLayoutTest, ColumnSpanResizing2) {}

// Make sure that for views that span both fixed and resizable columns the
// underlying resizable column is resized and the fixed sized column is not.
// The host width in this test is shorter than the minimum size of columns.
TEST_F(TableLayoutTest, ColumnSpanResizing3) {}

TEST_F(TableLayoutTest, MinimumPreferredSize) {}

TEST_F(TableLayoutTest, ColumnMinForcesPreferredWidth) {}

TEST_F(TableLayoutTest, HonorsColumnMin) {}

TEST_F(TableLayoutTest, TwoViewsOneSizeSmallerThanMinimum) {}

TEST_F(TableLayoutTest, TwoViewsBothSmallerThanMinimumDifferentResizeWeights) {}

TEST_F(TableLayoutTest, TwoViewsOneColumnUsePrefOtherFixed) {}

TEST_F(TableLayoutTest, InsufficientChildren) {}

TEST_F(TableLayoutTest, DistributeRemainingHeight) {}

}  // namespace views