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=ec4b100c74cb942fed4f0cdbdb20fbf902d3c85f;hp=2f2e69259cb9f524f590843645f04e13ce1dc514;hb=baef46c4babda42017ab2d5fbd362ae9e11be95b;hpb=4cfc161e92f47722b38d58987ac8f8773bad13c5 diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp index 2f2e692..ec4b100 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp @@ -222,6 +222,8 @@ int UtcDaliToolkitTextLabelSetPropertyP(void) TextLabel label = TextLabel::New(); DALI_TEST_CHECK( label ); + Stage::GetCurrent().Add( label ); + // Note - we can't check the defaults since the stylesheets are platform-specific label.SetProperty( TextLabel::Property::RENDERING_BACKEND, Text::RENDERING_SHARED_ATLAS ); DALI_TEST_EQUALS( (Text::RenderingType)label.GetProperty( TextLabel::Property::RENDERING_BACKEND ), Text::RENDERING_SHARED_ATLAS, TEST_LOCATION ); @@ -345,6 +347,13 @@ int UtcDaliToolkitTextLabelSetPropertyP(void) label.SetProperty( TextLabel::Property::ENABLE_MARKUP, true ); DALI_TEST_CHECK( label.GetProperty( TextLabel::Property::ENABLE_MARKUP ) ); + // Check the text property when markup is enabled + label.SetProperty( TextLabel::Property::TEXT, "MarkupText" ); + DALI_TEST_EQUALS( label.GetProperty( TextLabel::Property::TEXT ), std::string("MarkupText"), TEST_LOCATION ); + + application.SendNotification(); + application.Render(); + // Check autoscroll properties const int SCROLL_SPEED = 80; const int SCROLL_LOOPS = 4; @@ -388,6 +397,9 @@ int UtcDaliToolkitTextLabelSetPropertyP(void) label.SetProperty( TextLabel::Property::UNDERLINE, underlineMapSet ); + application.SendNotification(); + application.Render(); + underlineMapGet = label.GetProperty( TextLabel::Property::UNDERLINE ); DALI_TEST_EQUALS( underlineMapGet.Count(), underlineMapSet.Count(), TEST_LOCATION ); DALI_TEST_EQUALS( DaliTestCheckMaps( underlineMapGet, underlineMapSet ), true, TEST_LOCATION ); @@ -434,6 +446,13 @@ int UtcDaliToolkitTextLabelSetPropertyP(void) DALI_TEST_EQUALS( label.GetProperty( TextLabel::Property::EMBOSS ), std::string("Emboss properties"), TEST_LOCATION ); // Check the outline property + + // Test string type first + // This is purely to maintain backward compatibility, but we don't support string as the outline property type. + label.SetProperty( TextLabel::Property::OUTLINE, "Outline properties" ); + DALI_TEST_EQUALS( label.GetProperty( TextLabel::Property::OUTLINE ), std::string("Outline properties"), TEST_LOCATION ); + + // Then test the property map type Property::Map outlineMapSet; Property::Map outlineMapGet; @@ -558,6 +577,11 @@ int UtcDaliToolkitTextLabelEmojisP(void) label.SetProperty( TextLabel::Property::ENABLE_MARKUP, true ); label.SetProperty( TextLabel::Property::TEXT, emojis ); + Property::Map shadowMap; + shadowMap.Insert( "color", "green" ); + shadowMap.Insert( "offset", "2 2" ); + label.SetProperty( TextLabel::Property::SHADOW, shadowMap ); + application.SendNotification(); application.Render();