Merge "Sync test-application" into devel/master
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-TextLabel.cpp
index e91c2b8..c9453e1 100644 (file)
@@ -836,6 +836,13 @@ 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();
+
   END_TEST;
 }
 
@@ -1641,7 +1648,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 +1795,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, "<a href='https://www.tizen.org'>TIZEN</a>");
+  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 +1832,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();