chromium/third_party/blink/renderer/core/layout/length_utils_test.cc

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

#include "third_party/blink/renderer/core/layout/length_utils.h"

#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/core/css/resolver/style_resolver.h"
#include "third_party/blink/renderer/core/layout/block_node.h"
#include "third_party/blink/renderer/core/layout/constraint_space.h"
#include "third_party/blink/renderer/core/layout/constraint_space_builder.h"
#include "third_party/blink/renderer/core/style/computed_style.h"
#include "third_party/blink/renderer/core/testing/core_unit_test_helper.h"
#include "third_party/blink/renderer/platform/geometry/calculation_value.h"
#include "third_party/blink/renderer/platform/geometry/layout_unit.h"
#include "third_party/blink/renderer/platform/geometry/length.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"

namespace blink {
namespace {

static ConstraintSpace ConstructConstraintSpace(
    int inline_size,
    int block_size,
    bool fixed_inline = false,
    bool fixed_block = false,
    WritingMode writing_mode = WritingMode::kHorizontalTb) {}

class LengthUtilsTest : public testing::Test {};

class LengthUtilsTestWithNode : public RenderingTest {};

TEST_F(LengthUtilsTest, TestResolveInlineLength) {}

TEST_F(LengthUtilsTest, TestIndefiniteResolveInlineLength) {}

TEST_F(LengthUtilsTest, TestResolveBlockLength) {}

TEST_F(LengthUtilsTestWithNode, TestComputeContentContribution) {}

TEST_F(LengthUtilsTestWithNode, TestComputeInlineSizeForFragment) {}

TEST_F(LengthUtilsTestWithNode, TestComputeBlockSizeForFragment) {}

TEST_F(LengthUtilsTestWithNode, TestIndefinitePercentages) {}

TEST_F(LengthUtilsTestWithNode, ComputeReplacedSizeSvgNoScaling) {}

TEST_F(LengthUtilsTest, TestMargins) {}

TEST_F(LengthUtilsTest, TestBorders) {}

TEST_F(LengthUtilsTest, TestPadding) {}

TEST_F(LengthUtilsTest, TestAutoMargins) {}

// Simple wrappers that don't use LayoutUnit(). Their only purpose is to make
// the tests below humanly readable (to make the expectation expressions fit on
// one line each). Passing 0 for column width or column count means "auto".
int GetUsedColumnWidth(int computed_column_count,
                       int computed_column_width,
                       int used_column_gap,
                       int available_inline_size) {}
int GetUsedColumnCount(int computed_column_count,
                       int computed_column_width,
                       int used_column_gap,
                       int available_inline_size) {}

TEST_F(LengthUtilsTest, TestColumnWidthAndCount) {}

LayoutUnit ComputeInlineSize(LogicalSize aspect_ratio, LayoutUnit block_size) {}
TEST_F(LengthUtilsTest, AspectRatio) {}

}  // namespace
}  // namespace blink