Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1468)

Unified Diff: third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaperTest.cpp

Issue 1780723002: Enable Emoji Fitzpatrick modifier sequences (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased on renamed CharacterData file Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaperTest.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaperTest.cpp b/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaperTest.cpp
index a0191534596c04371bafae352b60ec76d1d3e5c9..cac30b86b0e0fdbc292324a7700fc47461e668d6 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaperTest.cpp
+++ b/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaperTest.cpp
@@ -351,6 +351,25 @@ TEST_F(CachingWordShaperTest, SegmentEmojiHeartZWJSequence)
ASSERT_FALSE(iterator.next(&wordResult));
}
+TEST_F(CachingWordShaperTest, SegmentEmojiSignsOfHornsModifier)
+{
+ // A Sign of the Horns emoji, followed by a fitzpatrick modifer
+ const UChar str[] = {
+ 0xD83E, 0xDD18,
+ 0xD83C, 0xDFFB,
+ 0x0
+ };
+ TextRun textRun(str, 4);
+
+ RefPtr<ShapeResult> wordResult;
+ CachingWordShapeIterator iterator(cache.get(), textRun, &font);
+
+ ASSERT_TRUE(iterator.next(&wordResult));
+ EXPECT_EQ(4u, wordResult->numCharacters());
+
+ ASSERT_FALSE(iterator.next(&wordResult));
+}
+
TEST_F(CachingWordShaperTest, SegmentEmojiExtraZWJPrefix)
{
// A ZWJ, followed by a family and a heart-kiss sequence.

Powered by Google App Engine
This is Rietveld 408576698