Text - Stop destroying the text renderer when text decoration is updated.
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-TextEditor.cpp
index a361701..52f4f87 100644 (file)
@@ -597,17 +597,14 @@ int utcDaliTextEditorEvent02(void)
   application.SendNotification();
   application.Render();
 
   application.SendNotification();
   application.Render();
 
-  // Check there are the expected number of children ( active layer, offscreen root actor, and the offscreen image view
-  DALI_TEST_EQUALS( editor.GetChildCount(), 3u, TEST_LOCATION );
+  // Check there are the expected number of children ( offscreen root actor, and the offscreen image view
+  DALI_TEST_EQUALS( editor.GetChildCount(), 2u, TEST_LOCATION );
 
 
-  Actor layer = editor.GetChildAt( 0u );
-  DALI_TEST_CHECK( layer.IsLayer() );
-
-  Actor offscreenRoot = editor.GetChildAt( 1u );
+  Actor offscreenRoot = editor.GetChildAt( 0u );
   DALI_TEST_CHECK( offscreenRoot.IsLayer() );
   DALI_TEST_EQUALS( offscreenRoot.GetChildCount(), 1u, TEST_LOCATION ); // The camera actor.
 
   DALI_TEST_CHECK( offscreenRoot.IsLayer() );
   DALI_TEST_EQUALS( offscreenRoot.GetChildCount(), 1u, TEST_LOCATION ); // The camera actor.
 
-  Actor offscreenImage = editor.GetChildAt( 2u );
+  Actor offscreenImage = editor.GetChildAt( 1u );
   DALI_TEST_CHECK( offscreenImage );
 
   // Create a tap event to touch the text editor.
   DALI_TEST_CHECK( offscreenImage );
 
   // Create a tap event to touch the text editor.
@@ -618,6 +615,9 @@ int utcDaliTextEditorEvent02(void)
   application.SendNotification();
   application.Render();
 
   application.SendNotification();
   application.Render();
 
+  Actor layer = editor.GetChildAt( 2u );
+  DALI_TEST_CHECK( layer.IsLayer() );
+
   DALI_TEST_EQUALS( layer.GetChildCount(), 1u, TEST_LOCATION ); // The cursor.
   DALI_TEST_EQUALS( offscreenRoot.GetChildCount(), 1u, TEST_LOCATION ); // The camera actor.
 
   DALI_TEST_EQUALS( layer.GetChildCount(), 1u, TEST_LOCATION ); // The cursor.
   DALI_TEST_EQUALS( offscreenRoot.GetChildCount(), 1u, TEST_LOCATION ); // The camera actor.
 
@@ -756,7 +756,7 @@ int utcDaliTextEditorEvent03(void)
   application.Render();
 
   // The offscreen root actor should have three actors: the camera, a renderer and the highlight actor.
   application.Render();
 
   // The offscreen root actor should have three actors: the camera, a renderer and the highlight actor.
-  Actor offscreenRoot = editor.GetChildAt( 1u );
+  Actor offscreenRoot = editor.GetChildAt( 0u );
   DALI_TEST_CHECK( offscreenRoot.IsLayer() );
 
   CameraActor camera = CameraActor::DownCast( offscreenRoot.GetChildAt( 0u ) );
   DALI_TEST_CHECK( offscreenRoot.IsLayer() );
 
   CameraActor camera = CameraActor::DownCast( offscreenRoot.GetChildAt( 0u ) );