#include "ui/gfx/render_text.h"
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include <memory>
#include <numeric>
#include <set>
#include <tuple>
#include "base/command_line.h"
#include "base/format_macros.h"
#include "base/i18n/base_i18n_switches.h"
#include "base/i18n/break_iterator.h"
#include "base/i18n/char_iterator.h"
#include "base/logging.h"
#include "base/memory/raw_ptr.h"
#include "base/not_fatal_until.h"
#include "base/numerics/safe_conversions.h"
#include "base/ranges/algorithm.h"
#include "base/run_loop.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/task_environment.h"
#include "build/build_config.h"
#include "cc/paint/paint_record.h"
#include "cc/paint/paint_recorder.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkFontStyle.h"
#include "third_party/skia/include/core/SkSurface.h"
#include "third_party/skia/include/core/SkTextBlob.h"
#include "third_party/skia/include/core/SkTypeface.h"
#include "ui/base/ui_base_features.h"
#include "ui/gfx/break_list.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/color_utils.h"
#include "ui/gfx/decorated_text.h"
#include "ui/gfx/font.h"
#include "ui/gfx/font_fallback.h"
#include "ui/gfx/font_names_testing.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/point_conversions.h"
#include "ui/gfx/geometry/point_f.h"
#include "ui/gfx/range/range.h"
#include "ui/gfx/range/range_f.h"
#include "ui/gfx/render_text_harfbuzz.h"
#include "ui/gfx/render_text_test_api.h"
#include "ui/gfx/test/scoped_default_font_description.h"
#include "ui/gfx/text_constants.h"
#include "ui/gfx/text_elider.h"
#include "ui/gfx/text_utils.h"
#if BUILDFLAG(IS_WIN)
#include <windows.h>
#endif
#if BUILDFLAG(IS_APPLE)
#include "base/mac/mac_util.h"
#endif
namespace gfx {
namespace {
const char16_t kWeak[] = …;
const char16_t kLtr[] = …;
const char16_t kRtl[] = …;
const char16_t kLtrRtl[] = …;
const char16_t kLtrRtlLtr[] = …;
const char16_t kRtlLtr[] = …;
const char16_t kRtlLtrRtl[] = …;
constexpr bool kUseWordWrap = …;
constexpr bool kUseObscuredText = …;
enum { … };
FontSpan;
bool IsFontsSmoothingEnabled() { … }
bool IndexInRange(const Range& range, size_t index) { … }
std::u16string GetSelectedText(RenderText* render_text) { … }
void SetRTL(bool rtl) { … }
void RunMoveCursorTestAndClearExpectations(RenderText* render_text,
BreakType break_type,
VisualCursorDirection direction,
SelectionBehavior selection_behavior,
std::vector<Range>* expected) { … }
void RunMoveCursorTestAndClearExpectations(RenderText* render_text,
BreakType break_type,
VisualCursorDirection direction,
SelectionBehavior selection_behavior,
std::vector<size_t>* expected) { … }
void RunMoveCursorLeftRightTest(RenderText* render_text,
const std::vector<SelectionModel>& expected,
VisualCursorDirection direction) { … }
DecoratedText::RangedAttribute CreateRangedAttribute(
const std::vector<FontSpan>& font_spans,
int index,
int font_index,
Font::Weight weight,
int style_mask) { … }
void VerifyDecoratedWordsAreEqual(const DecoratedText& expected,
const DecoratedText& actual) { … }
std::u16string GetObscuredString(size_t length,
size_t reveal_index,
char16_t reveal_char) { … }
std::u16string GetObscuredString(size_t length) { … }
Range LineCharRange(const internal::Line& line) { … }
struct GlyphCountAndColor { … };
class TextLog { … };
class TestSkiaTextRenderer : public internal::SkiaTextRenderer { … };
class TestRenderTextCanvas : public SkCanvas { … };
class TestRectangleBuffer { … };
}
class RenderTextTest : public testing::Test { … };
TEST_F(RenderTextTest, DefaultStyles) { … }
TEST_F(RenderTextTest, SetStyles) { … }
TEST_F(RenderTextTest, ApplyStyles) { … }
TEST_F(RenderTextTest, ApplyStyleSurrogatePair) { … }
TEST_F(RenderTextTest, ApplyStyleGrapheme) { … }
TEST_F(RenderTextTest, ApplyStyleMultipleGraphemes) { … }
TEST_F(RenderTextTest, ApplyColorSurrogatePair) { … }
TEST_F(RenderTextTest, ApplyColorLongEmoji) { … }
TEST_F(RenderTextTest, ApplyFillStyle) { … }
TEST_F(RenderTextTest, ApplyColorObscuredEmoji) { … }
TEST_F(RenderTextTest, ApplyColorArabicDiacritics) { … }
TEST_F(RenderTextTest, ApplyColorArabicLigature) { … }
TEST_F(RenderTextTest, ApplyEliding) { … }
TEST_F(RenderTextTest, ApplyElidingGrapheme) { … }
TEST_F(RenderTextTest, ApplyElidingAndTruncate) { … }
TEST_F(RenderTextTest, AppendTextKeepsStyles) { … }
TEST_F(RenderTextTest, SetSelection) { … }
TEST_F(RenderTextTest, SelectRangeColored) { … }
TEST_F(RenderTextTest, SelectWithTranslucentBackground) { … }
TEST_F(RenderTextTest, SelectRangeColoredGrapheme) { … }
TEST_F(RenderTextTest, SelectRangeMultiple) { … }
TEST_F(RenderTextTest, SetCompositionRangeColored) { … }
TEST_F(RenderTextTest, SetCompositionRangeColoredGrapheme) { … }
void TestVisualCursorMotionInObscuredField(
RenderText* render_text,
const std::u16string& text,
SelectionBehavior selection_behavior) { … }
TEST_F(RenderTextTest, ObscuredText) { … }
TEST_F(RenderTextTest, ObscuredTextMultiline) { … }
TEST_F(RenderTextTest, ObscuredTextMultilineNewline) { … }
TEST_F(RenderTextTest, RevealObscuredText) { … }
TEST_F(RenderTextTest, ObscuredEmoji) { … }
TEST_F(RenderTextTest, ObscuredEmojiRevealed) { … }
struct TextIndexConversionCase { … };
TextIndexConversionParam;
class RenderTextTestWithTextIndexConversionCase
: public RenderTextTest,
public ::testing::WithParamInterface<TextIndexConversionParam> { … };
TEST_P(RenderTextTestWithTextIndexConversionCase, TextIndexConversion) { … }
const TextIndexConversionCase kTextIndexConversionCases[] = …;
INSTANTIATE_TEST_SUITE_P(…);
struct RunListCase { … };
class RenderTextTestWithRunListCase
: public RenderTextTest,
public ::testing::WithParamInterface<RunListCase> { … };
TEST_P(RenderTextTestWithRunListCase, ItemizeTextToRuns) { … }
const RunListCase kBasicsRunListCases[] = …;
INSTANTIATE_TEST_SUITE_P(…);
const RunListCase kBidiRunListCases[] = …;
INSTANTIATE_TEST_SUITE_P(…);
const RunListCase kBracketsRunListCases[] = …;
INSTANTIATE_TEST_SUITE_P(…);
const RunListCase kScriptExtensionRunListCases[] = …;
INSTANTIATE_TEST_SUITE_P(…);
const RunListCase kScriptsRunListCases[] = …;
INSTANTIATE_TEST_SUITE_P(…);
const RunListCase kEmojiRunListCases[] = …;
INSTANTIATE_TEST_SUITE_P(…);
struct ElideTextTestOptions { … };
const bool kForceNoWhitespaceElision = …;
const bool kForceWhitespaceElision = …;
struct ElideTextCase { … };
ElideTextCaseParam;
class RenderTextTestWithElideTextCase
: public RenderTextTest,
public ::testing::WithParamInterface<ElideTextCaseParam> { … };
TEST_P(RenderTextTestWithElideTextCase, ElideText) { … }
const ElideTextCase kElideHeadTextCases[] = …;
INSTANTIATE_TEST_SUITE_P(…);
const ElideTextCase kElideTailTextCases[] = …;
INSTANTIATE_TEST_SUITE_P(…);
const ElideTextCase kElideTruncateTextCases[] = …;
INSTANTIATE_TEST_SUITE_P(…);
const ElideTextCase kElideEmailTextCases[] = …;
INSTANTIATE_TEST_SUITE_P(…);
TEST_F(RenderTextTest, ElidedText_NoTrimWhitespace) { … }
TEST_F(RenderTextTest, SetElideBehavior) { … }
TEST_F(RenderTextTest, SetWhitespaceElision) { … }
TEST_F(RenderTextTest, ElidedObscuredText) { … }
TEST_F(RenderTextTest, MultilineElide) { … }
TEST_F(RenderTextTest, MultilineElideWrap) { … }
TEST_F(RenderTextTest, DISABLED_MultilineElideWrapWithStyle) { … }
TEST_F(RenderTextTest, MultilineElideWrapStress) { … }
TEST_F(RenderTextTest, DISABLED_MultilineElideWrapStressWithStyle) { … }
TEST_F(RenderTextTest, ElidedFallbackFonts) { … }
TEST_F(RenderTextTest, MultilineElideRTL) { … }
TEST_F(RenderTextTest, MultilineElideBiDi) { … }
TEST_F(RenderTextTest, MultilineElideLinebreak) { … }
TEST_F(RenderTextTest, ElidedStyledTextRtl) { … }
TEST_F(RenderTextTest, ElidedEmail) { … }
TEST_F(RenderTextTest, TruncatedText) { … }
TEST_F(RenderTextTest, TruncatedObscuredText) { … }
TEST_F(RenderTextTest, TruncatedObscuredTextWithGraphemes) { … }
TEST_F(RenderTextTest, TruncatedCursorMovementLTR) { … }
TEST_F(RenderTextTest, TruncatedCursorMovementRTL) { … }
TEST_F(RenderTextTest, MoveCursor_Character) { … }
TEST_F(RenderTextTest, MoveCursor_Word) { … }
TEST_F(RenderTextTest, MoveCursor_Word_RTL) { … }
TEST_F(RenderTextTest, MoveCursor_Line) { … }
TEST_F(RenderTextTest, MoveCursor_UpDown) { … }
TEST_F(RenderTextTest, MoveCursor_UpDown_Newline) { … }
TEST_F(RenderTextTest, MoveCursor_UpDown_EmptyLines) { … }
TEST_F(RenderTextTest, MoveCursor_UpDown_Cache) { … }
TEST_F(RenderTextTest, MoveCursorWithNewline) { … }
TEST_F(RenderTextTest, GetTextDirectionInvalidation) { … }
TEST_F(RenderTextTest, GetDisplayTextDirectionInvalidation) { … }
TEST_F(RenderTextTest, GetTextDirectionWithDifferentDirection) { … }
TEST_F(RenderTextTest, DirectionalityInvalidation) { … }
TEST_F(RenderTextTest, MoveCursor_UpDown_Scroll) { … }
TEST_F(RenderTextTest, GetDisplayTextDirection) { … }
struct GetTextIndexOfLineCase { … };
class RenderTextTestWithGetTextIndexOfLineCase
: public RenderTextTest,
public ::testing::WithParamInterface<GetTextIndexOfLineCase> { … };
TEST_P(RenderTextTestWithGetTextIndexOfLineCase, GetTextIndexOfLine) { … }
const GetTextIndexOfLineCase kGetTextIndexOfLineCases[] = …;
INSTANTIATE_TEST_SUITE_P(…);
TEST_F(RenderTextTest, MoveCursorLeftRightInLtr) { … }
TEST_F(RenderTextTest, MoveCursorLeftRightInLtrRtl) { … }
TEST_F(RenderTextTest, MoveCursorLeftRightInLtrRtlLtr) { … }
TEST_F(RenderTextTest, MoveCursorLeftRightInRtl) { … }
TEST_F(RenderTextTest, MoveCursorLeftRightInRtlLtr) { … }
TEST_F(RenderTextTest, MoveCursorLeftRightInRtlLtrRtl) { … }
TEST_F(RenderTextTest, MoveCursorLeftRight_ComplexScript) { … }
TEST_F(RenderTextTest, MoveCursorLeftRight_MeiryoUILigatures) { … }
TEST_F(RenderTextTest, GraphemeIterator) { … }
TEST_F(RenderTextTest, GraphemeBoundaries) { … }
TEST_F(RenderTextTest, GraphemePositions) { … }
TEST_F(RenderTextTest, MidGraphemeSelectionBounds) { … }
TEST_F(RenderTextTest, FindCursorPosition) { … }
TEST_F(RenderTextTest, GetCursorBoundsMultilineLTR) { … }
TEST_F(RenderTextTest, GetCursorBoundsMultilineCarriageReturn) { … }
TEST_F(RenderTextTest, GetCursorBoundsMultilineRTL) { … }
TEST_F(RenderTextTest, FindCursorPositionMultiline) { … }
TEST_F(RenderTextTest, FindCursorPosition_GraphemeBoundaries) { … }
TEST_F(RenderTextTest, EdgeSelectionModels) { … }
TEST_F(RenderTextTest, SelectAll) { … }
TEST_F(RenderTextTest, MoveCursorLeftRightWithSelection) { … }
TEST_F(RenderTextTest, MoveCursorLeftRightWithSelection_Multiline) { … }
TEST_F(RenderTextTest, CenteredDisplayOffset) { … }
void MoveLeftRightByWordVerifier(RenderText* render_text, const char16_t* str) { … }
#if BUILDFLAG(IS_WIN)
#define MAYBE_MoveLeftRightByWordInBidiText …
#else
#define MAYBE_MoveLeftRightByWordInBidiText …
#endif
TEST_F(RenderTextTest, MAYBE_MoveLeftRightByWordInBidiText) { … }
TEST_F(RenderTextTest, MoveLeftRightByWordInBidiText_TestEndOfText) { … }
TEST_F(RenderTextTest, MoveLeftRightByWordInTextWithMultiSpaces) { … }
TEST_F(RenderTextTest, MoveLeftRightByWordInThaiText) { … }
#if !BUILDFLAG(IS_ANDROID)
TEST_F(RenderTextTest, MoveLeftRightByWordInChineseText) { … }
#endif
TEST_F(RenderTextTest, DirectedSelections) { … }
TEST_F(RenderTextTest, DirectedSelections_Multiline) { … }
TEST_F(RenderTextTest, StringSizeSanity) { … }
TEST_F(RenderTextTest, StringSizeLongStrings) { … }
TEST_F(RenderTextTest, StringSizeEmptyString) { … }
TEST_F(RenderTextTest, StringSizeRespectsFontListMetrics) { … }
TEST_F(RenderTextTest, StringSizeMultiline) { … }
TEST_F(RenderTextTest, MinLineHeight) { … }
TEST_F(RenderTextTest, DefaultLineHeights) { … }
TEST_F(RenderTextTest, TextSize) { … }
TEST_F(RenderTextTest, TextSizeMultiline) { … }
TEST_F(RenderTextTest, LineSizeMultiline) { … }
TEST_F(RenderTextTest, TextPosition) { … }
TEST_F(RenderTextTest, SetFontList) { … }
TEST_F(RenderTextTest, StringSizeBoldWidth) { … }
TEST_F(RenderTextTest, StringSizeHeight) { … }
TEST_F(RenderTextTest, GetBaselineSanity) { … }
TEST_F(RenderTextTest, GetCursorBoundsInReplacementMode) { … }
TEST_F(RenderTextTest, GetCursorBoundsWithGraphemes) { … }
TEST_F(RenderTextTest, GetTextOffset) { … }
TEST_F(RenderTextTest, GetTextOffsetHorizontalDefaultInRTL) { … }
TEST_F(RenderTextTest, GetTextOffsetVerticalAlignment) { … }
TEST_F(RenderTextTest, GetTextOffsetVerticalAlignment_Multiline) { … }
TEST_F(RenderTextTest, SetDisplayOffset) { … }
TEST_F(RenderTextTest, SameFontForParentheses) { … }
TEST_F(RenderTextTest, CaretWidth) { … }
TEST_F(RenderTextTest, SelectWord) { … }
TEST_F(RenderTextTest, LastWordSelected) { … }
TEST_F(RenderTextTest, SelectMultipleWords) { … }
TEST_F(RenderTextTest, DisplayRectShowsCursorLTR) { … }
TEST_F(RenderTextTest, DisplayRectShowsCursorRTL) { … }
TEST_F(RenderTextTest, SelectionKeepsLigatures) { … }
TEST_F(RenderTextTest, ScriptExtensionsDoNotBreak) { … }
TEST_F(RenderTextTest, WhitespaceDoesBreak) { … }
TEST_F(RenderTextTest, Multiline_MinWidth) { … }
TEST_F(RenderTextTest, Multiline_NormalWidth) { … }
TEST_F(RenderTextTest, Multiline_SufficientWidth) { … }
TEST_F(RenderTextTest, Multiline_Newline) { … }
TEST_F(RenderTextTest, Multiline_IgnoreElide) { … }
TEST_F(RenderTextTest, Multiline_NewlineCharacterReplacement) { … }
TEST_F(RenderTextTest, Multiline_HorizontalAlignment) { … }
TEST_F(RenderTextTest, Multiline_WordWrapBehavior) { … }
TEST_F(RenderTextTest, Multiline_LineBreakerBehavior) { … }
TEST_F(RenderTextTest, Multiline_SurrogatePairsOrCombiningChars) { … }
TEST_F(RenderTextTest, Multiline_ZeroWidthChars) { … }
TEST_F(RenderTextTest, Multiline_ZeroWidthNewline) { … }
TEST_F(RenderTextTest, Multiline_GetLineContainingCaret) { … }
TEST_F(RenderTextTest, NewlineWithoutMultilineFlag) { … }
TEST_F(RenderTextTest, ControlCharacterReplacement) { … }
TEST_F(RenderTextTest, PrivateUseCharacterReplacement) { … }
TEST_F(RenderTextTest, AppleSpecificPrivateUseCharacterReplacement) { … }
TEST_F(RenderTextTest, MicrosoftSpecificPrivateUseCharacterReplacement) { … }
TEST_F(RenderTextTest, InvalidSurrogateCharacterReplacement) { … }
TEST_F(RenderTextTest, HarfBuzz_HorizontalPositions) { … }
TEST_F(RenderTextTest, HarfBuzz_Clusters) { … }
TEST_F(RenderTextTest, HarfBuzz_NoCrashOnTextRunGetClusterAt) { … }
TEST_F(RenderTextTest, HarfBuzz_SubglyphGraphemeCases) { … }
TEST_F(RenderTextTest, HarfBuzz_SubglyphGraphemePartition) { … }
TEST_F(RenderTextTest, HarfBuzz_RunDirection) { … }
TEST_F(RenderTextTest, HarfBuzz_RunDirection_URLs) { … }
TEST_F(RenderTextTest, HarfBuzz_BreakRunsByUnicodeBlocks) { … }
TEST_F(RenderTextTest, HarfBuzz_BreakRunsByEmoji) { … }
TEST_F(RenderTextTest, HarfBuzz_BreakRunsByNewline) { … }
TEST_F(RenderTextTest, HarfBuzz_BreakRunsByEmojiVariationSelectors) { … }
TEST_F(RenderTextTest, HarfBuzz_OrphanedVariationSelector) { … }
TEST_F(RenderTextTest, HarfBuzz_AsciiVariationSelector) { … }
TEST_F(RenderTextTest, HarfBuzz_LeadingVariationSelector) { … }
TEST_F(RenderTextTest, HarfBuzz_TrailingVariationSelector) { … }
TEST_F(RenderTextTest, HarfBuzz_SplitRunsWithMissingGlyphCJK) { … }
TEST_F(RenderTextTest, HarfBuzz_SplitRunsWithMissingGlyphSmallCaps) { … }
TEST_F(RenderTextTest, HarfBuzz_SplitRunsWithMissingGlyphSmallCapsAdjacent) { … }
TEST_F(RenderTextTest, HarfBuzz_SplitRunsWithMissingGlyphDiacDev) { … }
TEST_F(RenderTextTest, HarfBuzz_SplitRunsInFontCJKAndLatin) { … }
TEST_F(RenderTextTest, HarfBuzz_SplitRunsInFontCJKAndLatinWithEliding) { … }
TEST_F(RenderTextTest, HarfBuzz_MultipleVariationSelectorEmoji) { … }
TEST_F(RenderTextTest, HarfBuzz_BreakRunsByAscii) { … }
TEST_F(RenderTextTest, EmojiFlagGlyphCount) { … }
TEST_F(RenderTextTest, HarfBuzz_ShapeRunsWithMultipleFonts) { … }
TEST_F(RenderTextTest, GlyphBounds) { … }
TEST_F(RenderTextTest, HarfBuzz_NonExistentFont) { … }
TEST_F(RenderTextTest, HarfBuzz_EmptyRun) { … }
TEST_F(RenderTextTest, HarfBuzz_HistogramMissingGlyphsNone) { … }
TEST_F(RenderTextTest, HarfBuzz_HistogramMissingGlyphsCount) { … }
TEST_F(RenderTextTest, HarfBuzz_WordWidthWithDiacritics) { … }
TEST_F(RenderTextTest, StringFitsOwnWidth) { … }
#if !BUILDFLAG(IS_ANDROID)
TEST_F(RenderTextTest, HarfBuzz_FontListFallback) { … }
#endif
#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID)
TEST_F(RenderTextTest, HarfBuzz_UnicodeFallback) {
RenderTextHarfBuzz* render_text = GetRenderText();
render_text->SetFontList(FontList("Arial, 12px"));
render_text->SetText(u"\ud55c");
const internal::TextRunList* run_list = GetHarfBuzzRunList();
ASSERT_EQ(1U, run_list->size());
EXPECT_EQ(0U, run_list->MissingGlyphCount());
}
#endif
TEST_F(RenderTextTest, HarfBuzz_FallbackFontsSupportGlyphs) { … }
TEST_F(RenderTextTest, HarfBuzz_MultiRunsSupportGlyphs) { … }
struct FallbackFontCase { … };
class RenderTextTestWithFallbackFontCase
: public RenderTextTest,
public ::testing::WithParamInterface<FallbackFontCase> { … };
TEST_P(RenderTextTestWithFallbackFontCase, FallbackFont) { … }
const FallbackFontCase kUnicodeDecomposeCases[] = …;
INSTANTIATE_TEST_SUITE_P(…);
const FallbackFontCase kComplexTextCases[] = …;
INSTANTIATE_TEST_SUITE_P(…);
const FallbackFontCase kCommonScriptCases[] = …;
INSTANTIATE_TEST_SUITE_P(…);
#if BUILDFLAG(IS_WIN)
TEST_F(RenderTextTest, CJKFontWithLocale) {
const char16_t kCJKTest[] = u"\u8AA4\u904E\u9AA8";
static const char* kLocaleTests[] = {"zh-CN", "ja-JP", "ko-KR"};
std::set<std::string> tested_font_names;
for (const auto* locale : kLocaleTests) {
base::i18n::SetICUDefaultLocale(locale);
ResetRenderTextInstance();
RenderTextHarfBuzz* render_text = GetRenderText();
render_text->SetText(kCJKTest);
const std::vector<FontSpan> font_spans = GetFontSpans();
ASSERT_EQ(font_spans.size(), 1U);
bool unique_font_name =
tested_font_names.insert(font_spans[0].first.GetFontName()).second;
EXPECT_TRUE(unique_font_name);
}
}
#endif
TEST_F(RenderTextTest, SameFontAccrossIgnorableCodepoints) { … }
TEST_F(RenderTextTest, ZeroWidthCharacters) { … }
TEST_F(RenderTextTest, DISABLED_TextDoesntClip) { … }
TEST_F(RenderTextTest, DISABLED_TextDoesClip) { … }
TEST_F(RenderTextTest, ColorChange) { … }
TEST_F(RenderTextTest, StylePropagated) { … }
TEST_F(RenderTextTest, SubpixelRenderingSuppressed) { … }
TEST_F(RenderTextTest, SkFontEdging) { … }
TEST_F(RenderTextTest, GetWordLookupDataAtPoint_LTR) { … }
TEST_F(RenderTextTest, GetWordLookupDataAtPoint_RTL) { … }
TEST_F(RenderTextTest, GetWordLookupDataAtPoint_Multiline) { … }
TEST_F(RenderTextTest, GetWordLookupDataAtPoint_Return) { … }
TEST_F(RenderTextTest, GetLookupDataAtRange_Multiline) { … }
TEST_F(RenderTextTest, GetLookupDataAtRange_Size) { … }
TEST_F(RenderTextTest, LineEndSelections) { … }
TEST_F(RenderTextTest, GetSubstringBounds) { … }
TEST_F(RenderTextTest, GetSubstringBoundsFloatingPoint) { … }
TEST_F(RenderTextTest, GetSubstringBoundsInt) { … }
TEST_F(RenderTextTest, GetSubstringBoundsMultiline) { … }
TEST_F(RenderTextTest, InvalidFont) { … }
TEST_F(RenderTextTest, ExpandToBeVerticallySymmetric) { … }
TEST_F(RenderTextTest, MergeIntersectingRects) { … }
TEST_F(RenderTextTest, BaselineWithLineHeight) { … }
TEST_F(RenderTextTest, TeluguGraphemeBoundaries) { … }
TEST_F(RenderTextTest, MissingFlagEmoji) { … }
TEST_F(RenderTextTest, ObscuredGlyphSpacing) { … }
TEST_F(RenderTextTest, ObscuredGlyphSpacingOnNonObscuredText) { … }
TEST_F(RenderTextTest, FontSizeOverride) { … }
TEST_F(RenderTextTest, DrawVisualText_WithSelection) { … }
TEST_F(RenderTextTest, DrawVisualText_WithSelectionOnObcuredEmoji) { … }
TEST_F(RenderTextTest, DrawSelectAll) { … }
TEST_F(RenderTextTest, GetLookupDataForRange_Obscured) { … }
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
TEST_F(RenderTextTest, StringSizeUpdatedWhenDeviceScaleFactorChanges) { … }
#endif
TEST_F(RenderTextTest, Clusterfuzz_Issue_1298286) { … }
TEST_F(RenderTextTest, Clusterfuzz_Issue_1299054) { … }
TEST_F(RenderTextTest, Clusterfuzz_Issue_1287804) { … }
TEST_F(RenderTextTest, Clusterfuzz_Issue_1193815) { … }
class RenderTextDirectionTest
: public testing::Test,
public testing::WithParamInterface<std::string> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(RenderTextDirectionTest, GetCurrentHorizontalAlignment) { … }
}