chromium/third_party/blink/renderer/core/layout/inline/inline_layout_algorithm_test.cc

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

#include <sstream>

#include "testing/gmock/include/gmock/gmock.h"
#include "third_party/blink/renderer/core/dom/tag_collection.h"
#include "third_party/blink/renderer/core/html/forms/html_text_area_element.h"
#include "third_party/blink/renderer/core/layout/base_layout_algorithm_test.h"
#include "third_party/blink/renderer/core/layout/box_fragment_builder.h"
#include "third_party/blink/renderer/core/layout/constraint_space_builder.h"
#include "third_party/blink/renderer/core/layout/inline/inline_box_state.h"
#include "third_party/blink/renderer/core/layout/inline/inline_break_token.h"
#include "third_party/blink/renderer/core/layout/inline/inline_child_layout_context.h"
#include "third_party/blink/renderer/core/layout/inline/inline_cursor.h"
#include "third_party/blink/renderer/core/layout/inline/inline_node.h"
#include "third_party/blink/renderer/core/layout/inline/physical_line_box_fragment.h"
#include "third_party/blink/renderer/core/layout/layout_block_flow.h"
#include "third_party/blink/renderer/core/layout/layout_result.h"
#include "third_party/blink/renderer/core/layout/physical_box_fragment.h"
#include "third_party/blink/renderer/platform/testing/runtime_enabled_features_test_helpers.h"

namespace blink {
namespace {

// Compute the result of the effects of the `text-box-trim` property.
struct TextBoxTrimResult {};

const PhysicalLineBoxFragment* FindBlockInInlineLineBoxFragment(
    Element* container) {}

class InlineLayoutAlgorithmTest : public BaseLayoutAlgorithmTest {};

TEST_F(InlineLayoutAlgorithmTest, Types) {}

TEST_F(InlineLayoutAlgorithmTest, TypesForFirstLine) {}

TEST_F(InlineLayoutAlgorithmTest, TypesForBlockInInline) {}

TEST_F(InlineLayoutAlgorithmTest, BreakToken) {}

// This test ensures box fragments are generated when necessary, even when the
// line is empty. One such case is when the line contains a containing box of an
// out-of-flow object.
TEST_F(InlineLayoutAlgorithmTest,
       EmptyLineWithOutOfFlowInInlineContainingBlock) {}

// This test ensures that if an inline box generates (or does not generate) box
// fragments for a wrapped line, it should consistently do so for other lines
// too, when the inline box is fragmented to multiple lines.
TEST_F(InlineLayoutAlgorithmTest, BoxForEndMargin) {}

TEST_F(InlineLayoutAlgorithmTest, InlineBoxBorderPadding) {}

// A block with inline children generates fragment tree as follows:
// - A box fragment created by BlockNode
//   - A wrapper box fragment created by InlineNode
//     - Line box fragments.
// This test verifies that borders/paddings are applied to the wrapper box.
TEST_F(InlineLayoutAlgorithmTest, ContainerBorderPadding) {}

// The test leaks memory. crbug.com/721932
#if defined(ADDRESS_SANITIZER)
#define MAYBE_VerticalAlignBottomReplaced
#else
#define MAYBE_VerticalAlignBottomReplaced
#endif
TEST_F(InlineLayoutAlgorithmTest, MAYBE_VerticalAlignBottomReplaced) {}

// Verifies that text can flow correctly around floats that were positioned
// before the inline block.
TEST_F(InlineLayoutAlgorithmTest, TextFloatsAroundFloatsBefore) {}

// Verifies that text correctly flows around the inline float that fits on
// the same text line.
TEST_F(InlineLayoutAlgorithmTest, TextFloatsAroundInlineFloatThatFitsOnLine) {}

// Verifies that the inline float got pushed to the next line if it doesn't
// fit the current line.
TEST_F(InlineLayoutAlgorithmTest,
       TextFloatsAroundInlineFloatThatDoesNotFitOnLine) {}

// Verifies that if an inline float pushed to the next line then all others
// following inline floats positioned with respect to the float's top edge
// alignment rule.
TEST_F(InlineLayoutAlgorithmTest,
       FloatsArePositionedWithRespectToTopEdgeAlignmentRule) {}

// Block-in-inline is not reusable. See |EndOfReusableItems|.
TEST_F(InlineLayoutAlgorithmTest, BlockInInlineAppend) {}

// Verifies that InlineLayoutAlgorithm positions floats with respect to their
// margins.
TEST_F(InlineLayoutAlgorithmTest, PositionFloatsWithMargins) {}

// Test glyph bounding box causes ink overflow.
TEST_F(InlineLayoutAlgorithmTest, InkOverflow) {}

// See also InlineLayoutAlgorithmTest.TextCombineFake
TEST_F(InlineLayoutAlgorithmTest, TextCombineBasic) {}

// See also InlineLayoutAlgorithmTest.TextCombineBasic
TEST_F(InlineLayoutAlgorithmTest, TextCombineFake) {}

// http://crbug.com/1413969
TEST_F(InlineLayoutAlgorithmTest, InitialLetterEmpty) {}

// http://crbug.com/1420168
TEST_F(InlineLayoutAlgorithmTest, InitialLetterWithEmptyInline) {}

TEST_F(InlineLayoutAlgorithmTest, LineBoxWithHangingWidthRTLRightAligned) {}

TEST_F(InlineLayoutAlgorithmTest, LineBoxWithHangingWidthRTLCenterAligned) {}

TEST_F(InlineLayoutAlgorithmTest, TextBoxTrimConstraintSpace) {}

TEST_F(InlineLayoutAlgorithmTest, TextBoxTrimConstraintSpaceSingle) {}

TEST_F(InlineLayoutAlgorithmTest, TextBoxTrimConstraintSpaceEmptyOnly) {}

TEST_F(InlineLayoutAlgorithmTest, TextBoxTrimConstraintSpaceNone) {}

#undef MAYBE_VerticalAlignBottomReplaced

// crbug.com/341126037
TEST_F(InlineLayoutAlgorithmTest, BoxFragmentInRubyCrash) {}

}  // namespace
}  // namespace blink