chromium/third_party/blink/renderer/core/layout/inline/line_breaker_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 "third_party/blink/renderer/core/layout/inline/line_breaker.h"

#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.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_break_token.h"
#include "third_party/blink/renderer/core/layout/inline/inline_cursor.h"
#include "third_party/blink/renderer/core/layout/inline/inline_item_result_ruby_column.h"
#include "third_party/blink/renderer/core/layout/inline/inline_node.h"
#include "third_party/blink/renderer/core/layout/inline/line_info.h"
#include "third_party/blink/renderer/core/layout/layout_block_flow.h"
#include "third_party/blink/renderer/core/layout/positioned_float.h"
#include "third_party/blink/renderer/core/layout/unpositioned_float.h"
#include "third_party/blink/renderer/platform/fonts/shaping/shape_result_view.h"
#include "third_party/blink/renderer/platform/testing/runtime_enabled_features_test_helpers.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"

namespace blink {

String ToString(InlineItemResults line, InlineNode node) {}

class LineBreakerTest : public RenderingTest {};

namespace {

TEST_F(LineBreakerTest, FitWithEpsilon) {}

TEST_F(LineBreakerTest, SingleNode) {}

// For "text-combine-upright-break-inside-001a.html"
TEST_F(LineBreakerTest, TextCombineCloseTag) {}

TEST_F(LineBreakerTest, TextCombineBreak) {}

TEST_F(LineBreakerTest, TextCombineNoBreak) {}

TEST_F(LineBreakerTest, TextCombineNoBreakWithSpace) {}

TEST_F(LineBreakerTest, OverflowWord) {}

TEST_F(LineBreakerTest, OverflowTab) {}

TEST_F(LineBreakerTest, OverflowTabBreakWord) {}

TEST_F(LineBreakerTest, OverflowAtomicInline) {}

TEST_F(LineBreakerTest, OverflowMargin) {}

TEST_F(LineBreakerTest, OverflowAfterSpacesAcrossElements) {}

// Tests when the last word in a node wraps, and another node continues.
TEST_F(LineBreakerTest, WrapLastWord) {}

TEST_F(LineBreakerTest, WrapLetterSpacing) {}

TEST_F(LineBreakerTest, BoundaryInWord) {}

TEST_F(LineBreakerTest, BoundaryInFirstWord) {}

// Test for https://crbug.com/1505393, where ideographic trailing spaces counted
// as kPreserved, except when they are in the last line of the paragraph and
// overflow the line, in which case they counted as kNone.
TEST_F(LineBreakerTest, IdeographicTrailingSpaces) {}

struct WhitespaceStateTestData {} whitespace_state_test_data[] =;

std::ostream& operator<<(std::ostream& os,
                         const WhitespaceStateTestData& data) {}

class WhitespaceStateTest
    : public LineBreakerTest,
      public testing::WithParamInterface<WhitespaceStateTestData> {};

INSTANTIATE_TEST_SUITE_P();

TEST_P(WhitespaceStateTest, WhitespaceState) {}

struct TrailingSpaceWidthTestData {} trailing_space_width_test_data[] =;

class TrailingSpaceWidthTest
    : public LineBreakerTest,
      public testing::WithParamInterface<TrailingSpaceWidthTestData> {};

INSTANTIATE_TEST_SUITE_P();

TEST_P(TrailingSpaceWidthTest, TrailingSpaceWidth) {}

TEST_F(LineBreakerTest, FullyCollapsedSpaces) {}

TEST_F(LineBreakerTest, TrailingCollapsedSpaces) {}

// For http://crbug.com/1104534
TEST_F(LineBreakerTest, SplitTextZero) {}

TEST_F(LineBreakerTest, ForcedBreakFollowedByCloseTag) {}

TEST_F(LineBreakerTest, TableCellWidthCalculationQuirkOutOfFlow) {}

TEST_F(LineBreakerTest, BoxDecorationBreakCloneWithoutBoxDecorations) {}

TEST_F(LineBreakerTest, RewindPositionedFloat) {}

// crbug.com/1091359
TEST_F(LineBreakerTest, RewindRubyColumn) {}

TEST_F(LineBreakerTest, SplitTextIntoSegements) {}

// crbug.com/1251960
TEST_F(LineBreakerTest, SplitTextIntoSegementsCrash) {}

// crbug.com/1214232
TEST_F(LineBreakerTest, GetOverhangCrash) {}

// https://crbug.com/1292848
// Test that, if it's not possible to break after an ideographic space (as
// happens before an end bracket), previous break opportunities are considered.
TEST_F(LineBreakerTest, IdeographicSpaceBeforeEndBracket) {}

TEST_F(LineBreakerTest, BreakAt) {}

TEST_F(LineBreakerTest, BreakAtTrailingSpaces) {}

TEST_F(LineBreakerTest, BreakAtTrailingSpacesAfterAtomicInline) {}

// We have a crash with content wider than LayoutUnit::Max() in a ruby.
// crbug.com/338437458
TEST_F(LineBreakerTest, WideContentInRuby) {}

TEST_F(LineBreakerTest, SetInputRange) {}

// crbug.com/338350369 Floats should not update available_width_ for
// sub-LineBreakers.
TEST_F(LineBreakerTest, CreateSubLineInfoAvailableWidth) {}

// crbug.com/341142174 A crash with an overflowing continuation ruby column.
TEST_F(LineBreakerTest, OverflowingContinuationRuby) {}

// crbug.com/342027571 A crash with an overflowing continuation ruby column.
TEST_F(LineBreakerTest, OverflowingContinuationRuby2) {}

TEST_F(LineBreakerTest, MinMaxWithAtomicInlineInRuby) {}

// crbug.com/342801061 LineInfo::Width() was zero unexpectedly.
TEST_F(LineBreakerTest, RemoveTrailingCollapsibleSpace) {}

// crbug.com/350122891
TEST_F(LineBreakerTest, MinMaxWithEmptyRubyBase) {}

struct CanBreakInsideTestData {} can_break_inside_test_data[] =;
class CanBreakInsideTest
    : public LineBreakerTest,
      public testing::WithParamInterface<CanBreakInsideTestData> {};
INSTANTIATE_TEST_SUITE_P();

TEST_P(CanBreakInsideTest, Data) {}

}  // namespace
}  // namespace blink