Change cursor parent from Layer to Actor
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-TextField.cpp
old mode 100755 (executable)
new mode 100644 (file)
index 39cd605..a759941
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 #include <dali/public-api/rendering/renderer.h>
 #include <dali/integration-api/events/key-event-integ.h>
-#include <dali/integration-api/events/tap-gesture-event.h>
 #include <dali/integration-api/events/touch-event-integ.h>
-#include <dali/integration-api/events/pan-gesture-event.h>
-#include <dali/integration-api/events/long-press-gesture-event.h>
+
 #include <dali/devel-api/adaptor-framework/key-devel.h>
+#include <dali/devel-api/text-abstraction/font-client.h>
 #include <dali-toolkit-test-suite-utils.h>
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali-toolkit/devel-api/controls/text-controls/text-field-devel.h>
+#include <dali-toolkit/devel-api/text/rendering-backend.h>
 #include "toolkit-clipboard.h"
 
 using namespace Dali;
@@ -102,6 +102,8 @@ const char* const PROPERTY_NAME_ELLIPSIS                             = "ellipsis
 const char* const PROPERTY_NAME_ENABLE_SHIFT_SELECTION               = "enableShiftSelection";
 const char* const PROPERTY_NAME_ENABLE_GRAB_HANDLE                   = "enableGrabHandle";
 const char* const PROPERTY_NAME_MATCH_SYSTEM_LANGUAGE_DIRECTION      = "matchSystemLanguageDirection";
+const char* const PROPERTY_NAME_ENABLE_GRAB_HANDLE_POPUP             = "enableGrabHandlePopup";
+const char* const PROPERTY_NAME_BACKGROUND                           = "textBackground";
 
 const Vector4 PLACEHOLDER_TEXT_COLOR( 0.8f, 0.8f, 0.8f, 0.8f );
 const Dali::Vector4 LIGHT_BLUE( 0.75f, 0.96f, 1.f, 1.f ); // The text highlight color.
@@ -149,48 +151,6 @@ static void LoadMarkerImages(ToolkitTestApplication& app, TextField textField)
   textField.SetProperty( Toolkit::TextField::Property::GRAB_HANDLE_PRESSED_IMAGE, propertyMap );
 }
 
-// Generate a PanGestureEvent to send to Core
-static Integration::PanGestureEvent GeneratePan(
-    Gesture::State state,
-    const Vector2& previousPosition,
-    const Vector2& currentPosition,
-    unsigned long timeDelta,
-    unsigned int numberOfTouches = 1)
-{
-  Integration::PanGestureEvent pan(state);
-
-  pan.previousPosition = previousPosition;
-  pan.currentPosition = currentPosition;
-  pan.timeDelta = timeDelta;
-  pan.numberOfTouches = numberOfTouches;
-
-  return pan;
-}
-
-/**
- * Helper to generate PanGestureEvent
- *
- * @param[in] application Application instance
- * @param[in] state The Gesture State
- * @param[in] pos The current position of touch.
- */
-static void SendPan(ToolkitTestApplication& application, Gesture::State state, const Vector2& pos)
-{
-  static Vector2 last;
-
-  if( (state == Gesture::Started) ||
-      (state == Gesture::Possible) )
-  {
-    last.x = pos.x;
-    last.y = pos.y;
-  }
-
-  application.ProcessEvent(GeneratePan(state, last, pos, 16));
-
-  last.x = pos.x;
-  last.y = pos.y;
-}
-
 /*
  * Simulate time passed by.
  *
@@ -266,34 +226,6 @@ static void TestInputStyleChangedCallback( TextField control, TextField::InputSt
   gInputStyleMask = mask;
 }
 
-// Generate a TapGestureEvent to send to Core.
-Integration::TapGestureEvent GenerateTap(
-    Gesture::State state,
-    unsigned int numberOfTaps,
-    unsigned int numberOfTouches,
-    Vector2 point)
-{
-  Integration::TapGestureEvent tap( state );
-
-  tap.numberOfTaps = numberOfTaps;
-  tap.numberOfTouches = numberOfTouches;
-  tap.point = point;
-
-  return tap;
-}
-
-Integration::LongPressGestureEvent GenerateLongPress(
-    Gesture::State state,
-    unsigned int numberOfTouches,
-    Vector2 point)
-{
-  Integration::LongPressGestureEvent longPress( state );
-
-  longPress.numberOfTouches = numberOfTouches;
-  longPress.point = point;
-  return longPress;
-}
-
 // Generate a KeyEvent to send to Core.
 Integration::KeyEvent GenerateKey( const std::string& keyName,
                                    const std::string& logicalKey,
@@ -455,6 +387,23 @@ int UtcDaliToolkitTextFieldCopyConstructorP(void)
   END_TEST;
 }
 
+int UtcDaliTextFieldMoveConstructor(void)
+{
+  ToolkitTestApplication application;
+
+  TextField textField = TextField::New();
+  textField.SetProperty( TextEditor::Property::TEXT, "Test" );
+  DALI_TEST_CHECK( textField.GetProperty<std::string>( TextField::Property::TEXT ) == "Test" );
+
+  TextField moved = std::move( textField );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( moved.GetProperty<std::string>( TextField::Property::TEXT ) == "Test" );
+  DALI_TEST_CHECK( !textField );
+
+  END_TEST;
+}
+
 int UtcDaliToolkitTextFieldAssignmentOperatorP(void)
 {
   ToolkitTestApplication application;
@@ -468,6 +417,24 @@ int UtcDaliToolkitTextFieldAssignmentOperatorP(void)
   END_TEST;
 }
 
+int UtcDaliTextFieldMoveAssignment(void)
+{
+  ToolkitTestApplication application;
+
+  TextField textField = TextField::New();
+  textField.SetProperty( TextEditor::Property::TEXT, "Test" );
+  DALI_TEST_CHECK( textField.GetProperty<std::string>( TextField::Property::TEXT ) == "Test" );
+
+  TextField moved;
+  moved = std::move( textField );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( moved.GetProperty<std::string>( TextField::Property::TEXT ) == "Test" );
+  DALI_TEST_CHECK( !textField );
+
+  END_TEST;
+}
+
 int UtcDaliTextFieldNewP(void)
 {
   ToolkitTestApplication application;
@@ -486,7 +453,7 @@ int UtcDaliTextFieldGetPropertyP(void)
   DALI_TEST_CHECK( field );
 
   // Check Property Indices are correct
-  DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_RENDERING_BACKEND ) == TextField::Property::RENDERING_BACKEND );
+  DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_RENDERING_BACKEND ) == DevelTextField::Property::RENDERING_BACKEND );
   DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_TEXT ) == TextField::Property::TEXT );
   DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_PLACEHOLDER_TEXT ) == TextField::Property::PLACEHOLDER_TEXT );
   DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_PLACEHOLDER_TEXT_FOCUSED ) == TextField::Property::PLACEHOLDER_TEXT_FOCUSED );
@@ -539,6 +506,8 @@ int UtcDaliTextFieldGetPropertyP(void)
   DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_ENABLE_SHIFT_SELECTION ) == DevelTextField::Property::ENABLE_SHIFT_SELECTION );
   DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_ENABLE_GRAB_HANDLE ) == DevelTextField::Property::ENABLE_GRAB_HANDLE );
   DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_MATCH_SYSTEM_LANGUAGE_DIRECTION ) == DevelTextField::Property::MATCH_SYSTEM_LANGUAGE_DIRECTION );
+  DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_ENABLE_GRAB_HANDLE_POPUP ) == DevelTextField::Property::ENABLE_GRAB_HANDLE_POPUP );
+  DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_BACKGROUND ) == DevelTextField::Property::BACKGROUND );
 
   END_TEST;
 }
@@ -568,13 +537,16 @@ int UtcDaliTextFieldSetPropertyP(void)
   tet_infoline(" UtcDaliToolkitTextFieldSetPropertyP");
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
-  Stage::GetCurrent().Add( field );
+  application.GetScene().Add( field );
 
   // Note - we can't check the defaults since the stylesheets are platform-specific
 
   // Check the render backend property.
-  field.SetProperty( TextField::Property::RENDERING_BACKEND, Text::RENDERING_SHARED_ATLAS );
-  DALI_TEST_EQUALS( (Text::RenderingType)field.GetProperty<int>( TextField::Property::RENDERING_BACKEND ), Text::RENDERING_SHARED_ATLAS, TEST_LOCATION );
+  field.SetProperty( DevelTextField::Property::RENDERING_BACKEND, DevelText::RENDERING_SHARED_ATLAS );
+  DALI_TEST_EQUALS( (DevelText::RenderingType)field.GetProperty<int>( DevelTextField::Property::RENDERING_BACKEND ), DevelText::RENDERING_SHARED_ATLAS, TEST_LOCATION );
+
+  field.SetProperty( DevelTextField::Property::RENDERING_BACKEND, DevelText::RENDERING_VECTOR_BASED );
+  DALI_TEST_EQUALS( (DevelText::RenderingType)field.GetProperty<int>( DevelTextField::Property::RENDERING_BACKEND ), DevelText::RENDERING_VECTOR_BASED, TEST_LOCATION );
 
   // Check text property.
   field.SetProperty( TextField::Property::TEXT, "Setting Text" );
@@ -806,9 +778,9 @@ int UtcDaliTextFieldSetPropertyP(void)
   Property::Map underlineMapSet;
   Property::Map underlineMapGet;
 
-  underlineMapSet.Insert( "enable", "true" );
-  underlineMapSet.Insert( "color", "red" );
-  underlineMapSet.Insert( "height", "1" );
+  underlineMapSet.Insert( "enable", true );
+  underlineMapSet.Insert( "color", Color::RED );
+  underlineMapSet.Insert( "height", 1 );
 
   // Check the underline property
   field.SetProperty( TextField::Property::UNDERLINE, underlineMapSet );
@@ -993,6 +965,15 @@ int UtcDaliTextFieldSetPropertyP(void)
   field.SetProperty( Actor::Property::LAYOUT_DIRECTION, LayoutDirection::RIGHT_TO_LEFT );
   DALI_TEST_EQUALS( field.GetProperty<int>( Actor::Property::LAYOUT_DIRECTION ), static_cast<int>( LayoutDirection::RIGHT_TO_LEFT ), TEST_LOCATION );
 
+  // Test the ENABLE_GRAB_HANDLE_POPUP property
+  DALI_TEST_CHECK( field.GetProperty<bool>( DevelTextField::Property::ENABLE_GRAB_HANDLE_POPUP ) );
+  field.SetProperty( DevelTextField::Property::ENABLE_GRAB_HANDLE_POPUP, false );
+  DALI_TEST_CHECK( !field.GetProperty<bool>( DevelTextField::Property::ENABLE_GRAB_HANDLE_POPUP ) );
+
+  // Check the background property
+  field.SetProperty( DevelTextField::Property::BACKGROUND, Color::RED );
+  DALI_TEST_EQUALS( field.GetProperty<Vector4>( DevelTextField::Property::BACKGROUND ), Color::RED, TEST_LOCATION );
+
   application.SendNotification();
   application.Render();
 
@@ -1013,12 +994,12 @@ int utcDaliTextFieldAtlasRenderP(void)
 
   application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
 
-  Stage::GetCurrent().Add( field );
+  application.GetScene().Add( field );
 
   try
   {
     // Render some text with the shared atlas backend
-    field.SetProperty( TextField::Property::RENDERING_BACKEND, Text::RENDERING_SHARED_ATLAS );
+    field.SetProperty( DevelTextField::Property::RENDERING_BACKEND, DevelText::RENDERING_SHARED_ATLAS );
     application.SendNotification();
     application.Render();
   }
@@ -1037,7 +1018,7 @@ int utcDaliTextFieldTextChangedP(void)
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
 
-  Stage::GetCurrent().Add( field );
+  application.GetScene().Add( field );
 
   // connect to the text changed signal.
   ConnectionTracker* testTracker = new ConnectionTracker();
@@ -1055,7 +1036,7 @@ int utcDaliTextFieldTextChangedP(void)
   field.SetKeyInputFocus();
 
   gTextChangedCallBackCalled = false;
-  application.ProcessEvent( GenerateKey( "D", "", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, "D", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "D", "", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::DOWN, "D", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   DALI_TEST_CHECK( gTextChangedCallBackCalled );
 
   END_TEST;
@@ -1069,7 +1050,7 @@ int utcDaliTextFieldTextChangedN(void)
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
 
-  Stage::GetCurrent().Add( field );
+  application.GetScene().Add( field );
 
   // connect to the text changed signal.
   ConnectionTracker* testTracker = new ConnectionTracker();
@@ -1093,7 +1074,7 @@ int utcDaliTextFieldMaxCharactersReachedP(void)
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
 
-  Stage::GetCurrent().Add( field );
+  application.GetScene().Add( field );
 
   const int maxNumberOfCharacters = 1;
   field.SetProperty( TextField::Property::MAX_LENGTH, maxNumberOfCharacters );
@@ -1108,8 +1089,8 @@ int utcDaliTextFieldMaxCharactersReachedP(void)
 
   gMaxCharactersCallBackCalled = false;
 
-  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::DOWN, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::DOWN, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   DALI_TEST_CHECK( gMaxCharactersCallBackCalled );
   DALI_TEST_CHECK( maxLengthReachedSignal );
@@ -1125,7 +1106,7 @@ int utcDaliTextFieldMaxCharactersReachedN(void)
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
 
-  Stage::GetCurrent().Add( field );
+  application.GetScene().Add( field );
 
   const int maxNumberOfCharacters = 3;
   field.SetProperty( TextField::Property::MAX_LENGTH, maxNumberOfCharacters );
@@ -1140,13 +1121,13 @@ int utcDaliTextFieldMaxCharactersReachedN(void)
 
   gMaxCharactersCallBackCalled = false;
 
-  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::DOWN, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::DOWN, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   DALI_TEST_CHECK( !gMaxCharactersCallBackCalled );
   DALI_TEST_CHECK( !maxLengthReachedSignal );
 
-  application.ProcessEvent( GenerateKey( "Return", "", "\r", KEY_RETURN_CODE, 0, 0, Integration::KeyEvent::Down, "\r", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "Return", "", "\r", KEY_RETURN_CODE, 0, 0, Integration::KeyEvent::DOWN, "\r", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   DALI_TEST_CHECK( !gMaxCharactersCallBackCalled );
   DALI_TEST_CHECK( !maxLengthReachedSignal );
@@ -1156,15 +1137,13 @@ int utcDaliTextFieldMaxCharactersReachedN(void)
 
 int utcDaliTextFieldInputStyleChanged01(void)
 {
-  ToolkitTestApplication application;
-  tet_infoline(" utcDaliTextFieldInputStyleChanged01");
-
   // The text-field emits signals when the input style changes. These changes of style are
   // detected during the relayout process (size negotiation), i.e after the cursor has been moved. Signals
   // can't be emitted during the size negotiation as the callbacks may update the UI.
   // The text-field adds an idle callback to the adaptor to emit the signals after the size negotiation.
-  // This creates an implementation of the adaptor stub and a queue of idle callbacks.
-  application.CreateAdaptor();
+  // The ToolkitTestApplication creates an implementation of the adaptor stub and a queue of idle callbacks.
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldInputStyleChanged01");
 
   // Load some fonts.
 
@@ -1182,9 +1161,9 @@ int utcDaliTextFieldInputStyleChanged01(void)
   DALI_TEST_CHECK( field );
 
 
-  field.SetSize( 300.f, 50.f );
-  field.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+  field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
+  field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
 
   field.SetProperty( TextField::Property::ENABLE_MARKUP, true );
   field.SetProperty( TextField::Property::TEXT, "<font family='DejaVuSerif' size='18'>He<color value='green'>llo</color> <font weight='bold'>world</font> demo</font>" );
@@ -1195,7 +1174,7 @@ int utcDaliTextFieldInputStyleChanged01(void)
   bool inputStyleChangedSignal = false;
   field.ConnectSignal( testTracker, "inputStyleChanged",   CallbackFunctor(&inputStyleChangedSignal) );
 
-  Stage::GetCurrent().Add( field );
+  application.GetScene().Add( field );
 
   // Render and notify
   application.SendNotification();
@@ -1209,8 +1188,7 @@ int utcDaliTextFieldInputStyleChanged01(void)
   inputStyleChangedSignal = false;
 
   // Create a tap event to touch the text field.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 18.f, 25.f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 18.f, 25.f ) ) );
+  TestGenerateTap( application, 18.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
@@ -1237,8 +1215,7 @@ int utcDaliTextFieldInputStyleChanged01(void)
   inputStyleChangedSignal = false;
 
   // Create a tap event to touch the text field.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 30.f, 25.f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 30.f, 25.f ) ) );
+  TestGenerateTap( application, 30.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
@@ -1255,8 +1232,7 @@ int utcDaliTextFieldInputStyleChanged01(void)
   inputStyleChangedSignal = false;
 
   // Create a tap event to touch the text field.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 43.f, 25.f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 43.f, 25.f ) ) );
+  TestGenerateTap( application, 43.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
@@ -1280,8 +1256,7 @@ int utcDaliTextFieldInputStyleChanged01(void)
   inputStyleChangedSignal = false;
 
   // Create a tap event to touch the text field.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 88.f, 25.f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 88.f, 25.f ) ) );
+  TestGenerateTap( application, 88.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
@@ -1313,8 +1288,7 @@ int utcDaliTextFieldInputStyleChanged01(void)
   inputStyleChangedSignal = false;
 
   // Create a tap event to touch the text field.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 115.f, 25.f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 115.f, 25.f ) ) );
+  TestGenerateTap( application, 115.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
@@ -1331,8 +1305,7 @@ int utcDaliTextFieldInputStyleChanged01(void)
   inputStyleChangedSignal = false;
 
   // Create a tap event to touch the text field.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 164.f, 25.f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 164.f, 25.f ) ) );
+  TestGenerateTap( application, 164.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
@@ -1356,8 +1329,7 @@ int utcDaliTextFieldInputStyleChanged01(void)
   inputStyleChangedSignal = false;
 
   // Create a tap event to touch the text field.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 191.f, 25.f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 191.f, 25.f ) ) );
+  TestGenerateTap( application, 191.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
@@ -1374,15 +1346,13 @@ int utcDaliTextFieldInputStyleChanged01(void)
 
 int utcDaliTextFieldInputStyleChanged02(void)
 {
-  ToolkitTestApplication application;
-  tet_infoline(" utcDaliTextFieldInputStyleChanged02");
-
   // The text-field emits signals when the input style changes. These changes of style are
   // detected during the relayout process (size negotiation), i.e after the cursor has been moved. Signals
   // can't be emitted during the size negotiation as the callbacks may update the UI.
   // The text-field adds an idle callback to the adaptor to emit the signals after the size negotiation.
-  // This creates an implementation of the adaptor stub and a queue of idle callbacks.
-  application.CreateAdaptor();
+  // The ToolkitTestApplication creates an implementation of the adaptor stub and a queue of idle callbacks.
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldInputStyleChanged02");
 
   // Load some fonts.
 
@@ -1399,10 +1369,9 @@ int utcDaliTextFieldInputStyleChanged02(void)
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
 
-
-  field.SetSize( 300.f, 50.f );
-  field.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+  field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
+  field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
 
   field.SetProperty( TextField::Property::ENABLE_MARKUP, true );
   field.SetProperty( TextField::Property::TEXT, "<font family='DejaVuSerif' size='18'>He<color value='blue'> l</color><color value='green'>lo</color> <font weight='bold'>world</font> demo</font>" );
@@ -1413,7 +1382,7 @@ int utcDaliTextFieldInputStyleChanged02(void)
   bool inputStyleChangedSignal = false;
   field.ConnectSignal( testTracker, "inputStyleChanged",   CallbackFunctor(&inputStyleChangedSignal) );
 
-  Stage::GetCurrent().Add( field );
+  application.GetScene().Add( field );
 
   // Render and notify
   application.SendNotification();
@@ -1427,10 +1396,8 @@ int utcDaliTextFieldInputStyleChanged02(void)
   inputStyleChangedSignal = false;
 
   // Create a tap event to touch the text field.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 53.f, 25.f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 53.f, 25.f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 2u, 1u, Vector2( 53.f, 25.f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 2u, 1u, Vector2( 53.f, 25.f ) ) );
+  TestGenerateTap( application, 53.0f, 25.0f, 100 );
+  TestGenerateTap( application, 53.0f, 25.0f, 200 );
 
   // Render and notify
   application.SendNotification();
@@ -1463,7 +1430,7 @@ int utcDaliTextFieldInputStyleChanged02(void)
   gInputStyleMask = TextField::InputStyle::NONE;
   inputStyleChangedSignal = false;
 
-  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1488,7 +1455,7 @@ int utcDaliTextFieldInputStyleChanged02(void)
   gInputStyleMask = TextField::InputStyle::NONE;
   inputStyleChangedSignal = false;
 
-  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1504,7 +1471,7 @@ int utcDaliTextFieldInputStyleChanged02(void)
   gInputStyleMask = TextField::InputStyle::NONE;
   inputStyleChangedSignal = false;
 
-  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1555,8 +1522,7 @@ int utcDaliTextFieldInputStyleChanged02(void)
   DALI_TEST_CHECK( !inputStyleChangedSignal );
 
   // Create a tap event to touch the text field.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 63.f, 25.f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 63.f, 25.f ) ) );
+  TestGenerateTap( application, 63.0f, 25.0f, 300 );
 
   // Render and notify
   application.SendNotification();
@@ -1597,11 +1563,15 @@ int utcDaliTextFieldEvent01(void)
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
 
-  Stage::GetCurrent().Add( field );
+  application.GetScene().Add( field );
 
-  field.SetSize( 300.f, 50.f );
-  field.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+  field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
+  field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
 
   // Avoid a crash when core load gl resources.
   application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
@@ -1611,7 +1581,7 @@ int utcDaliTextFieldEvent01(void)
   application.Render();
 
   // Add a key event but as the text field has not the focus it should do nothing.
-  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::DOWN, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1620,22 +1590,21 @@ int utcDaliTextFieldEvent01(void)
   DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::TEXT ), std::string(""), TEST_LOCATION );
 
   // Create a tap event to touch the text field.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
+  TestGenerateTap( application, 150.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Pressing delete key should be fine even if there is no text in TextField.
-  application.ProcessEvent( GenerateKey( "Delete", "", "Delete", Dali::DevelKey::DALI_KEY_DELETE, 0, 0, Integration::KeyEvent::Down, "Delete", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "Delete", "", "Delete", Dali::DevelKey::DALI_KEY_DELETE, 0, 0, Integration::KeyEvent::DOWN, "Delete", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Now the text field has the focus, so it can handle the key events.
-  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::DOWN, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::DOWN, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1646,28 +1615,27 @@ int utcDaliTextFieldEvent01(void)
   // Create a second text field and send key events to it.
   TextField field2 = TextField::New();
 
-  field2.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  field2.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-  field2.SetSize( 100.f, 100.f );
-  field2.SetPosition( 100.f, 100.f );
+  field2.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  field2.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+  field2.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
+  field2.SetProperty( Actor::Property::POSITION, Vector2( 100.0f, 100.0f ));
 
-  Stage::GetCurrent().Add( field2 );
+  application.GetScene().Add( field2 );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Create a tap event on the second text field.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 150.0f, 125.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 150.0f, 125.0f ) ) );
+  TestGenerateTap( application, 150.0f, 125.0f );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // The second text field has the focus. It should handle the key events.
-  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::DOWN, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::DOWN, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1691,11 +1659,11 @@ int utcDaliTextFieldEvent02(void)
   DALI_TEST_CHECK( field );
   LoadMarkerImages(application, field);
 
-  Stage::GetCurrent().Add( field );
+  application.GetScene().Add( field );
 
-  field.SetSize( 300.f, 50.f );
-  field.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+  field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
+  field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
 
   // Avoid a crash when core load gl resources.
   application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
@@ -1711,22 +1679,19 @@ int utcDaliTextFieldEvent02(void)
   DALI_TEST_EQUALS( stencil.GetChildCount(), 0u, TEST_LOCATION );
 
   // Create a tap event to touch the text field.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
+  TestGenerateTap( application, 150.0f, 25.0f, 300 );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   Actor layer = field.GetChildAt( 1u );
-  DALI_TEST_CHECK( layer.IsLayer() );
-
   DALI_TEST_EQUALS( layer.GetChildCount(), 1u, TEST_LOCATION ); // The cursor.
   DALI_TEST_EQUALS( stencil.GetChildCount(), 0u, TEST_LOCATION );
 
   // Now the text field has the focus, so it can handle the key events.
-  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::DOWN, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::DOWN, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -1748,60 +1713,64 @@ int utcDaliTextFieldEvent02(void)
   }
 
   // Move the cursor and check the position changes.
-  Vector3 position1 = cursor.GetCurrentPosition();
-
-  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  Vector3 position1 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
-  Vector3 position2 = cursor.GetCurrentPosition();
-
+  Vector3 position2 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
   DALI_TEST_CHECK( position2.x < position1.x );
 
-  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
-  Vector3 position3 = cursor.GetCurrentPosition();
-
+  Vector3 position3 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
   DALI_TEST_EQUALS( position1, position3, TEST_LOCATION ); // Should be in the same position1.
 
+
+  // Move the cursor to the first position.
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  Vector3 position4 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
+
   // Send some taps and check the cursor positions.
 
   // Try to tap at the beginning.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 1.f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 1.f, 25.0f ) ) );
+  TestGenerateTap( application, 1.0f, 25.0f, 900 );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Cursor position should be the same than position1.
-  Vector3 position4 = cursor.GetCurrentPosition();
+  Vector3 position5 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
 
-  DALI_TEST_EQUALS( position2, position4, TEST_LOCATION ); // Should be in the same position2.
+  DALI_TEST_EQUALS( position4, position5, TEST_LOCATION ); // Should be in the same position2.
 
   // Tap away from the start position.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 16.f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 16.0f, 25.0f ) ) );
+  TestGenerateTap( application, 16.0f, 25.0f, 1500 );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
-  Vector3 position5 = cursor.GetCurrentPosition();
+  Vector3 position6 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
 
-  DALI_TEST_CHECK( position5.x > position4.x );
+  DALI_TEST_CHECK( position6.x > position5.x );
 
   // Remove all the text.
-  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   field.SetProperty( TextField::Property::TEXT, "" );
 
   // Render and notify
@@ -1809,9 +1778,9 @@ int utcDaliTextFieldEvent02(void)
   application.Render();
 
   // Cursor position should be the same than position2.
-  Vector3 position6 = cursor.GetCurrentPosition();
+  Vector3 position7 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
 
-  DALI_TEST_EQUALS( position2, position6, TEST_LOCATION );// Should be in the same position2.
+  DALI_TEST_EQUALS( position4, position7, TEST_LOCATION );// Should be in the same position2.
 
   // Should not be a renderer.
   DALI_TEST_EQUALS( stencil.GetChildCount(), 0u, TEST_LOCATION );
@@ -1839,13 +1808,13 @@ int utcDaliTextFieldEvent03(void)
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
 
-  Stage::GetCurrent().Add( field );
+  application.GetScene().Add( field );
 
   field.SetProperty( TextField::Property::TEXT, "This is a long text for the size of the text-field." );
   field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
-  field.SetSize( 30.f, 50.f );
-  field.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+  field.SetProperty( Actor::Property::SIZE, Vector2( 30.f, 50.f ) );
+  field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
 
   // Avoid a crash when core load gl resources.
   application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
@@ -1856,16 +1825,14 @@ int utcDaliTextFieldEvent03(void)
   application.Render();
 
   // Tap first to get the focus.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 3.f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 3.f, 25.0f ) ) );
+  TestGenerateTap( application, 3.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Double tap to select a word.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 2u, 1u, Vector2( 3.f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 2u, 1u, Vector2( 3.f, 25.0f ) ) );
+  TestGenerateTap( application, 3.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
@@ -1898,7 +1865,7 @@ int utcDaliTextFieldEvent04(void)
 
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
-  Stage::GetCurrent().Add( field );
+  application.GetScene().Add( field );
   LoadMarkerImages(application, field);
   // Render and notify
   application.SendNotification();
@@ -1906,9 +1873,9 @@ int utcDaliTextFieldEvent04(void)
 
   field.SetProperty( TextField::Property::TEXT, "This is a long text for the size of the text-field." );
   field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
-  field.SetSize( 300.f, 50.f );
-  field.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+  field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
+  field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
 
   // Avoid a crash when core load gl resources.
   application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
@@ -1917,32 +1884,28 @@ int utcDaliTextFieldEvent04(void)
   application.Render();
 
   // Create a tap event to touch the text field.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
+  TestGenerateTap( application, 150.0f, 25.0f );
   // Render and notify
   application.SendNotification();
   application.Render();
 
 
   // Tap first to get the focus.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 1.f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 1.f, 25.0f ) ) );
+  TestGenerateTap( application, 1.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Double tap to select a word.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 2u, 1u, Vector2( 1.f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 2u, 1u, Vector2( 1.f, 25.0f ) ) );
+  TestGenerateTap( application, 1.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Tap grab handle
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 0.f, 40.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 0.f, 40.0f ) ) );
+  TestGenerateTap( application, 0.0f, 40.0f );
   END_TEST;
 }
 
@@ -1955,7 +1918,7 @@ int utcDaliTextFieldEvent05(void)
 
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
-  Stage::GetCurrent().Add( field );
+  application.GetScene().Add( field );
   LoadMarkerImages(application, field);
   // Render and notify
   application.SendNotification();
@@ -1963,9 +1926,9 @@ int utcDaliTextFieldEvent05(void)
 
   field.SetProperty( TextField::Property::TEXT, "This is a long text for the size of the text-field." );
   field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
-  field.SetSize( 300.f, 50.f );
-  field.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+  field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
+  field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
 
   // Avoid a crash when core load gl resources.
   application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
@@ -1974,45 +1937,25 @@ int utcDaliTextFieldEvent05(void)
   application.Render();
 
   // Create a tap event to touch the text field.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
+  TestGenerateTap( application, 150.0f, 25.0f );
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Tap first to get the focus.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 1.f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 1.f, 25.0f ) ) );
+  TestGenerateTap( application, 1.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Double tap to select a word.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 2u, 1u, Vector2( 1.f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 2u, 1u, Vector2( 1.f, 25.0f ) ) );
+  TestGenerateTap( application, 1.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
-  // drag grab handle right
-  Vector2 pos(0.0f, 40.0f);
-  SendPan(application, Gesture::Possible, pos);
-  SendPan(application, Gesture::Started, pos);
-  pos.x += 5.0f;
-  Wait(application, 100);
-
-  for(int i = 0;i<20;i++)
-  {
-    SendPan(application, Gesture::Continuing, pos);
-    pos.x += 5.0f;
-    Wait(application);
-  }
-
-  SendPan(application, Gesture::Finished, pos);
-  Wait(application, RENDER_FRAME_INTERVAL);
-
   Actor stencil = field.GetChildAt( 1u );
   END_TEST;
 }
@@ -2026,7 +1969,7 @@ int utcDaliTextFieldEvent06(void)
 
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
-  Stage::GetCurrent().Add( field );
+  application.GetScene().Add( field );
   LoadMarkerImages(application, field);
   // Render and notify
   application.SendNotification();
@@ -2034,9 +1977,9 @@ int utcDaliTextFieldEvent06(void)
 
   field.SetProperty( TextField::Property::TEXT, "Thisisalongtextforthesizeofthetextfield." );
   field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
-  field.SetSize( 300.f, 50.f );
-  field.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+  field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
+  field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
 
   // Avoid a crash when core load gl resources.
   application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
@@ -2045,24 +1988,21 @@ int utcDaliTextFieldEvent06(void)
   application.Render();
 
   // Create a tap event to touch the text field.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
+  TestGenerateTap( application, 150.0f, 25.0f );
   // Render and notify
   application.SendNotification();
   application.Render();
 
 
   // Tap first to get the focus.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 1.f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 1.f, 25.0f ) ) );
+  TestGenerateTap( application, 1.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Long Press
-  application.ProcessEvent( GenerateLongPress( Gesture::Possible, 1u, Vector2( 1.f, 25.0f ) ) );
-  application.ProcessEvent( GenerateLongPress( Gesture::Started,  1u, Vector2( 1.f, 25.0f ) ) );
+  TestGenerateLongPress(application, 1.0f, 25.0f);
 
   // Render and notify
   application.SendNotification();
@@ -2080,7 +2020,7 @@ int utcDaliTextFieldEvent07(void)
 
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
-  Stage::GetCurrent().Add( field );
+  application.GetScene().Add( field );
   LoadMarkerImages(application, field);
   // Render and notify
   application.SendNotification();
@@ -2088,9 +2028,9 @@ int utcDaliTextFieldEvent07(void)
 
   field.SetProperty( TextField::Property::TEXT, "Thisisalongtextforthesizeofthetextfield." );
   field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
-  field.SetSize( 300.f, 50.f );
-  field.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+  field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
+  field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
   Property::Map propertyMap;
   propertyMap["PANEL_LAYOUT"] = InputMethod::PanelLayout::PASSWORD;
   field.SetProperty( TextField::Property::INPUT_METHOD_SETTINGS, propertyMap );
@@ -2102,8 +2042,7 @@ int utcDaliTextFieldEvent07(void)
   application.Render();
 
   // Long Press
-  application.ProcessEvent( GenerateLongPress( Gesture::Possible, 1u, Vector2( 1.f, 25.0f ) ) );
-  application.ProcessEvent( GenerateLongPress( Gesture::Started,  1u, Vector2( 1.f, 25.0f ) ) );
+  TestGenerateLongPress(application, 1.0f, 25.0f);
 
   // Render and notify
   application.SendNotification();
@@ -2124,7 +2063,7 @@ int utcDaliTextFieldEvent08(void)
 
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
-  Stage::GetCurrent().Add( field );
+  application.GetScene().Add( field );
   LoadMarkerImages(application, field);
   // Render and notify
   application.SendNotification();
@@ -2132,9 +2071,9 @@ int utcDaliTextFieldEvent08(void)
 
   field.SetProperty( TextField::Property::PLACEHOLDER_TEXT, "Setting Placeholder Text" );
   field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
-  field.SetSize( 300.f, 50.f );
-  field.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+  field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
+  field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
 
   // Avoid a crash when core load gl resources.
   application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
@@ -2143,8 +2082,7 @@ int utcDaliTextFieldEvent08(void)
   application.Render();
 
   // Long Press
-  application.ProcessEvent( GenerateLongPress( Gesture::Possible, 1u, Vector2( 1.f, 25.0f ) ) );
-  application.ProcessEvent( GenerateLongPress( Gesture::Started,  1u, Vector2( 1.f, 25.0f ) ) );
+  TestGenerateLongPress( application, 1.0f, 25.0f, 20 );
 
   // Render and notify
   application.SendNotification();
@@ -2152,23 +2090,23 @@ int utcDaliTextFieldEvent08(void)
 
   Wait(application, 500);
 
+  TestEndLongPress( application, 1.0f, 25.0f, 520 );
+
   // Long Press
-  application.ProcessEvent( GenerateLongPress( Gesture::Possible, 1u, Vector2( 1.f, 25.0f ) ) );
-  application.ProcessEvent( GenerateLongPress( Gesture::Started,  1u, Vector2( 1.f, 25.0f ) ) );
+  TestGenerateLongPress( application, 1.0f, 25.0f, 600 );
 
   // Render and notify
-  application.SendNotification();
   application.Render();
 
   Wait(application, 500);
 
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
   Layer layer = stage.GetRootLayer();
   Actor actor = layer.FindChildByName("optionPaste");
 
   if (actor)
   {
-    Vector3 worldPosition = actor.GetCurrentWorldPosition();
+    Vector3 worldPosition = actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION );
     Vector2 halfStageSize = stage.GetSize() / 2.0f;
     Vector2 position(worldPosition.x + halfStageSize.width, worldPosition.y + halfStageSize.height);
 
@@ -2193,7 +2131,7 @@ int utcDaliTextFieldEvent09(void)
 
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
-  Stage::GetCurrent().Add( field );
+  application.GetScene().Add( field );
   LoadMarkerImages(application, field);
   // Render and notify
   application.SendNotification();
@@ -2201,30 +2139,29 @@ int utcDaliTextFieldEvent09(void)
 
   field.SetProperty( TextField::Property::TEXT, "Hello" );
   field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
-  field.SetSize( 300.f, 50.f );
-  field.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+  field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
+  field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
 
   // Avoid a crash when core load gl resources.
   application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
 
   // Create a tap event to touch the text field.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
+  TestGenerateTap( application, 150.0f, 25.0f );
   application.SendNotification();
   application.Render();
 
   Property::Map map;
   map[ HiddenInput::Property::MODE ] = HiddenInput::Mode::HIDE_NONE;
   field.SetProperty( TextField::Property::HIDDEN_INPUT_SETTINGS, map );
-  application.ProcessEvent( GenerateKey( "d", "", "d", 0, 0, 0, Integration::KeyEvent::Down, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "d", "", "d", 0, 0, 0, Integration::KeyEvent::DOWN, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   application.SendNotification();
   application.Render();
 
   map[ HiddenInput::Property::MODE ] = HiddenInput::Mode::HIDE_ALL;
   map[ HiddenInput::Property::SUBSTITUTE_CHARACTER ] = 0x23;
   field.SetProperty( TextField::Property::HIDDEN_INPUT_SETTINGS, map );
-  application.ProcessEvent( GenerateKey( "d", "", "d", 0, 0, 0, Integration::KeyEvent::Down, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "d", "", "d", 0, 0, 0, Integration::KeyEvent::DOWN, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   application.SendNotification();
   application.Render();
 
@@ -2233,7 +2170,7 @@ int utcDaliTextFieldEvent09(void)
   field.SetProperty( TextField::Property::HIDDEN_INPUT_SETTINGS, map );
   for( unsigned int index = 0u; index < 5u; ++index )
   {
-    application.ProcessEvent( GenerateKey( "d", "", "d", 0, 0, 0, Integration::KeyEvent::Down, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+    application.ProcessEvent( GenerateKey( "d", "", "d", 0, 0, 0, Integration::KeyEvent::DOWN, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
     application.SendNotification();
     application.Render();
   }
@@ -2243,7 +2180,7 @@ int utcDaliTextFieldEvent09(void)
   field.SetProperty( TextField::Property::HIDDEN_INPUT_SETTINGS, map );
   for( unsigned int index = 0u; index < 5u; ++index )
   {
-    application.ProcessEvent( GenerateKey( "d", "", "d", 0, 0, 0, Integration::KeyEvent::Down, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+    application.ProcessEvent( GenerateKey( "d", "", "d", 0, 0, 0, Integration::KeyEvent::DOWN, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
     application.SendNotification();
     application.Render();
   }
@@ -2251,16 +2188,16 @@ int utcDaliTextFieldEvent09(void)
   map[ HiddenInput::Property::MODE ] = HiddenInput::Mode::SHOW_LAST_CHARACTER;
   map[ HiddenInput::Property::SHOW_LAST_CHARACTER_DURATION ] = 0;
   field.SetProperty( TextField::Property::HIDDEN_INPUT_SETTINGS, map );
-  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   application.SendNotification();
   application.Render();
-  application.ProcessEvent( GenerateKey( "d", "", "d", 0, 0, 0, Integration::KeyEvent::Down, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "d", "", "d", 0, 0, 0, Integration::KeyEvent::DOWN, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   application.SendNotification();
   application.Render();
 
   map[ HiddenInput::Property::SHOW_LAST_CHARACTER_DURATION ] = 100;
   field.SetProperty( TextField::Property::HIDDEN_INPUT_SETTINGS, map );
-  application.ProcessEvent( GenerateKey( "d", "", "d", 0, 0, 0, Integration::KeyEvent::Down, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "d", "", "d", 0, 0, 0, Integration::KeyEvent::DOWN, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   application.SendNotification();
   application.Render();
 
@@ -2281,7 +2218,7 @@ int utcDaliTextFieldStyleWhilstSelected(void)
 
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
-  Stage::GetCurrent().Add( field );
+  application.GetScene().Add( field );
   LoadMarkerImages(application, field);
   // Render and notify
   application.SendNotification();
@@ -2289,9 +2226,9 @@ int utcDaliTextFieldStyleWhilstSelected(void)
 
   field.SetProperty( TextField::Property::TEXT, "This is a long text for the size of the text-field." );
   field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
-  field.SetSize( 300.f, 50.f );
-  field.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+  field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
+  field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
 
   // Avoid a crash when core load gl resources.
   application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
@@ -2300,24 +2237,21 @@ int utcDaliTextFieldStyleWhilstSelected(void)
   application.Render();
 
   // Create a tap event to touch the text field.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
+  TestGenerateTap( application, 150.0f, 25.0f );
   // Render and notify
   application.SendNotification();
   application.Render();
 
 
   // Tap first to get the focus.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 1.f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 1.f, 25.0f ) ) );
+  TestGenerateTap( application, 1.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Double tap to select a word.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 2u, 1u, Vector2( 1.f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 2u, 1u, Vector2( 1.f, 25.0f ) ) );
+  TestGenerateTap( application, 1.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
@@ -2372,7 +2306,7 @@ int utcDaliTextFieldStyleWhilstSelected(void)
   DALI_TEST_EQUALS( DaliTestCheckMaps( fontStyleMapGet, fontStyleMapSet ), true, TEST_LOCATION );
 
   // Press Escape to increase coverage
-  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Up, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::UP, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
   application.SendNotification();
   application.Render();
 
@@ -2392,11 +2326,11 @@ int utcDaliTextFieldEscKeyLoseFocus(void)
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
 
-  Stage::GetCurrent().Add( field );
+  application.GetScene().Add( field );
 
-  field.SetSize( 300.f, 50.f );
-  field.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+  field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
+  field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
 
   // Avoid a crash when core load gl resources.
   application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
@@ -2406,8 +2340,8 @@ int utcDaliTextFieldEscKeyLoseFocus(void)
   application.Render();
 
   // Add a key event but as the text field has not the focus it should do nothing.
-  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Up, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::DOWN, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::UP, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -2416,18 +2350,17 @@ int utcDaliTextFieldEscKeyLoseFocus(void)
   DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::TEXT ), std::string(""), TEST_LOCATION );
 
   // Create a tap event to touch the text field.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
+  TestGenerateTap( application, 150.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Now the text field has the focus, so it can handle the key events.
-  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Up, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "d", "", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Down, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "d", "", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::Up, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::DOWN, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::UP, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "d", "", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::DOWN, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "d", "", "d", KEY_D_CODE, 0, 0, Integration::KeyEvent::UP, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -2436,8 +2369,8 @@ int utcDaliTextFieldEscKeyLoseFocus(void)
   DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::TEXT ), std::string("ad"), TEST_LOCATION );
 
   // Generate a Esc key event. The text field should lose the focus.
-  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Up, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::UP, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -2446,8 +2379,8 @@ int utcDaliTextFieldEscKeyLoseFocus(void)
   DALI_TEST_EQUALS( false, field.HasKeyInputFocus(), TEST_LOCATION );
 
   // No more text should be introduced
-  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Up, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::DOWN, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::UP, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -2467,7 +2400,7 @@ int utcDaliTextFieldSomeSpecialKeys(void)
 
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
-  Stage::GetCurrent().Add( field );
+  application.GetScene().Add( field );
   LoadMarkerImages(application, field);
   // Render and notify
   application.SendNotification();
@@ -2477,9 +2410,9 @@ int utcDaliTextFieldSomeSpecialKeys(void)
 
   field.SetProperty( TextField::Property::TEXT, longText );
   field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
-  field.SetSize( 300.f, 50.f );
-  field.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+  field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
+  field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
 
   // Avoid a crash when core load gl resources.
   application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
@@ -2488,48 +2421,45 @@ int utcDaliTextFieldSomeSpecialKeys(void)
   application.Render();
 
   // Create a tap event to touch the text field.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
+  TestGenerateTap( application, 150.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Tap first to get the focus.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 1.f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 1.f, 25.0f ) ) );
+  TestGenerateTap( application, 1.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Double tap to select a word.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 2u, 1u, Vector2( 1.f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 2u, 1u, Vector2( 1.f, 25.0f ) ) );
+  TestGenerateTap( application, 1.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Generate a Esc key event. The text field should lose the focus.
-  application.ProcessEvent( GenerateKey( "XF86PowerOff", "", "XF86PowerOff", DALI_KEY_POWER, 0, 0, Integration::KeyEvent::Down, "XF86PowerOff", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "XF86PowerOff", "", "XF86PowerOff", DALI_KEY_POWER, 0, 0, Integration::KeyEvent::Up, "XF86PowerOff", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "XF86PowerOff", "", "XF86PowerOff", DALI_KEY_POWER, 0, 0, Integration::KeyEvent::DOWN, "XF86PowerOff", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "XF86PowerOff", "", "XF86PowerOff", DALI_KEY_POWER, 0, 0, Integration::KeyEvent::UP, "XF86PowerOff", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Generate a Esc key event. The text field should lose the focus.
-  application.ProcessEvent( GenerateKey( "XF86Menu", "", "XF86Menu", DALI_KEY_MENU, 0, 0, Integration::KeyEvent::Down, "XF86Menu", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "XF86Menu", "", "XF86Menu", DALI_KEY_MENU, 0, 0, Integration::KeyEvent::Up, "XF86Menu", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "XF86Menu", "", "XF86Menu", DALI_KEY_MENU, 0, 0, Integration::KeyEvent::DOWN, "XF86Menu", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "XF86Menu", "", "XF86Menu", DALI_KEY_MENU, 0, 0, Integration::KeyEvent::UP, "XF86Menu", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Generate a Esc key event. The text field should lose the focus.
-  application.ProcessEvent( GenerateKey( "XF86Home", "", "XF86Home", DALI_KEY_HOME, 0, 0, Integration::KeyEvent::Down, "XF86Home", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "XF86Home", "", "XF86Home", DALI_KEY_HOME, 0, 0, Integration::KeyEvent::Up, "XF86Home", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "XF86Home", "", "XF86Home", DALI_KEY_HOME, 0, 0, Integration::KeyEvent::DOWN, "XF86Home", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "XF86Home", "", "XF86Home", DALI_KEY_HOME, 0, 0, Integration::KeyEvent::UP, "XF86Home", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -2549,7 +2479,7 @@ int utcDaliTextFieldSizeUpdate(void)
   // Checks some special keys when the text is selected.
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
-  Stage::GetCurrent().Add( field );
+  application.GetScene().Add( field );
 
   float previousHeight = 0.0f;
   float currentHeight = 0.0f;
@@ -2557,15 +2487,15 @@ int utcDaliTextFieldSizeUpdate(void)
 
 
   // "ㅁ" is bigger then "ኢ"
-  field.SetSize( Vector2( fieldWidth ,10.0f ) );
+  field.SetProperty( Actor::Property::SIZE, Vector2( fieldWidth ,10.0f ) );
   field.SetResizePolicy( ResizePolicy::FIXED , Dimension::WIDTH );
   field.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY , Dimension::HEIGHT );
 
   field.SetProperty( TextField::Property::TEXT, "ኢ");
-  field.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+  field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
 
-  field.SetKeyboardFocusable(true);
+  field.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
   KeyboardFocusManager::Get().SetCurrentFocusActor( field );
 
   application.SendNotification();
@@ -2575,8 +2505,8 @@ int utcDaliTextFieldSizeUpdate(void)
   DALI_TEST_EQUALS( previousHeight, field.GetProperty<float>( Actor::Property::SIZE_HEIGHT ) , TEST_LOCATION );
 
   // Add  another script characters ( glyph height is defferent )
-  application.ProcessEvent( GenerateKey( "ㅁ", "", "ㅁ", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "ㅁ", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "ㅁ", "", "ㅁ", KEY_A_CODE, 0, 0, Integration::KeyEvent::Up, "ㅁ", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "ㅁ", "", "ㅁ", KEY_A_CODE, 0, 0, Integration::KeyEvent::DOWN, "ㅁ", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "ㅁ", "", "ㅁ", KEY_A_CODE, 0, 0, Integration::KeyEvent::UP, "ㅁ", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   application.SendNotification();
   application.Render();
@@ -2596,10 +2526,10 @@ int utcDaliTextFieldExtremlyLargePointSize(void)
   TextField field = TextField::New();
 
   field.SetProperty( TextField::Property::TEXT, "Text" );
-  field.SetSize( 300.f, 50.f );
-  field.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-  Stage::GetCurrent().Add( field );
+  field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
+  field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+  application.GetScene().Add( field );
 
   try
   {
@@ -2620,7 +2550,7 @@ int UtcDaliTextFieldDefaultFontStylePropertyCoverage(void)
   tet_infoline("UtcDaliTextFieldFontStylePorpertyCoverage");
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
-  Stage::GetCurrent().Add( field );
+  application.GetScene().Add( field );
 
   Property::Map fontStyleMapGet;
 
@@ -2646,7 +2576,7 @@ int UtcDaliTextFieldSettingPlaceholder(void)
 
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
-  Stage::GetCurrent().Add( field );
+  application.GetScene().Add( field );
 
   // Check the placeholder property with pixel size
   Property::Map placeholderPixelSizeMapSet;
@@ -2726,10 +2656,10 @@ int UtcDaliTextFieldSetPaddingProperty(void)
 
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
-  field.SetSize( 300.f, 50.f );
-  field.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-  Stage::GetCurrent().Add( field );
+  field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
+  field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+  application.GetScene().Add( field );
 
   application.SendNotification();
   application.Render();
@@ -2759,10 +2689,10 @@ int UtcDaliTextFieldEnableShiftSelectionProperty(void)
 
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
-  field.SetSize( 300.f, 50.f );
-  field.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-  Stage::GetCurrent().Add( field );
+  field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
+  field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+  application.GetScene().Add( field );
 
   application.SendNotification();
   application.Render();
@@ -2787,10 +2717,10 @@ int UtcDaliTextFieldEnableGrabHandleProperty(void)
 
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
-  field.SetSize( 300.f, 50.f );
-  field.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-  Stage::GetCurrent().Add( field );
+  field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
+  field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+  application.GetScene().Add( field );
 
   application.SendNotification();
   application.Render();
@@ -2815,10 +2745,10 @@ int UtcDaliTextFieldMatchSystemLanguageDirectionProperty(void)
 
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
-  field.SetSize( 300.f, 50.f );
-  field.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-  Stage::GetCurrent().Add( field );
+  field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
+  field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+  application.GetScene().Add( field );
 
   application.SendNotification();
   application.Render();
@@ -2846,11 +2776,11 @@ int utcDaliTextFieldLayoutDirectionCoverage(void)
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
 
-  Stage::GetCurrent().Add( field );
+  application.GetScene().Add( field );
 
-  field.SetSize( 300.f, 50.f );
-  field.SetParentOrigin( ParentOrigin::TOP_LEFT );
-  field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+  field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
+  field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
 
   // Avoid a crash when core load gl resources.
   application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
@@ -2864,8 +2794,7 @@ int utcDaliTextFieldLayoutDirectionCoverage(void)
   field.SetProperty( TextField::Property::HORIZONTAL_ALIGNMENT, "END");
 
   // Create a tap event to touch the text field.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
+  TestGenerateTap( application, 150.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
@@ -2879,8 +2808,7 @@ int utcDaliTextFieldLayoutDirectionCoverage(void)
   field.SetProperty( TextField::Property::HORIZONTAL_ALIGNMENT, "BEGIN");
 
   // Create a tap event to touch the text field.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
+  TestGenerateTap( application, 150.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
@@ -2890,8 +2818,7 @@ int utcDaliTextFieldLayoutDirectionCoverage(void)
   field.SetProperty( TextField::Property::HORIZONTAL_ALIGNMENT, "CENTER");
 
   // Create a tap event to touch the text field.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
+  TestGenerateTap( application, 150.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
@@ -2901,16 +2828,15 @@ int utcDaliTextFieldLayoutDirectionCoverage(void)
   field.SetProperty( TextField::Property::HORIZONTAL_ALIGNMENT, "END");
 
   // Create a tap event to touch the text field.
-  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
-  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
+  TestGenerateTap( application, 150.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Generate a Esc key event. The text field should lose the focus.
-  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Up, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::UP, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
@@ -2921,7 +2847,6 @@ int utcDaliTextFieldLayoutDirectionCoverage(void)
   END_TEST;
 }
 
-
 int UtcDaliTextFieldGetInputMethodContext(void)
 {
   ToolkitTestApplication application;
@@ -2933,3 +2858,103 @@ int UtcDaliTextFieldGetInputMethodContext(void)
   END_TEST;
 }
 
+int UtcDaliTextFieldSelectWholeText(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliTextFieldSelectWholeText ");
+
+  TextField textField = TextField::New();
+
+  application.GetScene().Add( textField );
+
+  textField.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
+  textField.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  textField.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+
+  // Avoid a crash when core load gl resources.
+  application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
+
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_EQUALS( 1u, textField.GetChildCount(), TEST_LOCATION );
+
+  DevelTextField::SelectWholeText( textField );
+
+  application.SendNotification();
+  application.Render();
+
+  // Nothing should have been selected. The number of children is still 1
+  DALI_TEST_EQUALS( 1u, textField.GetChildCount(), TEST_LOCATION );
+
+  textField.SetProperty( TextField::Property::TEXT, "Hello world" );
+
+  application.SendNotification();
+  application.Render();
+
+  DevelTextField::SelectWholeText( textField );
+
+  application.SendNotification();
+  application.Render();
+
+  // Should be 2 children, the stencil and the layer
+  DALI_TEST_EQUALS( 2u, textField.GetChildCount(), TEST_LOCATION );
+
+  // The offscreen root actor should have two actors: the renderer and the highlight actor.
+  Actor stencil = textField.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 );
+
+  END_TEST;
+}
+
+int UtcDaliTextFieldSelectNone(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliTextFieldSelectWholeText ");
+
+  TextField textField = TextField::New();
+
+  application.GetScene().Add( textField );
+
+  textField.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
+  textField.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+  textField.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+
+  // Avoid a crash when core load gl resources.
+  application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
+
+  application.SendNotification();
+  application.Render();
+
+  textField.SetProperty( TextField::Property::TEXT, "Hello world" );
+
+  application.SendNotification();
+  application.Render();
+
+  // Nothing is selected
+  std::string selectedText = textField.GetProperty( DevelTextField::Property::SELECTED_TEXT ).Get<std::string>();
+  DALI_TEST_EQUALS( "", selectedText, TEST_LOCATION );
+
+  DevelTextField::SelectWholeText( textField );
+
+  application.SendNotification();
+  application.Render();
+
+  // whole text is selected
+  selectedText = textField.GetProperty( DevelTextField::Property::SELECTED_TEXT ).Get<std::string>();
+  DALI_TEST_EQUALS( "Hello world", selectedText, TEST_LOCATION );
+
+  DevelTextField::SelectNone( textField );
+
+  application.SendNotification();
+  application.Render();
+
+  // Nothing is selected
+  selectedText = textField.GetProperty( DevelTextField::Property::SELECTED_TEXT ).Get<std::string>();
+  DALI_TEST_EQUALS( "", selectedText, TEST_LOCATION );
+
+  END_TEST;
+}