| Index: third_party/WebKit/Source/platform/fonts/CharacterTest.cpp
|
| diff --git a/third_party/WebKit/Source/platform/fonts/CharacterTest.cpp b/third_party/WebKit/Source/platform/fonts/CharacterTest.cpp
|
| index 4f0b86256dd6616e6e682f2484ea3b201e1beb16..419561a155687d335c02dddf4a643e3bf56636c3 100644
|
| --- a/third_party/WebKit/Source/platform/fonts/CharacterTest.cpp
|
| +++ b/third_party/WebKit/Source/platform/fonts/CharacterTest.cpp
|
| @@ -386,4 +386,32 @@ TEST(CharacterTest, LineBreakAndQuoteNotEmoji)
|
| EXPECT_FALSE(Character::isEmojiTextPresentation('"'));
|
| }
|
|
|
| +TEST(CharacterTest, Truncation)
|
| +{
|
| + const UChar32 base = 0x90000;
|
| + UChar32 testChar = 0;
|
| +
|
| + testChar = base + spaceCharacter;
|
| + EXPECT_FALSE(Character::treatAsSpace(testChar));
|
| + testChar = base + noBreakSpaceCharacter;
|
| + EXPECT_FALSE(Character::treatAsSpace(testChar));
|
| +
|
| + testChar = base + zeroWidthNonJoinerCharacter;
|
| + EXPECT_FALSE(Character::treatAsZeroWidthSpace(testChar));
|
| + testChar = base + zeroWidthJoinerCharacter;
|
| + EXPECT_FALSE(Character::treatAsZeroWidthSpace(testChar));
|
| +
|
| + testChar = base + 0x12;
|
| + EXPECT_FALSE(Character::treatAsZeroWidthSpaceInComplexScript(testChar));
|
| + EXPECT_FALSE(Character::treatAsZeroWidthSpaceInComplexScript(testChar));
|
| + testChar = base + objectReplacementCharacter;
|
| + EXPECT_FALSE(Character::treatAsZeroWidthSpaceInComplexScript(testChar));
|
| +
|
| + testChar = base + 0xA;
|
| + EXPECT_FALSE(Character::isNormalizedCanvasSpaceCharacter(testChar));
|
| + testChar = base + 0x9;
|
| + EXPECT_FALSE(Character::isNormalizedCanvasSpaceCharacter(testChar));
|
| +
|
| +}
|
| +
|
| } // namespace blink
|
|
|