#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/platform/fonts/shaping/shape_result_bloberizer.h"
#include <memory>
#include <optional>
#include "skia/ext/font_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/platform/fonts/character_range.h"
#include "third_party/blink/renderer/platform/fonts/font.h"
#include "third_party/blink/renderer/platform/fonts/opentype/open_type_vertical_data.h"
#include "third_party/blink/renderer/platform/fonts/shaping/caching_word_shaper.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/fonts/simple_font_data.h"
#include "third_party/blink/renderer/platform/fonts/text_fragment_paint_info.h"
#include "third_party/blink/renderer/platform/fonts/text_run_paint_info.h"
#include "third_party/blink/renderer/platform/testing/font_test_base.h"
#include "third_party/blink/renderer/platform/testing/font_test_helpers.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
namespace blink {
namespace {
static SimpleFontData* CreateTestSimpleFontData(bool force_rotation = false) { … }
class ShapeResultBloberizerTest : public FontTestBase { … };
struct ExpectedRun { … };
ExpectedBlob;
struct ExpectedRange { … };
void CheckBlobBuffer(const ShapeResultBloberizer::BlobBuffer& blob_buffer,
const std::vector<ExpectedBlob>& expected_blobs) { … }
}
TEST_F(ShapeResultBloberizerTest, StartsEmpty) { … }
TEST_F(ShapeResultBloberizerTest, StoresGlyphsOffsets) { … }
TEST_F(ShapeResultBloberizerTest, StoresGlyphsVerticalOffsets) { … }
TEST_F(ShapeResultBloberizerTest, MixedBlobRotation) { … }
TEST_F(ShapeResultBloberizerTest, CommonAccentLeftToRightFillGlyphBuffer) { … }
TEST_F(ShapeResultBloberizerTest, CommonAccentRightToLeftFillGlyphBuffer) { … }
TEST_F(ShapeResultBloberizerTest, CommonAccentRightToLeftFillGlyphBufferNG) { … }
TEST_F(ShapeResultBloberizerTest, FourByteUtf8CodepointsNG) { … }
TEST_F(ShapeResultBloberizerTest, OffsetIntoTrailingSurrogateNG) { … }
TEST_F(ShapeResultBloberizerTest, LatinMultRunNG) { … }
TEST_F(ShapeResultBloberizerTest, SupplementaryMultiRunNG) { … }
TEST_F(ShapeResultBloberizerTest, SubRunWithZeroGlyphs) { … }
}