X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-TextLabel.cpp;h=be0e5b197884df121cf8ada6ae8a43d8a54c89df;hp=e91c2b8baa804ca36126aed38e00b24cd03e67a2;hb=fbd8d4da2506b57b46a71c5d113f4cb86f23c731;hpb=21080c3c8107e51c71da5b319d83162a57c171b4 diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp index e91c2b8..be0e5b1 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp @@ -836,6 +836,44 @@ int UtcDaliToolkitTextLabelEmojisP(void) application.SendNotification(); application.Render(); + // EMOJI + ZWJ + EMOJI case for coverage. + const std::string emojiWithZWJ = "👩‍🔬"; + label.SetProperty( TextLabel::Property::TEXT, emojiWithZWJ ); + + application.SendNotification(); + application.Render(); + + // EMOJI Sequences case for coverage. + std::string emojiSequences = + "Text VS15 ☪︎\n" //text presentation sequence and selector + "Color VS16 ☪️\n" //emoji presentation sequence and selector + "Default ☪ \n" //default presentation + "FamilyManWomanGirlBoy 👨‍👩‍👧‍👦\n" // emoji multi zwj sequence + "WomanScientist 👩‍🔬\n" // emoji zwj sequence + "WomanScientistLightSkinTone👩🏻‍🔬 \n" //emoji modifier sequence: skin tone & JWZ + "LeftRightArrowText↔︎\n" //text presentation sequence and selector + "LeftRightArrowEmoji↔️\n" //emoji presentation sequence and selector + "SouthKoreaFlag🇰🇷\n" //emoji flag sequence + "JordanFlag🇯🇴\n" // emoji flag sequence + "EnglandFlag🏴󠁧󠁢󠁥󠁮󠁧󠁿\n" //emoji tag sequence like England flag + "Runner 🏃‍➡️ \n" + "VictoryHandMediumLightSkinTone:✌️🏼\n" //emoji modifier sequence: skin tone + "RainbowFlag:🏳️‍🌈 \n" //emoji zwj sequence: Rainbow Flag + "keycap# #️⃣ \n" // fully-qualified emoji keycap sequence + "keycap#_text #⃣ \n" // unqualified emoji keycap sequence + "keycap3 3️⃣ \n" // fully-qualified emoji keycap sequence + "keycap3_text 3⃣ \n" // unqualified emoji keycap sequence + "two adjacent glyphs ☪️️️☪️\n" //This line should be rendered as two adjacent glyphs + "Digit 8️ 8︎ 8\n" // should be rendered according to selector + "Surfing Medium Skin Female: 🏄🏼‍♀️"; // Person Surfing + Medium Skin Tone +? Zero Width Joiner + Female Sign + + label.SetProperty( TextLabel::Property::TEXT, emojiSequences ); + label.SetProperty( TextLabel::Property::ENABLE_MARKUP, true ); + label.SetProperty( TextLabel::Property::MULTI_LINE, true); + label.SetProperty( TextLabel::Property::ELLIPSIS, false); + + application.SendNotification(); + application.Render(); END_TEST; } @@ -1641,7 +1679,7 @@ int UtcDaliToolkitTextlabelTextFit(void) application.SendNotification(); application.Render(); - const Vector3 EXPECTED_NATURAL_SIZE( 452.0f, 94.0f, 0.0f ); + const Vector3 EXPECTED_NATURAL_SIZE( 450.0f, 96.0f, 0.0f ); DALI_TEST_EQUALS( EXPECTED_NATURAL_SIZE, label.GetNaturalSize(), TEST_LOCATION ); // check pixel size @@ -1788,7 +1826,34 @@ int UtcDaliToolkitTextlabelAnchorClicked(void) application.Render(); // Create a tap event to touch the text label. - TestGenerateTap(application, 5.0f, 25.0f); + TestGenerateTap(application, 5.0f, 25.0f, 100); + application.SendNotification(); + application.Render(); + + DALI_TEST_CHECK(gAnchorClickedCallBackCalled); + DALI_TEST_CHECK(anchorClickedSignal); + + // reset + gAnchorClickedCallBackCalled = false; + anchorClickedSignal = false; + label.SetProperty(TextLabel::Property::TEXT, ""); + label.SetProperty(TextLabel::Property::ENABLE_MARKUP, false); + + application.SendNotification(); + application.Render(); + + // sets anchor text + label.SetProperty(TextLabel::Property::ENABLE_MARKUP, true); + label.SetProperty(TextLabel::Property::TEXT, "TIZEN"); + label.SetProperty(Actor::Property::SIZE, Vector2(100.f, 50.f)); + label.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT); + label.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT); + + application.SendNotification(); + application.Render(); + + // Create a tap event to touch the text label. + TestGenerateTap(application, 5.0f, 25.0f, 200); application.SendNotification(); application.Render(); @@ -1798,7 +1863,7 @@ int UtcDaliToolkitTextlabelAnchorClicked(void) gAnchorClickedCallBackNotCalled = true; // Tap the outside of anchor, callback should not be called. - TestGenerateTap(application, 150.f, 100.f); + TestGenerateTap(application, 150.f, 100.f, 300); application.SendNotification(); application.Render();