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-TextField.cpp;h=7e6b21e21a3707ff03a1227bc43e09172c57d853;hp=2d8a983322d03623241e7d9e69f357d4dff6f0dd;hb=a705c754f9d19640969ed75213884756e764a465;hpb=ddc5e140b9152111a0bfd172c2c14a9025b926c5 diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp index 2d8a983..7e6b21e 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp @@ -17,9 +17,9 @@ #include #include +#include #include #include -#include #include #include #include @@ -75,7 +75,7 @@ const char* const PROPERTY_NAME_INPUT_METHOD_SETTINGS = "input-me const unsigned int DEFAULT_RENDERING_BACKEND = Dali::Toolkit::Text::DEFAULT_RENDERING_BACKEND; const Vector4 PLACEHOLDER_TEXT_COLOR( 0.8f, 0.8f, 0.8f, 0.8f ); -const Dali::Vector4 LIGHT_BLUE( (0xb2 / 255.0f), (0xeb / 255.0f), (0xf2 / 255.0f), 0.5f ); // The text highlight color. +const Dali::Vector4 LIGHT_BLUE( 0.75f, 0.96f, 1.f, 1.f ); // The text highlight color. const unsigned int CURSOR_BLINK_INTERVAL = 500u; // Cursor blink interval const float TO_MILLISECONDS = 1000.f; @@ -293,8 +293,8 @@ int UtcDaliTextFieldSetPropertyP(void) DALI_TEST_EQUALS( field.GetProperty( TextField::Property::SELECTION_HIGHLIGHT_COLOR ), LIGHT_BLUE, TEST_LOCATION ); // Check the render backend property. - field.SetProperty( TextField::Property::RENDERING_BACKEND, Text::RENDERING_BASIC ); - DALI_TEST_EQUALS( field.GetProperty( TextField::Property::RENDERING_BACKEND ), Text::RENDERING_BASIC, TEST_LOCATION ); + field.SetProperty( TextField::Property::RENDERING_BACKEND, Text::RENDERING_SHARED_ATLAS ); + DALI_TEST_EQUALS( field.GetProperty( TextField::Property::RENDERING_BACKEND ), Text::RENDERING_SHARED_ATLAS, TEST_LOCATION ); // Check text property. field.SetProperty( TextField::Property::TEXT, "Setting Text" ); @@ -387,34 +387,6 @@ int UtcDaliTextFieldSetPropertyP(void) END_TEST; } -// Positive Basic Text Renderer test -int utcDaliTextFieldBasicRenderP(void) -{ - ToolkitTestApplication application; - tet_infoline("UtcDaliToolkitTextFieldBasicRenderP"); - TextField field = TextField::New(); - DALI_TEST_CHECK( field ); - - field.SetProperty( TextField::Property::HORIZONTAL_ALIGNMENT, "BEGIN" ); - - application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE ); - - Stage::GetCurrent().Add( field ); - - try - { - // Render some text with the basic backend - field.SetProperty( TextField::Property::RENDERING_BACKEND, Text::RENDERING_BASIC ); - application.SendNotification(); - application.Render(); - } - catch( ... ) - { - tet_result(TET_FAIL); - } - END_TEST; -} - // Positive Atlas Text Renderer test int utcDaliTextFieldAtlasRenderP(void) { @@ -696,7 +668,7 @@ int utcDaliTextFieldEvent02(void) CameraActor camera = CameraActor::DownCast( offscreenRoot.GetChildAt( 0u ) ); DALI_TEST_CHECK( camera ); - RenderableActor renderer = RenderableActor::DownCast( offscreenRoot.GetChildAt( 1u ) ); + Renderer renderer = offscreenRoot.GetChildAt( 1u ).GetRendererAt( 0u ); DALI_TEST_CHECK( renderer ); // Move the cursor and check the position changes. @@ -763,7 +735,7 @@ int utcDaliTextFieldEvent02(void) // Cursor position should be the same than position2. Vector3 position6 = cursor.GetCurrentPosition(); - DALI_TEST_EQUALS( Vector3( 0.f, position2.y, position2.z ), position6, TEST_LOCATION ); // TODO Should be in the same position2. + DALI_TEST_EQUALS( position2, position6, TEST_LOCATION );// Should be in the same position2. // Should not be renderer. DALI_TEST_EQUALS( offscreenRoot.GetChildCount(), 1u, TEST_LOCATION ); // The camera actor only. @@ -818,10 +790,10 @@ int utcDaliTextFieldEvent03(void) CameraActor camera = CameraActor::DownCast( offscreenRoot.GetChildAt( 0u ) ); DALI_TEST_CHECK( camera ); - RenderableActor renderer = RenderableActor::DownCast( offscreenRoot.GetChildAt( 1u ) ); + Renderer renderer = offscreenRoot.GetChildAt( 1u ).GetRendererAt( 0u ); DALI_TEST_CHECK( renderer ); - MeshActor highlight = MeshActor::DownCast( offscreenRoot.GetChildAt( 2u ) ); + Renderer highlight = offscreenRoot.GetChildAt( 2u ).GetRendererAt( 0u ); DALI_TEST_CHECK( highlight ); END_TEST;