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

Unified Diff: third_party/WebKit/Source/platform/text/TextBreakIteratorTest.cpp

Issue 2478383003: Remove isBreakValid for Emoji sequences (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « third_party/WebKit/Source/platform/text/TextBreakIterator.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/text/TextBreakIteratorTest.cpp
diff --git a/third_party/WebKit/Source/platform/text/TextBreakIteratorTest.cpp b/third_party/WebKit/Source/platform/text/TextBreakIteratorTest.cpp
index 2cd42e025aadc74eec18c2ceb196cb4563b99a43..c08aec58374f82d1badd15f4b167d96a292fffe3 100644
--- a/third_party/WebKit/Source/platform/text/TextBreakIteratorTest.cpp
+++ b/third_party/WebKit/Source/platform/text/TextBreakIteratorTest.cpp
@@ -66,16 +66,14 @@ TEST_F(TextBreakIteratorTest, Chinese) {
}
TEST_F(TextBreakIteratorTest, KeepEmojiZWJFamilyIsolate) {
- SetTestString(
- "\xF0\x9F\x91\xA8\xE2\x80\x8D\xF0\x9F\x91\xA9\xE2\x80\x8D\xF0\x9F\x91\xA7"
- "\xE2\x80\x8D\xF0\x9F\x91\xA6");
+ SetTestString(u8"\U0001F468\u200D\U0001F469\u200D\U0001F467\u200D\U0001F466");
MATCH_LINE_BREAKS(LineBreakType::Normal, {11});
MATCH_LINE_BREAKS(LineBreakType::BreakAll, {11});
MATCH_LINE_BREAKS(LineBreakType::KeepAll, {11});
}
TEST_F(TextBreakIteratorTest, KeepEmojiModifierSequenceIsolate) {
- SetTestString("\xE2\x98\x9D\xF0\x9F\x8F\xBB");
+ SetTestString(u8"\u261D\U0001F3FB");
MATCH_LINE_BREAKS(LineBreakType::Normal, {3});
MATCH_LINE_BREAKS(LineBreakType::BreakAll, {3});
MATCH_LINE_BREAKS(LineBreakType::KeepAll, {3});
@@ -83,16 +81,14 @@ TEST_F(TextBreakIteratorTest, KeepEmojiModifierSequenceIsolate) {
TEST_F(TextBreakIteratorTest, KeepEmojiZWJSequence) {
SetTestString(
- "abc "
- "\xF0\x9F\x91\xA9\xE2\x80\x8D\xF0\x9F\x91\xA9\xE2\x80\x8D\xF0\x9F\x91\xA7"
- "\xE2\x80\x8D\xF0\x9F\x91\xA7 def");
+ u8"abc \U0001F469\u200D\U0001F469\u200D\U0001F467\u200D\U0001F467 def");
MATCH_LINE_BREAKS(LineBreakType::Normal, {3, 15, 19});
MATCH_LINE_BREAKS(LineBreakType::BreakAll, {1, 2, 3, 15, 17, 18, 19});
MATCH_LINE_BREAKS(LineBreakType::KeepAll, {3, 15, 19});
}
TEST_F(TextBreakIteratorTest, KeepEmojiModifierSequence) {
- SetTestString("abc \xE2\x98\x9D\xF0\x9F\x8F\xBB def");
+ SetTestString(u8"abc \u261D\U0001F3FB def");
MATCH_LINE_BREAKS(LineBreakType::Normal, {3, 7, 11});
MATCH_LINE_BREAKS(LineBreakType::BreakAll, {1, 2, 3, 7, 9, 10, 11});
MATCH_LINE_BREAKS(LineBreakType::KeepAll, {3, 7, 11});
« no previous file with comments | « third_party/WebKit/Source/platform/text/TextBreakIterator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698