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

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

Issue 2603343002: Emoji fixes: Two professions and digits with VS16 (Closed)
Patch Set: Created 3 years, 12 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 d5d717e9d6a5ddfbc6f71145559b23919f00aeba..d94a8e4a26c01809f24fc493eb366a96e06e8552 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaperTest.cpp
+++ b/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaperTest.cpp
@@ -300,6 +300,22 @@ TEST_F(CachingWordShaperTest, SegmentEmojiZWJCommon) {
ASSERT_FALSE(iterator.next(&wordResult));
}
+TEST_F(CachingWordShaperTest, SegmentEmojiPilotJudgeSequence) {
+ // A family followed by a couple with heart emoji sequence,
+ // the latter including a variation selector.
+ const UChar str[] = {0xD83D, 0xDC68, 0xD83C, 0xDFFB, 0x200D, 0x2696, 0xFE0F,
+ 0xD83D, 0xDC68, 0xD83C, 0xDFFB, 0x200D, 0x2708, 0xFE0F};
+ TextRun textRun(str, ARRAY_SIZE(str));
+
+ RefPtr<const ShapeResult> wordResult;
+ CachingWordShapeIterator iterator(cache.get(), textRun, &font);
+
+ ASSERT_TRUE(iterator.next(&wordResult));
+ EXPECT_EQ(ARRAY_SIZE(str), wordResult->numCharacters());
+
+ ASSERT_FALSE(iterator.next(&wordResult));
+}
+
TEST_F(CachingWordShaperTest, SegmentEmojiHeartZWJSequence) {
// A ZWJ, followed by two family ZWJ Sequences.
const UChar str[] = {0xD83D, 0xDC69, 0x200D, 0x2764, 0xFE0F, 0x200D,

Powered by Google App Engine
This is Rietveld 408576698