X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-TextField.cpp;h=2c1aa442fd8644a66dec199d7a8ab3a1a520cafa;hb=refs%2Fchanges%2F54%2F132954%2F5;hp=3e91406e013c7b7872733af4d80b44a19d95a0c6;hpb=97416ad7c6d7d11f05105e829946050c08a3bf8c;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp index 3e91406..2c1aa44 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp @@ -97,6 +97,7 @@ const char* const PROPERTY_NAME_OUTLINE = "outline" const char* const PROPERTY_NAME_INPUT_OUTLINE = "inputOutline"; const char* const PROPERTY_NAME_HIDDEN_INPUT_SETTINGS = "hiddenInputSettings"; +const char* const PROPERTY_NAME_PIXEL_SIZE = "pixelSize"; const int DEFAULT_RENDERING_BACKEND = Dali::Toolkit::Text::DEFAULT_RENDERING_BACKEND; @@ -505,6 +506,7 @@ int UtcDaliTextFieldGetPropertyP(void) DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_OUTLINE ) == TextField::Property::OUTLINE ); DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_INPUT_OUTLINE ) == TextField::Property::INPUT_OUTLINE ); DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_HIDDEN_INPUT_SETTINGS ) == DevelTextField::Property::HIDDEN_INPUT_SETTINGS ); + DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_PIXEL_SIZE ) == DevelTextField::Property::PIXEL_SIZE ); END_TEST; } @@ -839,6 +841,10 @@ int UtcDaliTextFieldSetPropertyP(void) DALI_TEST_EQUALS( hiddenMapSet.Count(), hiddenMapGet.Count(), TEST_LOCATION ); DALI_TEST_EQUALS( DaliTestCheckMaps( hiddenMapSet, hiddenMapGet ), true, TEST_LOCATION ); + // Check the pixel size of font + field.SetProperty( DevelTextField::Property::PIXEL_SIZE, 20.f ); + DALI_TEST_EQUALS( field.GetProperty( DevelTextField::Property::PIXEL_SIZE ), 20.f, Math::MACHINE_EPSILON_1000, TEST_LOCATION ); + END_TEST; } @@ -1696,17 +1702,18 @@ int utcDaliTextFieldEvent03(void) // The offscreen root actor should have two actors: the renderer and the highlight actor. Actor stencil = field.GetChildAt( 0u ); + // The highlight actor is drawn first, so is the first actor in the list + Renderer highlight = stencil.GetChildAt( 0u ).GetRendererAt( 0u ); + DALI_TEST_CHECK( highlight ); + // The offscreen root actor has a container with all the actors which contain the text renderers. - Actor container = stencil.GetChildAt( 0u ); + Actor container = stencil.GetChildAt( 1u ); for( unsigned int index = 0; index < container.GetChildCount(); ++index ) { Renderer renderer = container.GetChildAt( index ).GetRendererAt( 0u ); DALI_TEST_CHECK( renderer ); } - Renderer highlight = stencil.GetChildAt( 1u ).GetRendererAt( 0u ); - DALI_TEST_CHECK( highlight ); - END_TEST; }