#include "third_party/blink/renderer/platform/fonts/shaping/shaping_line_breaker.h"
#include <unicode/uscript.h>
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/platform/fonts/font.h"
#include "third_party/blink/renderer/platform/fonts/font_cache.h"
#include "third_party/blink/renderer/platform/fonts/font_test_utilities.h"
#include "third_party/blink/renderer/platform/fonts/shaping/shape_result_test_info.h"
#include "third_party/blink/renderer/platform/fonts/shaping/shape_result_view.h"
#include "third_party/blink/renderer/platform/testing/font_test_base.h"
#include "third_party/blink/renderer/platform/text/text_break_iterator.h"
#include "third_party/blink/renderer/platform/text/text_run.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"
namespace blink {
namespace {
class HarfBuzzShapingLineBreaker : public ShapingLineBreaker { … };
const ShapeResultView* ShapeLine(ShapingLineBreaker* breaker,
unsigned start_offset,
LayoutUnit available_space,
unsigned* break_offset) { … }
}
class ShapingLineBreakerTest : public FontTestBase { … };
TEST_F(ShapingLineBreakerTest, ShapeLineLatin) { … }
TEST_F(ShapingLineBreakerTest, ShapeLineLatinMultiLine) { … }
TEST_F(ShapingLineBreakerTest, ShapeLineLatinBreakAll) { … }
TEST_F(ShapingLineBreakerTest, ShapeLineZeroAvailableWidth) { … }
TEST_F(ShapingLineBreakerTest, ShapeLineRangeEndMidWord) { … }
TEST_F(ShapingLineBreakerTest, ShapeLineWithLucidaFont) { … }
TEST_F(ShapingLineBreakerTest, HanKerningCloseUnsafe) { … }
struct BreakOpportunityTestData { … };
class BreakOpportunityTest
: public ShapingLineBreakerTest,
public testing::WithParamInterface<BreakOpportunityTestData> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(BreakOpportunityTest, Next) { … }
TEST_P(BreakOpportunityTest, Previous) { … }
}