| Index: third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp b/third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp
|
| index 024594ab16286deace7b595c5441dd3da6e6865b..cb84abc87a712237507a64ed04f7385262b26058 100644
|
| --- a/third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp
|
| @@ -550,6 +550,15 @@ TEST_F(EditingUtilitiesTest, uncheckedPreviousNextOffset)
|
| EXPECT_EQ(4, nextGraphemeBoundaryOf(node, 0));
|
| EXPECT_EQ(5, nextGraphemeBoundaryOf(node, 4));
|
|
|
| + // Not only Glue_After_ZWJ or EBG but also other emoji shouldn't break
|
| + // before ZWJ.
|
| + // U+1F5FA(WORLD MAP) doesn't have either Glue_After_Zwj or EBG but has
|
| + // Emoji property.
|
| + setBodyContent("<p id='target'>‍🗺</p>");
|
| + node = document().getElementById("target")->firstChild();
|
| + EXPECT_EQ(0, previousGraphemeBoundaryOf(node, 3));
|
| + EXPECT_EQ(3, nextGraphemeBoundaryOf(node, 0));
|
| +
|
| // GB999: Otherwise break everywhere.
|
| // Breaks between Hangul syllable except for GB6, GB7, GB8.
|
| setBodyContent("<p id='target'>" + L + T + "</p>");
|
| @@ -626,9 +635,9 @@ TEST_F(EditingUtilitiesTest, uncheckedPreviousNextOffset)
|
|
|
| // For GB11, if trailing character is not Glue_After_Zwj or EBG, break happens after ZWJ.
|
| // U+1F5FA(WORLD MAP) doesn't have either Glue_After_Zwj or EBG.
|
| - setBodyContent("<p id='target'>‍🗺</p>");
|
| + setBodyContent("<p id='target'>‍a</p>");
|
| node = document().getElementById("target")->firstChild();
|
| - EXPECT_EQ(1, previousGraphemeBoundaryOf(node, 3));
|
| + EXPECT_EQ(1, previousGraphemeBoundaryOf(node, 2));
|
| EXPECT_EQ(1, nextGraphemeBoundaryOf(node, 0));
|
| }
|
|
|
|
|