Extending Style - Adding Strikethrough
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-TextField.cpp
index b3b4412..b4e4c93 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
@@ -30,6 +30,8 @@
 #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"
+#include <dali-toolkit/devel-api/text/text-enumerations-devel.h>
+#include "test-text-geometry-utils.h"
 
 using namespace Dali;
 using namespace Toolkit;
@@ -93,6 +95,8 @@ const char* const PROPERTY_NAME_EMBOSS                               = "emboss";
 const char* const PROPERTY_NAME_INPUT_EMBOSS                         = "inputEmboss";
 const char* const PROPERTY_NAME_OUTLINE                              = "outline";
 const char* const PROPERTY_NAME_INPUT_OUTLINE                        = "inputOutline";
+const char* const PROPERTY_NAME_STRIKETHROUGH                        = "strikethrough";
+const char* const PROPERTY_NAME_INPUT_STRIKETHROUGH                  = "inputStrikethrough";
 
 const char* const PROPERTY_NAME_HIDDEN_INPUT_SETTINGS                = "hiddenInputSettings";
 const char* const PROPERTY_NAME_PIXEL_SIZE                           = "pixelSize";
@@ -105,6 +109,8 @@ const char* const PROPERTY_NAME_MATCH_SYSTEM_LANGUAGE_DIRECTION      = "matchSys
 const char* const PROPERTY_NAME_ENABLE_GRAB_HANDLE_POPUP             = "enableGrabHandlePopup";
 const char* const PROPERTY_NAME_BACKGROUND                           = "textBackground";
 const char* const PROPERTY_NAME_FONT_SIZE_SCALE                      = "fontSizeScale";
+const char* const PROPERTY_NAME_GRAB_HANDLE_COLOR                    = "grabHandleColor";
+const char* const PROPERTY_NAME_INPUT_FILTER                         = "inputFilter";
 
 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.
@@ -117,12 +123,23 @@ const std::string DEFAULT_FONT_DIR( "/resources/fonts" );
 const int KEY_RETURN_CODE = 36;
 const int KEY_A_CODE = 38;
 const int KEY_D_CODE = 40;
+const int KEY_SHIFT_MODIFIER = 257;
 
 const std::string DEFAULT_DEVICE_NAME("hwKeyboard");
 
+static bool gSelectionChangedCallbackCalled;
+static uint32_t oldSelectionStart;
+static uint32_t oldSelectionEnd;
+static bool gSelectionClearedCallbackCalled;
+static bool gAnchorClickedCallBackCalled;
+static bool gAnchorClickedCallBackNotCalled;
 static bool gTextChangedCallBackCalled;
 static bool gMaxCharactersCallBackCalled;
+static bool gInputFilteredAcceptedCallbackCalled;
+static bool gInputFilteredRejectedCallbackCalled;
 static bool gInputStyleChangedCallbackCalled;
+static bool gCursorPositionChangedCallbackCalled;
+static uint32_t oldCursorPos;
 static Dali::Toolkit::TextField::InputStyle::Mask gInputStyleMask;
 
 static void LoadBitmapResource(TestPlatformAbstraction& platform, int width, int height)
@@ -205,6 +222,42 @@ struct CallbackFunctor
   bool* mCallbackFlag;
 };
 
+static void TestSelectionClearedCallback(TextField control)
+{
+  tet_infoline(" TestSelectionClearedCallback");
+
+  gSelectionClearedCallbackCalled = true;
+}
+
+static void TestSelectionChangedCallback(TextField control, uint32_t oldStart, uint32_t oldEnd)
+{
+  tet_infoline(" TestSelectionChangedCallback");
+
+  gSelectionChangedCallbackCalled = true;
+  oldSelectionStart = oldStart;
+  oldSelectionEnd   = oldEnd;
+}
+
+static void TestAnchorClickedCallback(TextField control, const char* href, unsigned int hrefLength)
+{
+  tet_infoline(" TestAnchorClickedCallback");
+
+  gAnchorClickedCallBackNotCalled = false;
+
+  if (!strcmp(href, "https://www.tizen.org") && hrefLength == strlen(href))
+  {
+    gAnchorClickedCallBackCalled = true;
+  }
+}
+
+static void TestCursorPositionChangedCallback( TextField control, unsigned int oldPos )
+{
+  tet_infoline(" TestCursorPositionChangedCallback");
+
+  gCursorPositionChangedCallbackCalled = true;
+  oldCursorPos = oldPos;
+}
+
 static void TestTextChangedCallback( TextField control )
 {
   tet_infoline(" TestTextChangedCallback");
@@ -219,6 +272,20 @@ static void TestMaxLengthReachedCallback( TextField control )
   gMaxCharactersCallBackCalled = true;
 }
 
+static void TestInputFilteredCallback(TextField control, Toolkit::InputFilter::Property::Type type)
+{
+  tet_infoline(" TestInputFilteredCallback");
+
+  if(type == Toolkit::InputFilter::Property::ACCEPTED)
+  {
+    gInputFilteredAcceptedCallbackCalled = true;
+  }
+  else if(type == Toolkit::InputFilter::Property::REJECTED)
+  {
+    gInputFilteredRejectedCallbackCalled = true;
+  }
+}
+
 static void TestInputStyleChangedCallback( TextField control, TextField::InputStyle::Mask mask )
 {
   tet_infoline(" TestInputStyleChangedCallback");
@@ -510,6 +577,10 @@ int UtcDaliTextFieldGetPropertyP(void)
   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 );
+  DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_GRAB_HANDLE_COLOR ) == DevelTextField::Property::GRAB_HANDLE_COLOR );
+  DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_INPUT_FILTER ) == DevelTextField::Property::INPUT_FILTER );
+  DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_STRIKETHROUGH ) == DevelTextField::Property::STRIKETHROUGH );
+  DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_INPUT_STRIKETHROUGH ) == DevelTextField::Property::INPUT_STRIKETHROUGH );
 
   END_TEST;
 }
@@ -781,6 +852,24 @@ int UtcDaliTextFieldSetPropertyP(void)
   DALI_TEST_EQUALS( fontStyleMapGet.Count(), fontStyleMapSet.Count(), TEST_LOCATION );
   DALI_TEST_EQUALS( DaliTestCheckMaps( fontStyleMapGet, fontStyleMapSet ), true, TEST_LOCATION );
 
+  Property::Map strikethroughMapSet;
+  Property::Map strikethroughMapGet;
+
+  strikethroughMapSet.Insert( "enable", true );
+  strikethroughMapSet.Insert( "color", Color::RED );
+  strikethroughMapSet.Insert( "height", 2.0f );
+
+  // Check the strikethrough property
+  field.SetProperty( DevelTextField::Property::STRIKETHROUGH, strikethroughMapSet );
+
+  strikethroughMapGet = field.GetProperty<Property::Map>( DevelTextField::Property::STRIKETHROUGH );
+  DALI_TEST_EQUALS( strikethroughMapGet.Count(), strikethroughMapSet.Count(), TEST_LOCATION );
+  DALI_TEST_EQUALS( DaliTestCheckMaps( strikethroughMapGet, strikethroughMapSet ), true, TEST_LOCATION );
+
+  // Check the input strikethrough property
+  field.SetProperty( DevelTextField::Property::INPUT_STRIKETHROUGH, "Strikethrough input properties" );
+  DALI_TEST_EQUALS( field.GetProperty<std::string>( DevelTextField::Property::INPUT_STRIKETHROUGH ), std::string("Strikethrough input properties"), TEST_LOCATION );
+
   Property::Map underlineMapSet;
   Property::Map underlineMapGet;
 
@@ -980,6 +1069,25 @@ int UtcDaliTextFieldSetPropertyP(void)
   field.SetProperty( DevelTextField::Property::BACKGROUND, Color::RED );
   DALI_TEST_EQUALS( field.GetProperty<Vector4>( DevelTextField::Property::BACKGROUND ), Color::RED, TEST_LOCATION );
 
+  //Check handle color
+  field.SetProperty( DevelTextField::Property::GRAB_HANDLE_COLOR, Color::GREEN );
+  DALI_TEST_EQUALS( field.GetProperty<Vector4>( DevelTextField::Property::GRAB_HANDLE_COLOR ), Color::GREEN, TEST_LOCATION );
+
+  // Check the input filter property
+  Property::Map inputFilterMapSet;
+  Property::Map inputFilterMapGet;
+  inputFilterMapSet[InputFilter::Property::ACCEPTED] = "[\\w]";
+  inputFilterMapSet[InputFilter::Property::REJECTED] = "[\\d]";
+
+  field.SetProperty(DevelTextField::Property::INPUT_FILTER, inputFilterMapSet);
+
+  inputFilterMapGet = field.GetProperty<Property::Map>(DevelTextField::Property::INPUT_FILTER);
+  DALI_TEST_EQUALS(inputFilterMapGet.Count(), inputFilterMapSet.Count(), TEST_LOCATION);
+
+  // Clear
+  inputFilterMapSet.Clear();
+  field.SetProperty(DevelTextField::Property::INPUT_FILTER, inputFilterMapSet);
+
   application.SendNotification();
   application.Render();
 
@@ -1016,654 +1124,2348 @@ int utcDaliTextFieldAtlasRenderP(void)
   END_TEST;
 }
 
-// Positive test for the textChanged signal.
-int utcDaliTextFieldTextChangedP(void)
+// Positive test for the anchorClicked signal.
+int utcDaliTextFieldAnchorClicked01(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" utcDaliTextFieldTextChangedP");
+  tet_infoline(" utcDaliTextFieldAnchorClicked01");
   TextField field = TextField::New();
-  DALI_TEST_CHECK( field );
+  DALI_TEST_CHECK(field);
 
-  application.GetScene().Add( field );
+  application.GetScene().Add(field);
 
-  // connect to the text changed signal.
+  // connect to the anchor clicked signal.
   ConnectionTracker* testTracker = new ConnectionTracker();
-  field.TextChangedSignal().Connect(&TestTextChangedCallback);
-  bool textChangedSignal = false;
-  field.ConnectSignal( testTracker, "textChanged",   CallbackFunctor(&textChangedSignal) );
+  DevelTextField::AnchorClickedSignal(field).Connect(&TestAnchorClickedCallback);
+  bool anchorClickedSignal = false;
+  field.ConnectSignal(testTracker, "anchorClicked", CallbackFunctor(&anchorClickedSignal));
 
-  gTextChangedCallBackCalled = false;
-  field.SetProperty( TextField::Property::TEXT, "ABC" );
-  DALI_TEST_CHECK( gTextChangedCallBackCalled );
-  DALI_TEST_CHECK( textChangedSignal );
+  gAnchorClickedCallBackCalled = false;
+  field.SetProperty(TextField::Property::TEXT, "<a href='https://www.tizen.org'>TIZEN</a>");
+  field.SetProperty(TextField::Property::ENABLE_MARKUP, true);
+  field.SetProperty(Actor::Property::SIZE, Vector2(100.f, 50.f));
+  field.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
+  field.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
 
   application.SendNotification();
-
+  application.Render();
   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 ) );
-  DALI_TEST_CHECK( gTextChangedCallBackCalled );
-
-  END_TEST;
-}
-
-// Negative test for the textChanged signal.
-int utcDaliTextFieldTextChangedN(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" utcDaliTextFieldTextChangedN");
-  TextField field = TextField::New();
-  DALI_TEST_CHECK( field );
+  // Create a tap event to touch the text field.
+  TestGenerateTap(application, 5.0f, 25.0f);
+  application.SendNotification();
+  application.Render();
 
-  application.GetScene().Add( field );
+  DALI_TEST_CHECK(gAnchorClickedCallBackCalled);
+  DALI_TEST_CHECK(anchorClickedSignal);
 
-  // connect to the text changed signal.
-  ConnectionTracker* testTracker = new ConnectionTracker();
-  field.TextChangedSignal().Connect(&TestTextChangedCallback);
-  bool textChangedSignal = false;
-  field.ConnectSignal( testTracker, "textChanged",   CallbackFunctor(&textChangedSignal) );
+  gAnchorClickedCallBackNotCalled = true;
+  // Tap the outside of anchor, callback should not be called.
+  TestGenerateTap(application, 150.f, 100.f);
+  application.SendNotification();
+  application.Render();
 
-  gTextChangedCallBackCalled = false;
-  field.SetProperty( TextField::Property::PLACEHOLDER_TEXT, "ABC" ); // Setting placeholder, not TEXT
-  DALI_TEST_CHECK( !gTextChangedCallBackCalled );
-  DALI_TEST_CHECK( !textChangedSignal );
+  DALI_TEST_CHECK(gAnchorClickedCallBackNotCalled);
 
   END_TEST;
 }
 
-// Positive test for Max Characters reached signal.
-int utcDaliTextFieldMaxCharactersReachedP(void)
+// Positive test for the anchorClicked signal.
+int utcDaliTextFieldAnchorClicked02(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" utcDaliTextFieldMaxCharactersReachedP");
+  tet_infoline(" utcDaliTextFieldAnchorClicked02");
   TextField field = TextField::New();
-  DALI_TEST_CHECK( field );
-
-  application.GetScene().Add( field );
-
-  const int maxNumberOfCharacters = 1;
-  field.SetProperty( TextField::Property::MAX_LENGTH, maxNumberOfCharacters );
+  DALI_TEST_CHECK(field);
 
-  field.SetKeyInputFocus();
+  application.GetScene().Add(field);
 
-  // connect to the text changed signal.
+  // connect to the anchor clicked signal.
   ConnectionTracker* testTracker = new ConnectionTracker();
-  field.MaxLengthReachedSignal().Connect(&TestMaxLengthReachedCallback);
-  bool maxLengthReachedSignal = false;
-  field.ConnectSignal( testTracker, "maxLengthReached",   CallbackFunctor(&maxLengthReachedSignal) );
+  DevelTextField::AnchorClickedSignal(field).Connect(&TestAnchorClickedCallback);
+  bool anchorClickedSignal = false;
+  field.ConnectSignal(testTracker, "anchorClicked", CallbackFunctor(&anchorClickedSignal));
 
-  gMaxCharactersCallBackCalled = false;
+  gAnchorClickedCallBackCalled = false;
+  field.SetProperty(TextField::Property::TEXT, "<a href='https://www.tizen.org'>TIZEN</a>");
+  field.SetProperty(TextField::Property::ENABLE_MARKUP, true);
+  field.SetProperty(Actor::Property::SIZE, Vector2(100.f, 50.f));
+  field.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
+  field.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
 
-  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.SendNotification();
+  application.Render();
+  field.SetKeyInputFocus();
 
-  DALI_TEST_CHECK( gMaxCharactersCallBackCalled );
-  DALI_TEST_CHECK( maxLengthReachedSignal );
+  // Avoid a crash when core load gl resources.
+  application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE);
 
-  END_TEST;
-}
+  // Create a tap event to touch the text field.
+  TestGenerateTap(application, 30.0f, 25.0f, 100);
+  application.SendNotification();
+  application.Render();
 
-// Negative test for Max Characters reached signal.
-int utcDaliTextFieldMaxCharactersReachedN(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" utcDaliTextFieldMaxCharactersReachedN");
-  TextField field = TextField::New();
-  DALI_TEST_CHECK( field );
+  DALI_TEST_CHECK(gAnchorClickedCallBackCalled);
+  DALI_TEST_CHECK(anchorClickedSignal);
 
-  application.GetScene().Add( field );
 
-  const int maxNumberOfCharacters = 3;
-  field.SetProperty( TextField::Property::MAX_LENGTH, maxNumberOfCharacters );
+  // For coverage InsertTextAnchor, RemoveTextAnchor
+  // first index insert
+  field.SetProperty(TextField::Property::TEXT, "<a href='https://www.tizen.org'>TIZEN</a>");
+  field.SetProperty(DevelTextField::Property::PRIMARY_CURSOR_POSITION, 0);
+  application.SendNotification();
+  application.Render();
 
-  field.SetKeyInputFocus();
+  application.ProcessEvent( GenerateKey( "D", "", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::DOWN, "D", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.SendNotification();
+  application.Render();
 
-  // connect to the text changed signal.
-  ConnectionTracker* testTracker = new ConnectionTracker();
-  field.MaxLengthReachedSignal().Connect(&TestMaxLengthReachedCallback);
-  bool maxLengthReachedSignal = false;
-  field.ConnectSignal( testTracker, "maxLengthReached",   CallbackFunctor(&maxLengthReachedSignal) );
+  gAnchorClickedCallBackCalled = false;
+  // Create a tap event to touch the text field.
+  TestGenerateTap(application, 30.0f, 25.0f, 700);
+  application.SendNotification();
+  field.SetKeyInputFocus();
 
-  gMaxCharactersCallBackCalled = false;
+  DALI_TEST_CHECK(gAnchorClickedCallBackCalled);
 
-  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 ) );
+  // last index insert
+  field.SetProperty(TextField::Property::TEXT, "<a href='https://www.tizen.org'>TIZEN</a>");
+  field.SetProperty(DevelTextField::Property::PRIMARY_CURSOR_POSITION, 5);
+  application.SendNotification();
+  application.Render();
 
-  DALI_TEST_CHECK( !gMaxCharactersCallBackCalled );
-  DALI_TEST_CHECK( !maxLengthReachedSignal );
+  application.ProcessEvent( GenerateKey( "D", "", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::DOWN, "D", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.SendNotification();
+  application.Render();
 
-  application.ProcessEvent( GenerateKey( "Return", "", "\r", KEY_RETURN_CODE, 0, 0, Integration::KeyEvent::DOWN, "\r", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  gAnchorClickedCallBackCalled = false;
+  // Create a tap event to touch the text field.
+  TestGenerateTap(application, 30.0f, 25.0f, 1300);
+  application.SendNotification();
+  field.SetKeyInputFocus();
 
-  DALI_TEST_CHECK( !gMaxCharactersCallBackCalled );
-  DALI_TEST_CHECK( !maxLengthReachedSignal );
+  DALI_TEST_CHECK(gAnchorClickedCallBackCalled);
 
-  END_TEST;
-}
+  // mid index insert
+  field.SetProperty(TextField::Property::TEXT, "<a href='https://www.tizen.org'>TIZEN</a>");
+  field.SetProperty(DevelTextField::Property::PRIMARY_CURSOR_POSITION, 2);
+  application.SendNotification();
+  application.Render();
 
-int utcDaliTextFieldInputStyleChanged01(void)
-{
-  // 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.
-  // The ToolkitTestApplication creates an implementation of the adaptor stub and a queue of idle callbacks.
-  ToolkitTestApplication application;
-  tet_infoline(" utcDaliTextFieldInputStyleChanged01");
+  application.ProcessEvent( GenerateKey( "D", "", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::DOWN, "D", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.SendNotification();
+  application.Render();
 
-  // Load some fonts.
+  gAnchorClickedCallBackCalled = false;
+  // Create a tap event to touch the text field.
+  TestGenerateTap(application, 30.0f, 25.0f, 1900);
+  application.SendNotification();
+  field.SetKeyInputFocus();
 
-  char* pathNamePtr = get_current_dir_name();
-  const std::string pathName( pathNamePtr );
-  free( pathNamePtr );
+  DALI_TEST_CHECK(gAnchorClickedCallBackCalled);
 
-  TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
-  fontClient.SetDpi( 93u, 93u );
+  // first index remove
+  field.SetProperty(TextField::Property::TEXT, "<a href='https://www.tizen.org'>TIZEN</a>");
+  field.SetProperty(DevelTextField::Property::PRIMARY_CURSOR_POSITION, 0);
+  application.SendNotification();
+  application.Render();
 
-  fontClient.GetFontId( pathName + DEFAULT_FONT_DIR + "/dejavu/DejaVuSerif.ttf", DEFAULT_FONT_SIZE );
-  fontClient.GetFontId( pathName + DEFAULT_FONT_DIR + "/dejavu/DejaVuSerif-Bold.ttf", DEFAULT_FONT_SIZE );
+  application.ProcessEvent(GenerateKey("", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::DOWN, "", 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));
+  application.SendNotification();
+  application.Render();
 
-  TextField field = TextField::New();
-  DALI_TEST_CHECK( field );
+  gAnchorClickedCallBackCalled = false;
+  // Create a tap event to touch the text field.
+  TestGenerateTap(application, 30.0f, 25.0f, 2500);
+  application.SendNotification();
+  field.SetKeyInputFocus();
 
+  DALI_TEST_CHECK(gAnchorClickedCallBackCalled);
 
-  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 );
+  // last index remove
+  field.SetProperty(TextField::Property::TEXT, "<a href='https://www.tizen.org'>TIZEN</a>");
+  field.SetProperty(DevelTextField::Property::PRIMARY_CURSOR_POSITION, 5);
+  application.SendNotification();
+  application.Render();
 
-  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>" );
+  application.ProcessEvent(GenerateKey("", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::DOWN, "", 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));
+  application.SendNotification();
+  application.Render();
 
-  // connect to the text changed signal.
-  ConnectionTracker* testTracker = new ConnectionTracker();
-  field.InputStyleChangedSignal().Connect( &TestInputStyleChangedCallback );
-  bool inputStyleChangedSignal = false;
-  field.ConnectSignal( testTracker, "inputStyleChanged",   CallbackFunctor(&inputStyleChangedSignal) );
+  gAnchorClickedCallBackCalled = false;
+  // Create a tap event to touch the text field.
+  TestGenerateTap(application, 30.0f, 25.0f, 3100);
+  application.SendNotification();
+  application.Render();
 
-  application.GetScene().Add( field );
+  DALI_TEST_CHECK(gAnchorClickedCallBackCalled);
 
-  // Render and notify
+  // middle index
+  field.SetProperty(TextField::Property::TEXT, "<a href='https://www.tizen.org'>TIZEN</a>");
+  field.SetProperty(DevelTextField::Property::PRIMARY_CURSOR_POSITION, 2);
   application.SendNotification();
   application.Render();
 
-  // Executes the idle callbacks added by the text control on the change of input style.
-  application.RunIdles();
-
-  gInputStyleChangedCallbackCalled = false;
-  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("Delete", "", "Delete", Dali::DevelKey::DALI_KEY_DELETE, 0, 0, Integration::KeyEvent::DOWN, "Delete", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE));
+  application.SendNotification();
+  application.Render();
 
+  gAnchorClickedCallBackCalled = false;
   // Create a tap event to touch the text field.
-  TestGenerateTap( application, 18.0f, 25.0f );
-
-  // Render and notify
+  TestGenerateTap(application, 30.0f, 25.0f, 3700);
   application.SendNotification();
   application.Render();
 
-  // Executes the idle callbacks added by the text control on the change of input style.
-  application.RunIdles();
-
-  DALI_TEST_CHECK( gInputStyleChangedCallbackCalled );
-  if( gInputStyleChangedCallbackCalled )
-  {
-    DALI_TEST_EQUALS( static_cast<unsigned int>( gInputStyleMask ), static_cast<unsigned int>( TextField::InputStyle::FONT_FAMILY | TextField::InputStyle::POINT_SIZE ), TEST_LOCATION );
-
-    const std::string fontFamily = field.GetProperty( TextField::Property::INPUT_FONT_FAMILY ).Get<std::string>();
-    DALI_TEST_EQUALS( fontFamily, "DejaVuSerif", TEST_LOCATION );
+  DALI_TEST_CHECK(gAnchorClickedCallBackCalled);
 
-    const float pointSize = field.GetProperty( TextField::Property::INPUT_POINT_SIZE ).Get<float>();
-    DALI_TEST_EQUALS( pointSize, 18.f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
-  }
-  DALI_TEST_CHECK( inputStyleChangedSignal );
+  // 0 ~ 1 index remove
+  field.SetProperty(TextField::Property::TEXT, "<a href='https://www.tizen.org'>TIZEN</a>");
+  field.SetProperty( DevelTextField::Property::SELECTED_TEXT_START, 0);
+  field.SetProperty( DevelTextField::Property::SELECTED_TEXT_END, 1);
+  application.SendNotification();
+  application.Render();
 
-  gInputStyleChangedCallbackCalled = false;
-  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.SendNotification();
+  application.Render();
 
+  gAnchorClickedCallBackCalled = false;
   // Create a tap event to touch the text field.
-  TestGenerateTap( application, 30.0f, 25.0f );
-
-  // Render and notify
+  TestGenerateTap(application, 30.0f, 25.0f, 4300);
   application.SendNotification();
   application.Render();
 
-  // Executes the idle callbacks added by the text control on the change of input style.
-  application.RunIdles();
+  DALI_TEST_CHECK(gAnchorClickedCallBackCalled);
 
-  DALI_TEST_CHECK( !gInputStyleChangedCallbackCalled );
-  DALI_TEST_CHECK( !inputStyleChangedSignal );
+  // 1 ~ 3 index remove
+  field.SetProperty(TextField::Property::TEXT, "<a href='https://www.tizen.org'>TIZEN</a>");
+  field.SetProperty( DevelTextField::Property::SELECTED_TEXT_START, 1);
+  field.SetProperty( DevelTextField::Property::SELECTED_TEXT_END, 3);
+  application.SendNotification();
+  application.Render();
 
-  gInputStyleChangedCallbackCalled = false;
-  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.SendNotification();
+  application.Render();
 
+  gAnchorClickedCallBackCalled = false;
   // Create a tap event to touch the text field.
-  TestGenerateTap( application, 43.0f, 25.0f );
-
-  // Render and notify
+  TestGenerateTap(application, 30.0f, 25.0f, 4900);
   application.SendNotification();
   application.Render();
 
-  // Executes the idle callbacks added by the text control on the change of input style.
-  application.RunIdles();
+  DALI_TEST_CHECK(gAnchorClickedCallBackCalled);
 
-  DALI_TEST_CHECK( gInputStyleChangedCallbackCalled );
+  // 3 ~ 4 index remove
+  field.SetProperty(TextField::Property::TEXT, "<a href='https://www.tizen.org'>TIZEN</a>");
+  field.SetProperty( DevelTextField::Property::SELECTED_TEXT_START, 3);
+  field.SetProperty( DevelTextField::Property::SELECTED_TEXT_END, 4);
+  application.SendNotification();
+  application.Render();
+
+  application.ProcessEvent(GenerateKey("", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE));
+  application.SendNotification();
+  application.Render();
+
+  gAnchorClickedCallBackCalled = false;
+  // Create a tap event to touch the text field.
+  TestGenerateTap(application, 30.0f, 25.0f, 5500);
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_CHECK(gAnchorClickedCallBackCalled);
+
+  // Remove front of anchor
+  field.SetProperty(TextField::Property::TEXT, "TIZEN<a href='https://www.tizen.org'>TIZEN</a>");
+  field.SetProperty(DevelTextField::Property::PRIMARY_CURSOR_POSITION, 3);
+  application.SendNotification();
+  application.Render();
+
+  application.ProcessEvent(GenerateKey("", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE));
+  application.SendNotification();
+  application.Render();
+
+  // Remove whole text
+  field.SetProperty(TextField::Property::TEXT, "<a href='https://www.tizen.org'>TIZEN</a>");
+  DevelTextField::SelectWholeText(field);
+  application.SendNotification();
+  application.Render();
+
+  application.ProcessEvent(GenerateKey("", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE));
+  application.SendNotification();
+  application.Render();
+
+  // Remove all with backspace
+  field.SetProperty(TextField::Property::TEXT, "<a href='https://www.tizen.org'>T</a>");
+  field.SetProperty(DevelTextField::Property::PRIMARY_CURSOR_POSITION, 1);
+  application.SendNotification();
+  application.Render();
+
+  application.ProcessEvent(GenerateKey("", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE));
+  application.SendNotification();
+  application.Render();
+
+  // Remove all with delete
+  field.SetProperty(TextField::Property::TEXT, "<a href='https://www.tizen.org'>T</a>");
+  field.SetProperty(DevelTextField::Property::PRIMARY_CURSOR_POSITION, 0);
+  application.SendNotification();
+  application.Render();
+
+  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.SendNotification();
+  application.Render();
+
+  END_TEST;
+}
+
+// Positive test for the textChanged signal.
+int utcDaliTextFieldTextChangedP(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldTextChangedP");
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( field );
+
+  application.GetScene().Add( field );
+
+  // connect to the text changed signal.
+  ConnectionTracker* testTracker = new ConnectionTracker();
+  field.TextChangedSignal().Connect(&TestTextChangedCallback);
+  bool textChangedSignal = false;
+  field.ConnectSignal( testTracker, "textChanged",   CallbackFunctor(&textChangedSignal) );
+
+  gTextChangedCallBackCalled = false;
+  field.SetProperty( TextField::Property::TEXT, "ABC" );
+  DALI_TEST_CHECK( gTextChangedCallBackCalled );
+  DALI_TEST_CHECK( textChangedSignal );
+
+  application.SendNotification();
+  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 ) );
+  DALI_TEST_CHECK( gTextChangedCallBackCalled );
+
+  // Remove all text
+  field.SetProperty( TextField::Property::TEXT, "" );
+
+  // Pressing backspace key: TextChangedCallback should not be called when there is no text in textfield.
+  gTextChangedCallBackCalled = false;
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  DALI_TEST_CHECK( !gTextChangedCallBackCalled );
+
+  // Pressing delete key: TextChangedCallback should not be called when there is no text in textfield.
+  gTextChangedCallBackCalled = false;
+  application.ProcessEvent( GenerateKey( "", "", "", Dali::DevelKey::DALI_KEY_DELETE, 0, 0, Integration::KeyEvent::DOWN, "Delete", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  DALI_TEST_CHECK( !gTextChangedCallBackCalled );
+
+  END_TEST;
+}
+
+int utcDaliTextFieldTextChangedWithInputMethodContext(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldTextChangedWithInputMethodContext");
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( field );
+
+
+  application.GetScene().Add( field );
+
+  // connect to the text changed signal.
+  ConnectionTracker* testTracker = new ConnectionTracker();
+  field.TextChangedSignal().Connect(&TestTextChangedCallback);
+  bool textChangedSignal = false;
+  field.ConnectSignal( testTracker, "textChanged",   CallbackFunctor(&textChangedSignal) );
+
+
+  // get InputMethodContext
+  std::string text;
+  InputMethodContext::EventData imfEvent;
+  InputMethodContext inputMethodContext = DevelTextField::GetInputMethodContext( field );
+
+  field.SetKeyInputFocus();
+  field.SetProperty( DevelTextField::Property::ENABLE_EDITING, true );
+
+  // input text
+  gTextChangedCallBackCalled = false;
+  imfEvent = InputMethodContext::EventData( InputMethodContext::PRE_EDIT, "ㅎ", 0, 1 );
+  inputMethodContext.EventReceivedSignal().Emit(inputMethodContext, imfEvent);
+  application.SendNotification();
+  application.Render();
+  DALI_TEST_CHECK( gTextChangedCallBackCalled );
+  DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::TEXT ), std::string("ㅎ"), TEST_LOCATION );
+
+  gTextChangedCallBackCalled = false;
+  imfEvent = InputMethodContext::EventData( InputMethodContext::PRE_EDIT, "호", 0, 1 );
+  inputMethodContext.EventReceivedSignal().Emit(inputMethodContext, imfEvent);
+  application.SendNotification();
+  application.Render();
+  DALI_TEST_CHECK( gTextChangedCallBackCalled );
+  DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::TEXT ), std::string("호"), TEST_LOCATION );
+
+  gTextChangedCallBackCalled = false;
+  imfEvent = InputMethodContext::EventData( InputMethodContext::PRE_EDIT, "혿", 0, 1 );
+  inputMethodContext.EventReceivedSignal().Emit(inputMethodContext, imfEvent);
+  application.SendNotification();
+  application.Render();
+  DALI_TEST_CHECK( gTextChangedCallBackCalled );
+  DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::TEXT ), std::string("혿"), TEST_LOCATION );
+
+  gTextChangedCallBackCalled = false;
+  imfEvent = InputMethodContext::EventData( InputMethodContext::PRE_EDIT, "", 0, 1 );
+  inputMethodContext.EventReceivedSignal().Emit(inputMethodContext, imfEvent);
+  DALI_TEST_CHECK( !gTextChangedCallBackCalled );
+
+  imfEvent = InputMethodContext::EventData( InputMethodContext::COMMIT, "호", 0, 1 );
+  inputMethodContext.EventReceivedSignal().Emit(inputMethodContext, imfEvent);
+  DALI_TEST_CHECK( !gTextChangedCallBackCalled );
+
+  imfEvent = InputMethodContext::EventData( InputMethodContext::PRE_EDIT, "두", 1, 2 );
+  inputMethodContext.EventReceivedSignal().Emit(inputMethodContext, imfEvent);
+  DALI_TEST_CHECK( !gTextChangedCallBackCalled );
+
+  application.SendNotification();
+  application.Render();
+  DALI_TEST_CHECK( gTextChangedCallBackCalled );
+  DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::TEXT ), std::string("호두"), TEST_LOCATION );
+
+  END_TEST;
+}
+
+
+// Negative test for the textChanged signal.
+int utcDaliTextFieldTextChangedN(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldTextChangedN");
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( field );
+
+  application.GetScene().Add( field );
+
+  // connect to the text changed signal.
+  ConnectionTracker* testTracker = new ConnectionTracker();
+  field.TextChangedSignal().Connect(&TestTextChangedCallback);
+  bool textChangedSignal = false;
+  field.ConnectSignal( testTracker, "textChanged",   CallbackFunctor(&textChangedSignal) );
+
+  gTextChangedCallBackCalled = false;
+  field.SetProperty( TextField::Property::PLACEHOLDER_TEXT, "ABC" ); // Setting placeholder, not TEXT
+  application.SendNotification();
+  application.Render();
+  DALI_TEST_CHECK( !gTextChangedCallBackCalled );
+  DALI_TEST_CHECK( !textChangedSignal );
+
+  END_TEST;
+}
+
+// Positive test for Max Characters reached signal.
+int utcDaliTextFieldMaxCharactersReachedP(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldMaxCharactersReachedP");
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( field );
+
+  application.GetScene().Add( field );
+
+  const int maxNumberOfCharacters = 1;
+  field.SetProperty( TextField::Property::MAX_LENGTH, maxNumberOfCharacters );
+
+  field.SetKeyInputFocus();
+
+  // connect to the text changed signal.
+  ConnectionTracker* testTracker = new ConnectionTracker();
+  field.MaxLengthReachedSignal().Connect(&TestMaxLengthReachedCallback);
+  bool maxLengthReachedSignal = false;
+  field.ConnectSignal( testTracker, "maxLengthReached",   CallbackFunctor(&maxLengthReachedSignal) );
+
+  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 ) );
+
+  DALI_TEST_CHECK( gMaxCharactersCallBackCalled );
+  DALI_TEST_CHECK( maxLengthReachedSignal );
+
+  END_TEST;
+}
+
+// Negative test for Max Characters reached signal.
+int utcDaliTextFieldMaxCharactersReachedN(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldMaxCharactersReachedN");
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( field );
+
+  application.GetScene().Add( field );
+
+  const int maxNumberOfCharacters = 3;
+  field.SetProperty( TextField::Property::MAX_LENGTH, maxNumberOfCharacters );
+
+  field.SetKeyInputFocus();
+
+  // connect to the text changed signal.
+  ConnectionTracker* testTracker = new ConnectionTracker();
+  field.MaxLengthReachedSignal().Connect(&TestMaxLengthReachedCallback);
+  bool maxLengthReachedSignal = false;
+  field.ConnectSignal( testTracker, "maxLengthReached",   CallbackFunctor(&maxLengthReachedSignal) );
+
+  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 ) );
+
+  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 ) );
+
+  DALI_TEST_CHECK( !gMaxCharactersCallBackCalled );
+  DALI_TEST_CHECK( !maxLengthReachedSignal );
+
+  END_TEST;
+}
+
+// Positive test for Input Filtered signal.
+int utcDaliTextFieldInputFilteredP(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldInputFilteredP");
+  TextField field = TextField::New();
+  DALI_TEST_CHECK(field);
+
+  application.GetScene().Add(field);
+
+  Property::Map inputFilter;
+
+  // Only digit is accepted.
+  inputFilter[InputFilter::Property::ACCEPTED] = "[\\d]";
+
+  // Set input filter to TextField.
+  field.SetProperty(DevelTextField::Property::INPUT_FILTER, inputFilter);
+
+  field.SetKeyInputFocus();
+
+  // connect to the input filtered signal.
+  ConnectionTracker* testTracker = new ConnectionTracker();
+  DevelTextField::InputFilteredSignal(field).Connect(&TestInputFilteredCallback);
+  bool inputFilteredSignal = false;
+  field.ConnectSignal(testTracker, "inputFiltered", CallbackFunctor(&inputFilteredSignal));
+
+  gInputFilteredAcceptedCallbackCalled = false;
+
+  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(gInputFilteredAcceptedCallbackCalled);
+  DALI_TEST_CHECK(inputFilteredSignal);
+
+  // Word is rejected.
+  inputFilter[InputFilter::Property::ACCEPTED] = "";
+  inputFilter[InputFilter::Property::REJECTED] = "[\\w]";
+
+  // Set input filter to TextField.
+  field.SetProperty(DevelTextField::Property::INPUT_FILTER, inputFilter);
+
+  field.SetKeyInputFocus();
+
+  inputFilteredSignal = false;
+  gInputFilteredRejectedCallbackCalled = false;
+
+  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(gInputFilteredAcceptedCallbackCalled);
+  DALI_TEST_CHECK(inputFilteredSignal);
+
+  END_TEST;
+}
+
+// Negative test for Input Filtered signal.
+int utcDaliTextFieldInputFilteredN(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldInputFilteredP");
+  TextField field = TextField::New();
+  DALI_TEST_CHECK(field);
+
+  application.GetScene().Add(field);
+
+  Property::Map inputFilter;
+
+  // Only word is accepted.
+  inputFilter[InputFilter::Property::ACCEPTED] = "[\\w]";
+
+  // Set input filter to TextField.
+  field.SetProperty(DevelTextField::Property::INPUT_FILTER, inputFilter);
+
+  field.SetKeyInputFocus();
+
+  // connect to the input filtered signal.
+  ConnectionTracker* testTracker = new ConnectionTracker();
+  DevelTextField::InputFilteredSignal(field).Connect(&TestInputFilteredCallback);
+  bool inputFilteredSignal = false;
+  field.ConnectSignal(testTracker, "inputFiltered", CallbackFunctor(&inputFilteredSignal));
+
+  gInputFilteredAcceptedCallbackCalled = false;
+
+  // Key a, d should not be filtered.
+  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));
+
+  // Backspace, Delete should not be filtered.
+  application.ProcessEvent(GenerateKey( "", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::DOWN, "", 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();
+
+  DALI_TEST_CHECK(!gInputFilteredAcceptedCallbackCalled);
+  DALI_TEST_CHECK(!inputFilteredSignal);
+
+  // Digit is rejected.
+  inputFilter[InputFilter::Property::ACCEPTED] = "";
+  inputFilter[InputFilter::Property::REJECTED] = "[\\d]";
+
+  field.SetProperty(DevelTextField::Property::INPUT_FILTER, inputFilter);
+
+  field.SetKeyInputFocus();
+
+  inputFilteredSignal = false;
+  gInputFilteredRejectedCallbackCalled = false;
+
+  // Key a, d should not be filtered.
+  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));
+
+  // Backspace, Delete should not be filtered.
+  application.ProcessEvent(GenerateKey( "", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::DOWN, "", 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();
+
+  DALI_TEST_CHECK(!gInputFilteredAcceptedCallbackCalled);
+  DALI_TEST_CHECK(!inputFilteredSignal);
+
+  END_TEST;
+}
+
+int utcDaliTextFieldInputStyleChanged01(void)
+{
+  // 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.
+  // The ToolkitTestApplication creates an implementation of the adaptor stub and a queue of idle callbacks.
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldInputStyleChanged01");
+
+  // Load some fonts.
+
+  char* pathNamePtr = get_current_dir_name();
+  const std::string pathName( pathNamePtr );
+  free( pathNamePtr );
+
+  TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
+  fontClient.SetDpi( 93u, 93u );
+
+  fontClient.GetFontId( pathName + DEFAULT_FONT_DIR + "/dejavu/DejaVuSerif.ttf", DEFAULT_FONT_SIZE );
+  fontClient.GetFontId( pathName + DEFAULT_FONT_DIR + "/dejavu/DejaVuSerif-Bold.ttf", DEFAULT_FONT_SIZE );
+
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( 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 );
+
+  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>" );
+
+  // connect to the text changed signal.
+  ConnectionTracker* testTracker = new ConnectionTracker();
+  field.InputStyleChangedSignal().Connect( &TestInputStyleChangedCallback );
+  bool inputStyleChangedSignal = false;
+  field.ConnectSignal( testTracker, "inputStyleChanged",   CallbackFunctor(&inputStyleChangedSignal) );
+
+  application.GetScene().Add( field );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Executes the idle callbacks added by the text control on the change of input style.
+  application.RunIdles();
+
+  gInputStyleChangedCallbackCalled = false;
+  gInputStyleMask = TextField::InputStyle::NONE;
+  inputStyleChangedSignal = false;
+
+  // Create a tap event to touch the text field.
+  TestGenerateTap( application, 18.0f, 25.0f );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Executes the idle callbacks added by the text control on the change of input style.
+  application.RunIdles();
+
+  DALI_TEST_CHECK( gInputStyleChangedCallbackCalled );
+  if( gInputStyleChangedCallbackCalled )
+  {
+    DALI_TEST_EQUALS( static_cast<unsigned int>( gInputStyleMask ), static_cast<unsigned int>( TextField::InputStyle::FONT_FAMILY | TextField::InputStyle::POINT_SIZE ), TEST_LOCATION );
+
+    const std::string fontFamily = field.GetProperty( TextField::Property::INPUT_FONT_FAMILY ).Get<std::string>();
+    DALI_TEST_EQUALS( fontFamily, "DejaVuSerif", TEST_LOCATION );
+
+    const float pointSize = field.GetProperty( TextField::Property::INPUT_POINT_SIZE ).Get<float>();
+    DALI_TEST_EQUALS( pointSize, 18.f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+  }
+  DALI_TEST_CHECK( inputStyleChangedSignal );
+
+  gInputStyleChangedCallbackCalled = false;
+  gInputStyleMask = TextField::InputStyle::NONE;
+  inputStyleChangedSignal = false;
+
+  // Create a tap event to touch the text field.
+  TestGenerateTap( application, 30.0f, 25.0f );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Executes the idle callbacks added by the text control on the change of input style.
+  application.RunIdles();
+
+  DALI_TEST_CHECK( !gInputStyleChangedCallbackCalled );
+  DALI_TEST_CHECK( !inputStyleChangedSignal );
+
+  gInputStyleChangedCallbackCalled = false;
+  gInputStyleMask = TextField::InputStyle::NONE;
+  inputStyleChangedSignal = false;
+
+  // Create a tap event to touch the text field.
+  TestGenerateTap( application, 43.0f, 25.0f );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Executes the idle callbacks added by the text control on the change of input style.
+  application.RunIdles();
+
+  DALI_TEST_CHECK( gInputStyleChangedCallbackCalled );
+  if( gInputStyleChangedCallbackCalled )
+  {
+    DALI_TEST_EQUALS( static_cast<unsigned int>( gInputStyleMask ), static_cast<unsigned int>( TextField::InputStyle::COLOR ), TEST_LOCATION );
+
+    const Vector4 color = field.GetProperty( TextField::Property::INPUT_COLOR ).Get<Vector4>();
+    DALI_TEST_EQUALS( color, Color::GREEN, TEST_LOCATION );
+  }
+  DALI_TEST_CHECK( inputStyleChangedSignal );
+
+  gInputStyleChangedCallbackCalled = false;
+  gInputStyleMask = TextField::InputStyle::NONE;
+  inputStyleChangedSignal = false;
+
+  // Create a tap event to touch the text field.
+  TestGenerateTap( application, 88.0f, 25.0f );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Executes the idle callbacks added by the text control on the change of input style.
+  application.RunIdles();
+
+  DALI_TEST_CHECK( gInputStyleChangedCallbackCalled );
+  if( gInputStyleChangedCallbackCalled )
+  {
+    DALI_TEST_EQUALS( static_cast<unsigned int>( gInputStyleMask ), static_cast<unsigned int>( TextField::InputStyle::COLOR | TextField::InputStyle::FONT_STYLE ), TEST_LOCATION );
+
+    const Vector4 color = field.GetProperty( TextField::Property::INPUT_COLOR ).Get<Vector4>();
+    DALI_TEST_EQUALS( color, Color::BLACK, TEST_LOCATION );
+
+    const Property::Map fontStyleMapGet = field.GetProperty( TextField::Property::INPUT_FONT_STYLE ).Get<Property::Map>();
+
+    Property::Map fontStyleMapSet;
+    fontStyleMapSet.Insert( "weight", "bold" );
+
+    DALI_TEST_EQUALS( fontStyleMapGet.Count(), fontStyleMapSet.Count(), TEST_LOCATION );
+    DALI_TEST_EQUALS( DaliTestCheckMaps( fontStyleMapGet, fontStyleMapSet ), true, TEST_LOCATION );
+  }
+  DALI_TEST_CHECK( inputStyleChangedSignal );
+
+  gInputStyleChangedCallbackCalled = false;
+  gInputStyleMask = TextField::InputStyle::NONE;
+  inputStyleChangedSignal = false;
+
+  // Create a tap event to touch the text field.
+  TestGenerateTap( application, 115.0f, 25.0f );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Executes the idle callbacks added by the text control on the change of input style.
+  application.RunIdles();
+
+  DALI_TEST_CHECK( !gInputStyleChangedCallbackCalled );
+  DALI_TEST_CHECK( !inputStyleChangedSignal );
+
+  gInputStyleChangedCallbackCalled = false;
+  gInputStyleMask = TextField::InputStyle::NONE;
+  inputStyleChangedSignal = false;
+
+  // Create a tap event to touch the text field.
+  TestGenerateTap( application, 164.0f, 25.0f );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Executes the idle callbacks added by the text control on the change of input style.
+  application.RunIdles();
+
+  DALI_TEST_CHECK( gInputStyleChangedCallbackCalled );
+  if( gInputStyleChangedCallbackCalled )
+  {
+    DALI_TEST_EQUALS( static_cast<unsigned int>( gInputStyleMask ), static_cast<unsigned int>( TextField::InputStyle::FONT_STYLE ), TEST_LOCATION );
+
+    const std::string style = field.GetProperty( TextField::Property::INPUT_FONT_STYLE ).Get<std::string>();
+    DALI_TEST_CHECK( style.empty() );
+  }
+  DALI_TEST_CHECK( inputStyleChangedSignal );
+
+  gInputStyleChangedCallbackCalled = false;
+  gInputStyleMask = TextField::InputStyle::NONE;
+  inputStyleChangedSignal = false;
+
+  // Create a tap event to touch the text field.
+  TestGenerateTap( application, 191.0f, 25.0f );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Executes the idle callbacks added by the text control on the change of input style.
+  application.RunIdles();
+
+  DALI_TEST_CHECK( !gInputStyleChangedCallbackCalled );
+  DALI_TEST_CHECK( !inputStyleChangedSignal );
+
+  END_TEST;
+}
+
+int utcDaliTextFieldInputStyleChanged02(void)
+{
+  // 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.
+  // The ToolkitTestApplication creates an implementation of the adaptor stub and a queue of idle callbacks.
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldInputStyleChanged02");
+
+  // Load some fonts.
+
+  char* pathNamePtr = get_current_dir_name();
+  const std::string pathName( pathNamePtr );
+  free( pathNamePtr );
+
+  TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
+  fontClient.SetDpi( 93u, 93u );
+
+  fontClient.GetFontId( pathName + DEFAULT_FONT_DIR + "/dejavu/DejaVuSerif.ttf", DEFAULT_FONT_SIZE );
+  fontClient.GetFontId( pathName + DEFAULT_FONT_DIR + "/dejavu/DejaVuSerif-Bold.ttf", DEFAULT_FONT_SIZE );
+
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( 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 );
+
+  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>" );
+
+  // connect to the text changed signal.
+  ConnectionTracker* testTracker = new ConnectionTracker();
+  field.InputStyleChangedSignal().Connect( &TestInputStyleChangedCallback );
+  bool inputStyleChangedSignal = false;
+  field.ConnectSignal( testTracker, "inputStyleChanged",   CallbackFunctor(&inputStyleChangedSignal) );
+
+  application.GetScene().Add( field );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Executes the idle callbacks added by the text control on the change of input style.
+  application.RunIdles();
+
+  gInputStyleChangedCallbackCalled = false;
+  gInputStyleMask = TextField::InputStyle::NONE;
+  inputStyleChangedSignal = false;
+
+  // Create a tap event to touch the text field.
+  TestGenerateTap( application, 53.0f, 25.0f, 100 );
+  TestGenerateTap( application, 53.0f, 25.0f, 200 );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Executes the idle callbacks added by the text control on the change of input style.
+  application.RunIdles();
+
+  DALI_TEST_CHECK( gInputStyleChangedCallbackCalled );
+  if( gInputStyleChangedCallbackCalled )
+  {
+    DALI_TEST_EQUALS( static_cast<unsigned int>( gInputStyleMask ),
+                      static_cast<unsigned int>( TextField::InputStyle::FONT_FAMILY |
+                                                 TextField::InputStyle::POINT_SIZE  |
+                                                 TextField::InputStyle::COLOR ),
+                      TEST_LOCATION );
+
+    const Vector4 color = field.GetProperty( TextField::Property::INPUT_COLOR ).Get<Vector4>();
+    DALI_TEST_EQUALS( color, Color::GREEN, TEST_LOCATION );
+
+    const std::string fontFamily = field.GetProperty( TextField::Property::INPUT_FONT_FAMILY ).Get<std::string>();
+    DALI_TEST_EQUALS( fontFamily, "DejaVuSerif", TEST_LOCATION );
+
+    const float pointSize = field.GetProperty( TextField::Property::INPUT_POINT_SIZE ).Get<float>();
+    DALI_TEST_EQUALS( pointSize, 18.f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+  }
+  DALI_TEST_CHECK( inputStyleChangedSignal );
+
+  gInputStyleChangedCallbackCalled = false;
+  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 ) );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Executes the idle callbacks added by the text control on the change of input style.
+  application.RunIdles();
+
+  DALI_TEST_CHECK( gInputStyleChangedCallbackCalled );
+  if( gInputStyleChangedCallbackCalled )
+  {
+    DALI_TEST_EQUALS( static_cast<unsigned int>( gInputStyleMask ),
+                      static_cast<unsigned int>( TextField::InputStyle::COLOR ),
+                      TEST_LOCATION );
+
+    const Vector4 color = field.GetProperty( TextField::Property::INPUT_COLOR ).Get<Vector4>();
+    DALI_TEST_EQUALS( color, Color::BLUE, TEST_LOCATION );
+  }
+  DALI_TEST_CHECK( inputStyleChangedSignal );
+
+  gInputStyleChangedCallbackCalled = false;
+  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 ) );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Executes the idle callbacks added by the text control on the change of input style.
+  application.RunIdles();
+
+  DALI_TEST_CHECK( !gInputStyleChangedCallbackCalled );
+  DALI_TEST_CHECK( !inputStyleChangedSignal );
+
+  gInputStyleChangedCallbackCalled = false;
+  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 ) );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Executes the idle callbacks added by the text control on the change of input style.
+  application.RunIdles();
+
+  DALI_TEST_CHECK( gInputStyleChangedCallbackCalled );
+  if( gInputStyleChangedCallbackCalled )
+  {
+    DALI_TEST_EQUALS( static_cast<unsigned int>( gInputStyleMask ),
+                      static_cast<unsigned int>( TextField::InputStyle::COLOR ),
+                      TEST_LOCATION );
+
+    const Vector4 color = field.GetProperty( TextField::Property::INPUT_COLOR ).Get<Vector4>();
+    DALI_TEST_EQUALS( color, Color::BLACK, TEST_LOCATION );
+  }
+  DALI_TEST_CHECK( inputStyleChangedSignal );
+
+  gInputStyleChangedCallbackCalled = false;
+  gInputStyleMask = TextField::InputStyle::NONE;
+  inputStyleChangedSignal = false;
+
+  field.SetProperty( TextField::Property::INPUT_COLOR, Color::YELLOW );
+
+  Property::Map fontStyleMapSet;
+  fontStyleMapSet.Insert( "weight", "thin" );
+  fontStyleMapSet.Insert( "width", "condensed" );
+  fontStyleMapSet.Insert( "slant", "italic" );
+
+  field.SetProperty( TextField::Property::INPUT_FONT_STYLE, fontStyleMapSet );
+  field.SetProperty( TextField::Property::INPUT_POINT_SIZE, 20.f );
+
+  field.SetProperty( TextField::Property::INPUT_UNDERLINE, "underline" );
+  field.SetProperty( TextField::Property::INPUT_SHADOW, "shadow" );
+  field.SetProperty( TextField::Property::INPUT_EMBOSS, "emboss" );
+  field.SetProperty( TextField::Property::INPUT_OUTLINE, "outline" );
+  field.SetProperty( DevelTextField::Property::INPUT_STRIKETHROUGH, "strikethrough" );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Executes the idle callbacks added by the text control on the change of input style.
+  application.RunIdles();
+
+  DALI_TEST_CHECK( !gInputStyleChangedCallbackCalled );
+  DALI_TEST_CHECK( !inputStyleChangedSignal );
+
+  // Create a tap event to touch the text field.
+  TestGenerateTap( application, 63.0f, 25.0f, 700 );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Executes the idle callbacks added by the text control on the change of input style.
+  application.RunIdles();
+
+  DALI_TEST_CHECK( gInputStyleChangedCallbackCalled );
   if( gInputStyleChangedCallbackCalled )
   {
-    DALI_TEST_EQUALS( static_cast<unsigned int>( gInputStyleMask ), static_cast<unsigned int>( TextField::InputStyle::COLOR ), TEST_LOCATION );
+    DALI_TEST_EQUALS( static_cast<unsigned int>( gInputStyleMask ),
+                      static_cast<unsigned int>( TextField::InputStyle::COLOR |
+                                                 TextField::InputStyle::POINT_SIZE |
+                                                 TextField::InputStyle::FONT_STYLE |
+                                                 TextField::InputStyle::UNDERLINE |
+                                                 TextField::InputStyle::SHADOW |
+                                                 TextField::InputStyle::EMBOSS |
+                                                 TextField::InputStyle::OUTLINE ),
+                      TEST_LOCATION );
+
+    const Vector4 color = field.GetProperty( TextField::Property::INPUT_COLOR ).Get<Vector4>();
+    DALI_TEST_EQUALS( color, Color::BLACK, TEST_LOCATION );
+  }
+  DALI_TEST_CHECK( inputStyleChangedSignal );
+
+  END_TEST;
+}
+
+int utcDaliTextFieldEvent01(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldEvent01");
+
+  // Creates a tap event. After creating a tap event the text field should
+  // have the focus and add text with key events should be possible.
+
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( field );
+
+  application.GetScene().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 );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Avoid a crash when core load gl resources.
+  application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
+
+  // Render and notify
+  application.SendNotification();
+  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 ) );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::TEXT ), std::string(""), TEST_LOCATION );
+
+  // Create a tap event to touch the text field.
+  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 ) );
+  // 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 ) );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::TEXT ), std::string("aa"), TEST_LOCATION );
+
+  // Create a second text field and send key events to it.
+  TextField field2 = TextField::New();
+
+  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 ));
+
+  application.GetScene().Add( field2 );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Create a tap event on the second text field.
+  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 ) );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Check the text has been added to the second text field.
+  DALI_TEST_EQUALS( field2.GetProperty<std::string>( TextField::Property::TEXT ), std::string("aa"), TEST_LOCATION );
+
+  END_TEST;
+}
+
+int utcDaliTextFieldEvent02(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldEvent02");
+
+  // Checks if the right number of actors are created.
+
+  TextField field = TextField::New();
+  field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
+  DALI_TEST_CHECK( field );
+  LoadMarkerImages(application, field);
+
+  application.GetScene().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 );
+
+  // Avoid a crash when core load gl resources.
+  application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Check there are the expected number of children ( stencil ).
+  DALI_TEST_EQUALS( field.GetChildCount(), 1u, TEST_LOCATION );
+
+  Actor stencil = field.GetChildAt( 0u );
+  DALI_TEST_EQUALS( stencil.GetChildCount(), 0u, TEST_LOCATION );
+
+  // Create a tap event to touch the text field.
+  TestGenerateTap( application, 150.0f, 25.0f, 300 );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  Actor layer = field.GetChildAt( 1u );
+  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 ) );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Checks the cursor and the renderer have been created.
+  DALI_TEST_EQUALS( layer.GetChildCount(), 1u, TEST_LOCATION ); // The cursor.
+  DALI_TEST_EQUALS( stencil.GetChildCount(), 1u, TEST_LOCATION ); // The renderer
+
+  Control cursor = Control::DownCast( layer.GetChildAt( 0u ) );
+  DALI_TEST_CHECK( cursor );
+
+  // The offscreen root actor has a container with all the actors which contain the text renderers.
+  Actor container = stencil.GetChildAt( 0u );
+  for( unsigned int index = 0; index < container.GetChildCount(); ++index )
+  {
+    Renderer renderer = container.GetChildAt( index ).GetRendererAt( 0u );
+    DALI_TEST_CHECK( renderer );
+  }
+
+  // Move the cursor and check the position changes.
+  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.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 ) );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  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.
+  TestGenerateTap( application, 1.0f, 25.0f, 900 );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Cursor position should be the same than position1.
+  Vector3 position5 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
+
+  DALI_TEST_EQUALS( position4, position5, TEST_LOCATION ); // Should be in the same position2.
+
+  // Tap away from the start position.
+  TestGenerateTap( application, 16.0f, 25.0f, 1500 );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  Vector3 position6 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
+
+  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 ) );
+  field.SetProperty( TextField::Property::TEXT, "" );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Cursor position should be the same than position2.
+  Vector3 position7 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
+
+  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 );
+
+  // Chanege exceed policy (EXCEED_POLICY_ORIGINAL doesn't use stencil )
+  field.SetProperty( TextField::Property::TEXT, "This is a long text for the size of the text-field." );
+  field.SetProperty( TextField::Property::EXCEED_POLICY, Dali::Toolkit::TextField::EXCEED_POLICY_ORIGINAL );
+
+  application.SendNotification();
+  application.Render();
+
+  // There are renderer and decorator layer
+  DALI_TEST_EQUALS( field.GetChildCount(), 2u, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int utcDaliTextFieldEvent03(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldEvent03");
+
+  // Checks if the highlight actor is created.
+
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( 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.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 );
+  LoadMarkerImages(application, field);
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Tap first to get the focus.
+  TestGenerateTap( application, 3.0f, 25.0f );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Double tap to select a word.
+  TestGenerateTap( application, 3.0f, 25.0f );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // 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( 1u );
+  for( unsigned int index = 0; index < container.GetChildCount(); ++index )
+  {
+    Renderer renderer = container.GetChildAt( index ).GetRendererAt( 0u );
+    DALI_TEST_CHECK( renderer );
+  }
+
+  END_TEST;
+}
+
+int utcDaliTextFieldEvent04(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldEvent04");
+
+  // Checks if the highlight actor is created.
+
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( field );
+  application.GetScene().Add( field );
+  LoadMarkerImages(application, field);
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  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.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 );
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Create a tap event to touch the text field.
+  TestGenerateTap( application, 150.0f, 25.0f );
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+
+  // Tap first to get the focus.
+  TestGenerateTap( application, 1.0f, 25.0f );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Double tap to select a word.
+  TestGenerateTap( application, 1.0f, 25.0f );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Tap grab handle
+  TestGenerateTap( application, 0.0f, 40.0f );
+  END_TEST;
+}
+
+int utcDaliTextFieldEvent05(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldEvent05");
+
+  // Checks dragging of cursor/grab handle
+
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( field );
+  application.GetScene().Add( field );
+  LoadMarkerImages(application, field);
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  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.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 );
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Create a tap event to touch the text field.
+  TestGenerateTap( application, 150.0f, 25.0f );
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Tap first to get the focus.
+  TestGenerateTap( application, 1.0f, 25.0f );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Double tap to select a word.
+  TestGenerateTap( application, 1.0f, 25.0f );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  Actor stencil = field.GetChildAt( 1u );
+  END_TEST;
+}
+
+int utcDaliTextFieldEvent06(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldEvent06");
+
+  // Checks Longpress when in edit mode
+
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( field );
+  application.GetScene().Add( field );
+  LoadMarkerImages(application, field);
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  field.SetProperty( TextField::Property::TEXT, "Thisisalongtextforthesizeofthetextfield." );
+  field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
+  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 );
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Create a tap event to touch the text field.
+  TestGenerateTap( application, 150.0f, 25.0f );
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+
+  // Tap first to get the focus.
+  TestGenerateTap( application, 1.0f, 25.0f );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Long Press
+  TestGenerateLongPress(application, 1.0f, 25.0f);
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  END_TEST;
+}
+
+int utcDaliTextFieldEvent07(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldEvent07");
+
+  // Checks Longpress to start edit mode
+
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( field );
+  application.GetScene().Add( field );
+  LoadMarkerImages(application, field);
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  field.SetProperty( TextField::Property::TEXT, "Thisisalongtextforthesizeofthetextfield." );
+  field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
+  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 );
+
+  // Avoid a crash when core load gl resources.
+  application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Long Press
+  TestGenerateLongPress(application, 1.0f, 25.0f);
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  END_TEST;
+}
+
+int utcDaliTextFieldEvent08(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldEvent08");
+
+  Dali::Clipboard clipboard = Clipboard::Get();
+  clipboard.SetItem("testTextFieldEvent");
+
+  // Checks Longpress when only place holder text
+
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( field );
+  application.GetScene().Add( field );
+  LoadMarkerImages(application, field);
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  field.SetProperty( TextField::Property::PLACEHOLDER_TEXT, "Setting Placeholder Text" );
+  field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
+  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 );
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Long Press
+  TestGenerateLongPress( application, 1.0f, 25.0f, 20 );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  Wait(application, 500);
+
+  TestEndLongPress( application, 1.0f, 25.0f, 520 );
+
+  // Long Press
+  TestGenerateLongPress( application, 1.0f, 25.0f, 600 );
+
+  // Render and notify
+  application.Render();
+
+  Wait(application, 500);
+
+  Integration::Scene stage = application.GetScene();
+  Layer layer = stage.GetRootLayer();
+  Actor actor = layer.FindChildByName("optionPaste");
+
+  if (actor)
+  {
+    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);
+
+    Dali::Integration::TouchEvent event;
+    event = Dali::Integration::TouchEvent();
+    event.AddPoint( GetPointDownInside( position ) );
+    application.ProcessEvent( event );
+
+    event = Dali::Integration::TouchEvent();
+    event.AddPoint( GetPointUpInside( position ) );
+    application.ProcessEvent( event );
+  }
+  DALI_TEST_EQUALS( field.GetProperty<std::string>( TextEditor::Property::TEXT ), std::string("testTextFieldEvent"), TEST_LOCATION );
+
+  END_TEST;
+}
+
+int utcDaliTextFieldEvent09(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldEvent09");
+
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( field );
+  application.GetScene().Add( field );
+  LoadMarkerImages(application, field);
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  field.SetProperty( TextField::Property::TEXT, "Hello" );
+  field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
+  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.
+  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.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.SendNotification();
+  application.Render();
+
+  map[ HiddenInput::Property::MODE ] = HiddenInput::Mode::HIDE_COUNT;
+  map[ HiddenInput::Property::SUBSTITUTE_COUNT ] = 2;
+  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.SendNotification();
+    application.Render();
+  }
 
-    const Vector4 color = field.GetProperty( TextField::Property::INPUT_COLOR ).Get<Vector4>();
-    DALI_TEST_EQUALS( color, Color::GREEN, TEST_LOCATION );
+  map[ HiddenInput::Property::MODE ] = HiddenInput::Mode::SHOW_COUNT;
+  map[ HiddenInput::Property::SUBSTITUTE_COUNT ] = 2;
+  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.SendNotification();
+    application.Render();
   }
-  DALI_TEST_CHECK( inputStyleChangedSignal );
 
-  gInputStyleChangedCallbackCalled = false;
-  gInputStyleMask = TextField::InputStyle::NONE;
-  inputStyleChangedSignal = false;
+  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.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.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.SendNotification();
+  application.Render();
+
+  Property::Map mapGet;
+  mapGet = field.GetProperty<Property::Map>( TextField::Property::HIDDEN_INPUT_SETTINGS );
+  DALI_TEST_EQUALS( map.Count(), mapGet.Count(), TEST_LOCATION );
+  DALI_TEST_EQUALS( DaliTestCheckMaps( map, mapGet ), true, TEST_LOCATION );
+  END_TEST;
+}
+
+
+int utcDaliTextFieldStyleWhilstSelected(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldStyleWhilstSelected");
+
+  // Change font and styles whilst text is selected whilst word selected
+
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( field );
+  application.GetScene().Add( field );
+  LoadMarkerImages(application, field);
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  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.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 );
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Create a tap event to touch the text field.
+  TestGenerateTap( application, 150.0f, 25.0f );
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+
+  // Tap first to get the focus.
+  TestGenerateTap( application, 1.0f, 25.0f );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Double tap to select a word.
+  TestGenerateTap( application, 1.0f, 25.0f );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  field.SetProperty( TextField::Property::INPUT_FONT_FAMILY, "Setting input font family" );
+  DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::INPUT_FONT_FAMILY ), "Setting input font family", TEST_LOCATION );
+
+  Property::Map fontStyleMapSet;
+  Property::Map fontStyleMapGet;
+
+  fontStyleMapSet.Insert( "weight", "bold" );
+  fontStyleMapSet.Insert( "slant", "italic" );
+  field.SetProperty( TextField::Property::INPUT_FONT_STYLE, fontStyleMapSet );
+
+  fontStyleMapGet = field.GetProperty<Property::Map>( TextField::Property::INPUT_FONT_STYLE );
+  DALI_TEST_EQUALS( fontStyleMapGet.Count(), fontStyleMapSet.Count(), TEST_LOCATION );
+  DALI_TEST_EQUALS( DaliTestCheckMaps( fontStyleMapGet, fontStyleMapSet ), true, TEST_LOCATION );
+
+  fontStyleMapSet.Clear();
+  fontStyleMapSet.Insert( "width", "expanded" );
+  fontStyleMapSet.Insert( "slant", "italic" );
+  field.SetProperty( TextField::Property::INPUT_FONT_STYLE, fontStyleMapSet );
+
+  fontStyleMapGet = field.GetProperty<Property::Map>( TextField::Property::INPUT_FONT_STYLE );
+  DALI_TEST_EQUALS( fontStyleMapGet.Count(), fontStyleMapSet.Count(), TEST_LOCATION );
+  DALI_TEST_EQUALS( DaliTestCheckMaps( fontStyleMapGet, fontStyleMapSet ), true, TEST_LOCATION );
+
+  field.SetProperty( TextField::Property::INPUT_POINT_SIZE, 12.f );
+  DALI_TEST_EQUALS( field.GetProperty<float>( TextField::Property::INPUT_POINT_SIZE ), 12.f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+
+  field.SetProperty( TextField::Property::TEXT_COLOR, Color::RED );
+  DALI_TEST_EQUALS( field.GetProperty<Vector4>( TextField::Property::TEXT_COLOR ), Color::RED, TEST_LOCATION );
+
+  fontStyleMapSet.Clear();
+  fontStyleMapSet.Insert( "weight", "bold" );
+  fontStyleMapSet.Insert( "slant", "italic" );
+
+  field.SetProperty( TextField::Property::FONT_STYLE, fontStyleMapSet );
+
+  fontStyleMapGet = field.GetProperty<Property::Map>( TextField::Property::FONT_STYLE );
+  DALI_TEST_EQUALS( fontStyleMapGet.Count(), fontStyleMapSet.Count(), TEST_LOCATION );
+  DALI_TEST_EQUALS( DaliTestCheckMaps( fontStyleMapGet, fontStyleMapSet ), true, TEST_LOCATION );
+
+  fontStyleMapSet.Clear();
+  fontStyleMapSet.Insert( "width", "expanded" );
+
+  field.SetProperty( TextField::Property::FONT_STYLE, fontStyleMapSet );
+
+  fontStyleMapGet = field.GetProperty<Property::Map>( TextField::Property::FONT_STYLE );
+  DALI_TEST_EQUALS( fontStyleMapGet.Count(), fontStyleMapSet.Count(), TEST_LOCATION );
+  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.SendNotification();
+  application.Render();
+
+  DALI_TEST_CHECK( !field.HasKeyInputFocus() );
+
+  END_TEST;
+}
+
+int utcDaliTextFieldEscKeyLoseFocus(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldEscKeyLoseFocus");
+
+  // Creates a tap event. After creating a tap event the text field should
+  // have the focus and add text with key events should be possible.
+
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( field );
+
+  application.GetScene().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 );
+
+  // Avoid a crash when core load gl resources.
+  application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
+
+  // Render and notify
+  application.SendNotification();
+  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 ) );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::TEXT ), std::string(""), TEST_LOCATION );
+
+  // Create a tap event to touch the text field.
+  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 ) );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
 
-  // Create a tap event to touch the text field.
-  TestGenerateTap( application, 88.0f, 25.0f );
+  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 ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Executes the idle callbacks added by the text control on the change of input style.
-  application.RunIdles();
-
-  DALI_TEST_CHECK( gInputStyleChangedCallbackCalled );
-  if( gInputStyleChangedCallbackCalled )
-  {
-    DALI_TEST_EQUALS( static_cast<unsigned int>( gInputStyleMask ), static_cast<unsigned int>( TextField::InputStyle::COLOR | TextField::InputStyle::FONT_STYLE ), TEST_LOCATION );
+  DALI_TEST_EQUALS( false, field.HasKeyInputFocus(), TEST_LOCATION );
 
-    const Vector4 color = field.GetProperty( TextField::Property::INPUT_COLOR ).Get<Vector4>();
-    DALI_TEST_EQUALS( color, Color::BLACK, 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 ) );
 
-    const Property::Map fontStyleMapGet = field.GetProperty( TextField::Property::INPUT_FONT_STYLE ).Get<Property::Map>();
+  // Render and notify
+  application.SendNotification();
+  application.Render();
 
-    Property::Map fontStyleMapSet;
-    fontStyleMapSet.Insert( "weight", "bold" );
+  DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::TEXT ), std::string("ad"), TEST_LOCATION );
 
-    DALI_TEST_EQUALS( fontStyleMapGet.Count(), fontStyleMapSet.Count(), TEST_LOCATION );
-    DALI_TEST_EQUALS( DaliTestCheckMaps( fontStyleMapGet, fontStyleMapSet ), true, TEST_LOCATION );
-  }
-  DALI_TEST_CHECK( inputStyleChangedSignal );
+  END_TEST;
+}
 
-  gInputStyleChangedCallbackCalled = false;
-  gInputStyleMask = TextField::InputStyle::NONE;
-  inputStyleChangedSignal = false;
+int utcDaliTextFieldSomeSpecialKeys(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldSomeSpecialKeys");
 
-  // Create a tap event to touch the text field.
-  TestGenerateTap( application, 115.0f, 25.0f );
+  // Checks some special keys when the text is selected.
 
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( field );
+  application.GetScene().Add( field );
+  LoadMarkerImages(application, field);
   // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Executes the idle callbacks added by the text control on the change of input style.
-  application.RunIdles();
+  const std::string longText( "This is a long text for the size of the text-field." );
 
-  DALI_TEST_CHECK( !gInputStyleChangedCallbackCalled );
-  DALI_TEST_CHECK( !inputStyleChangedSignal );
+  field.SetProperty( TextField::Property::TEXT, longText );
+  field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
+  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 );
 
-  gInputStyleChangedCallbackCalled = false;
-  gInputStyleMask = TextField::InputStyle::NONE;
-  inputStyleChangedSignal = false;
+  // Avoid a crash when core load gl resources.
+  application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
+  // Render and notify
+  application.SendNotification();
+  application.Render();
 
   // Create a tap event to touch the text field.
-  TestGenerateTap( application, 164.0f, 25.0f );
+  TestGenerateTap( application, 150.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Executes the idle callbacks added by the text control on the change of input style.
-  application.RunIdles();
+  // Tap first to get the focus.
+  TestGenerateTap( application, 1.0f, 25.0f );
 
-  DALI_TEST_CHECK( gInputStyleChangedCallbackCalled );
-  if( gInputStyleChangedCallbackCalled )
-  {
-    DALI_TEST_EQUALS( static_cast<unsigned int>( gInputStyleMask ), static_cast<unsigned int>( TextField::InputStyle::FONT_STYLE ), TEST_LOCATION );
+  // Render and notify
+  application.SendNotification();
+  application.Render();
 
-    const std::string style = field.GetProperty( TextField::Property::INPUT_FONT_STYLE ).Get<std::string>();
-    DALI_TEST_CHECK( style.empty() );
-  }
-  DALI_TEST_CHECK( inputStyleChangedSignal );
+  // Double tap to select a word.
+  TestGenerateTap( application, 1.0f, 25.0f );
 
-  gInputStyleChangedCallbackCalled = false;
-  gInputStyleMask = TextField::InputStyle::NONE;
-  inputStyleChangedSignal = false;
+  // Render and notify
+  application.SendNotification();
+  application.Render();
 
-  // Create a tap event to touch the text field.
-  TestGenerateTap( application, 191.0f, 25.0f );
+  // 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 ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Executes the idle callbacks added by the text control on the change of input style.
-  application.RunIdles();
+  // 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 ) );
 
-  DALI_TEST_CHECK( !gInputStyleChangedCallbackCalled );
-  DALI_TEST_CHECK( !inputStyleChangedSignal );
+  // 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 ) );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // The text shouldn't be deleted.
+  DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::TEXT ), longText, TEST_LOCATION );
 
   END_TEST;
 }
 
-int utcDaliTextFieldInputStyleChanged02(void)
+int utcDaliTextFieldSizeUpdate(void)
 {
-  // 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.
-  // The ToolkitTestApplication creates an implementation of the adaptor stub and a queue of idle callbacks.
   ToolkitTestApplication application;
-  tet_infoline(" utcDaliTextFieldInputStyleChanged02");
-
-  // Load some fonts.
+  tet_infoline("utcDaliTextFieldSizeUpdate");
 
-  char* pathNamePtr = get_current_dir_name();
-  const std::string pathName( pathNamePtr );
-  free( pathNamePtr );
+  // Checks some special keys when the text is selected.
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( field );
+  application.GetScene().Add( field );
 
-  TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
-  fontClient.SetDpi( 93u, 93u );
+  float previousHeight = 0.0f;
+  float currentHeight = 0.0f;
+  const float fieldWidth = 1920.0f;
 
-  fontClient.GetFontId( pathName + DEFAULT_FONT_DIR + "/dejavu/DejaVuSerif.ttf", DEFAULT_FONT_SIZE );
-  fontClient.GetFontId( pathName + DEFAULT_FONT_DIR + "/dejavu/DejaVuSerif-Bold.ttf", DEFAULT_FONT_SIZE );
 
-  TextField field = TextField::New();
-  DALI_TEST_CHECK( field );
+  // "ㅁ" is bigger then "ኢ"
+  field.SetProperty( Actor::Property::SIZE, Vector2( fieldWidth ,10.0f ) );
+  field.SetResizePolicy( ResizePolicy::FIXED , Dimension::WIDTH );
+  field.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY , Dimension::HEIGHT );
 
-  field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
+  field.SetProperty( TextField::Property::TEXT, "ኢ");
   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>" );
+  field.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
+  KeyboardFocusManager::Get().SetCurrentFocusActor( field );
 
-  // connect to the text changed signal.
-  ConnectionTracker* testTracker = new ConnectionTracker();
-  field.InputStyleChangedSignal().Connect( &TestInputStyleChangedCallback );
-  bool inputStyleChangedSignal = false;
-  field.ConnectSignal( testTracker, "inputStyleChanged",   CallbackFunctor(&inputStyleChangedSignal) );
+  application.SendNotification();
+  application.Render();
 
-  application.GetScene().Add( field );
+  previousHeight = field.GetHeightForWidth( fieldWidth );
+  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 ) );
 
-  // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Executes the idle callbacks added by the text control on the change of input style.
-  application.RunIdles();
+  currentHeight = field.GetHeightForWidth( fieldWidth );
+  DALI_TEST_EQUALS( currentHeight, field.GetProperty<float>( Actor::Property::SIZE_HEIGHT ), TEST_LOCATION );
+  DALI_TEST_EQUALS( (previousHeight < currentHeight), true , TEST_LOCATION );
 
-  gInputStyleChangedCallbackCalled = false;
-  gInputStyleMask = TextField::InputStyle::NONE;
-  inputStyleChangedSignal = false;
+  END_TEST;
+}
 
-  // Create a tap event to touch the text field.
-  TestGenerateTap( application, 53.0f, 25.0f, 100 );
-  TestGenerateTap( application, 53.0f, 25.0f, 200 );
+int utcDaliTextFieldExtremlyLargePointSize(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldExtremlyLargePointSize");
 
-  // Render and notify
-  application.SendNotification();
-  application.Render();
+  TextField field = TextField::New();
 
-  // Executes the idle callbacks added by the text control on the change of input style.
-  application.RunIdles();
+  field.SetProperty( TextField::Property::TEXT, "Text" );
+  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 );
 
-  DALI_TEST_CHECK( gInputStyleChangedCallbackCalled );
-  if( gInputStyleChangedCallbackCalled )
+  try
   {
-    DALI_TEST_EQUALS( static_cast<unsigned int>( gInputStyleMask ),
-                      static_cast<unsigned int>( TextField::InputStyle::FONT_FAMILY |
-                                                 TextField::InputStyle::POINT_SIZE  |
-                                                 TextField::InputStyle::COLOR ),
-                      TEST_LOCATION );
+    field.SetProperty( TextField::Property::POINT_SIZE, 160.0f );
+    application.SendNotification();
+    DALI_TEST_CHECK( field );
+  }
+  catch (...)
+  {
+    tet_result(TET_FAIL);
+  }
+  END_TEST;
+}
 
-    const Vector4 color = field.GetProperty( TextField::Property::INPUT_COLOR ).Get<Vector4>();
-    DALI_TEST_EQUALS( color, Color::GREEN, TEST_LOCATION );
+int UtcDaliTextFieldDefaultFontStylePropertyCoverage(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline("UtcDaliTextFieldFontStylePorpertyCoverage");
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( field );
+  application.GetScene().Add( field );
 
-    const std::string fontFamily = field.GetProperty( TextField::Property::INPUT_FONT_FAMILY ).Get<std::string>();
-    DALI_TEST_EQUALS( fontFamily, "DejaVuSerif", TEST_LOCATION );
+  Property::Map fontStyleMapGet;
 
-    const float pointSize = field.GetProperty( TextField::Property::INPUT_POINT_SIZE ).Get<float>();
-    DALI_TEST_EQUALS( pointSize, 18.f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
-  }
-  DALI_TEST_CHECK( inputStyleChangedSignal );
+  fontStyleMapGet = field.GetProperty<Property::Map>( TextField::Property::FONT_STYLE );
 
-  gInputStyleChangedCallbackCalled = false;
-  gInputStyleMask = TextField::InputStyle::NONE;
-  inputStyleChangedSignal = false;
+  Property::Value* weightValue = NULL;
+  Property::Value* widthValue = NULL;
+  Property::Value* slantValue = NULL;
+  weightValue = fontStyleMapGet.Find( "weight" );
+  widthValue = fontStyleMapGet.Find( "width" );
+  slantValue = fontStyleMapGet.Find( "slant" );
+  DALI_TEST_CHECK( !weightValue );
+  DALI_TEST_CHECK( !widthValue );
+  DALI_TEST_CHECK( !slantValue );
 
-  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  END_TEST;
+}
 
-  // Render and notify
-  application.SendNotification();
-  application.Render();
+int UtcDaliTextFieldSettingPlaceholder(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline("UtcDaliTextFieldSettingPlaceholder");
 
-  // Executes the idle callbacks added by the text control on the change of input style.
-  application.RunIdles();
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( field );
+  application.GetScene().Add( field );
 
-  DALI_TEST_CHECK( gInputStyleChangedCallbackCalled );
-  if( gInputStyleChangedCallbackCalled )
-  {
-    DALI_TEST_EQUALS( static_cast<unsigned int>( gInputStyleMask ),
-                      static_cast<unsigned int>( TextField::InputStyle::COLOR ),
-                      TEST_LOCATION );
+  // Check the placeholder property with pixel size
+  Property::Map placeholderPixelSizeMapSet;
+  Property::Map placeholderPixelSizeMapGet;
+  Property::Map placeholderFontstyleMap;
+  placeholderPixelSizeMapSet[ Text::PlaceHolder::Property::TEXT ] = "Setting Placeholder Text";
+  placeholderPixelSizeMapSet[ Text::PlaceHolder::Property::TEXT_FOCUSED ] = "Setting Placeholder Text Focused";
+  placeholderPixelSizeMapSet[ Text::PlaceHolder::Property::COLOR ] = Color::BLUE;
+  placeholderPixelSizeMapSet[ Text::PlaceHolder::Property::FONT_FAMILY ] = "Arial";
+  placeholderPixelSizeMapSet[ Text::PlaceHolder::Property::PIXEL_SIZE ] = 15.0f;
+  placeholderPixelSizeMapSet[ Text::PlaceHolder::Property::ELLIPSIS ] = true;
 
-    const Vector4 color = field.GetProperty( TextField::Property::INPUT_COLOR ).Get<Vector4>();
-    DALI_TEST_EQUALS( color, Color::BLUE, TEST_LOCATION );
-  }
-  DALI_TEST_CHECK( inputStyleChangedSignal );
+  placeholderFontstyleMap.Insert( "weight", "bold" );
+  placeholderPixelSizeMapSet[ Text::PlaceHolder::Property::FONT_STYLE ] = placeholderFontstyleMap;
+  field.SetProperty( TextField::Property::PLACEHOLDER, placeholderPixelSizeMapSet );
 
-  gInputStyleChangedCallbackCalled = false;
-  gInputStyleMask = TextField::InputStyle::NONE;
-  inputStyleChangedSignal = false;
+  placeholderPixelSizeMapGet = field.GetProperty<Property::Map>( TextField::Property::PLACEHOLDER );
+  DALI_TEST_EQUALS( placeholderPixelSizeMapGet.Count(), placeholderPixelSizeMapSet.Count(), TEST_LOCATION );
+  DALI_TEST_EQUALS( DaliTestCheckMaps( placeholderPixelSizeMapGet, placeholderPixelSizeMapSet ), true, TEST_LOCATION );
 
-  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  // Check the placeholder property with point size
+  Property::Map placeholderMapSet;
+  Property::Map placeholderMapGet;
+  placeholderMapSet[ Text::PlaceHolder::Property::TEXT ] = "Setting Placeholder Text";
+  placeholderMapSet[ Text::PlaceHolder::Property::TEXT_FOCUSED ] = "Setting Placeholder Text Focused";
+  placeholderMapSet[ Text::PlaceHolder::Property::COLOR ] = Color::RED;
+  placeholderMapSet[ Text::PlaceHolder::Property::FONT_FAMILY ] = "Arial";
+  placeholderMapSet[ Text::PlaceHolder::Property::POINT_SIZE ] = 12.0f;
+  placeholderMapSet[ Text::PlaceHolder::Property::ELLIPSIS ] = false;
 
-  // Render and notify
-  application.SendNotification();
-  application.Render();
+  // Check the placeholder font style property
+  placeholderFontstyleMap.Clear();
 
-  // Executes the idle callbacks added by the text control on the change of input style.
-  application.RunIdles();
+  placeholderFontstyleMap.Insert( "weight", "bold" );
+  placeholderFontstyleMap.Insert( "width", "condensed" );
+  placeholderFontstyleMap.Insert( "slant", "italic" );
+  placeholderMapSet[ Text::PlaceHolder::Property::FONT_STYLE ] = placeholderFontstyleMap;
+  field.SetProperty( TextField::Property::PLACEHOLDER, placeholderMapSet );
 
-  DALI_TEST_CHECK( !gInputStyleChangedCallbackCalled );
-  DALI_TEST_CHECK( !inputStyleChangedSignal );
+  placeholderMapGet = field.GetProperty<Property::Map>( TextField::Property::PLACEHOLDER );
+  DALI_TEST_EQUALS( placeholderMapGet.Count(), placeholderMapSet.Count(), TEST_LOCATION );
+  DALI_TEST_EQUALS( DaliTestCheckMaps( placeholderMapGet, placeholderMapSet ), true, TEST_LOCATION );
 
-  gInputStyleChangedCallbackCalled = false;
-  gInputStyleMask = TextField::InputStyle::NONE;
-  inputStyleChangedSignal = false;
+  // Reset font style.
+  placeholderFontstyleMap.Clear();
+  placeholderFontstyleMap.Insert( "weight", "normal" );
+  placeholderFontstyleMap.Insert( "slant", "oblique" );
+  placeholderMapSet[ Text::PlaceHolder::Property::FONT_STYLE ] = placeholderFontstyleMap;
+  field.SetProperty( TextField::Property::PLACEHOLDER, placeholderMapSet );
 
-  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  placeholderMapGet = field.GetProperty<Property::Map>( TextField::Property::PLACEHOLDER );
+  DALI_TEST_EQUALS( placeholderMapGet.Count(), placeholderMapSet.Count(), TEST_LOCATION );
+  DALI_TEST_EQUALS( DaliTestCheckMaps( placeholderMapGet, placeholderMapSet ), true, TEST_LOCATION );
 
-  // Render and notify
-  application.SendNotification();
-  application.Render();
+  placeholderFontstyleMap.Clear();
+  placeholderFontstyleMap.Insert( "slant", "roman" );
+  placeholderMapSet[ Text::PlaceHolder::Property::FONT_STYLE ] = placeholderFontstyleMap;
+  field.SetProperty( TextField::Property::PLACEHOLDER, placeholderMapSet );
 
-  // Executes the idle callbacks added by the text control on the change of input style.
-  application.RunIdles();
+  placeholderMapGet = field.GetProperty<Property::Map>( TextField::Property::PLACEHOLDER );
 
-  DALI_TEST_CHECK( gInputStyleChangedCallbackCalled );
-  if( gInputStyleChangedCallbackCalled )
-  {
-    DALI_TEST_EQUALS( static_cast<unsigned int>( gInputStyleMask ),
-                      static_cast<unsigned int>( TextField::InputStyle::COLOR ),
-                      TEST_LOCATION );
+  placeholderFontstyleMap.Clear();
+  placeholderMapSet[ Text::PlaceHolder::Property::FONT_STYLE ] = placeholderFontstyleMap;
 
-    const Vector4 color = field.GetProperty( TextField::Property::INPUT_COLOR ).Get<Vector4>();
-    DALI_TEST_EQUALS( color, Color::BLACK, TEST_LOCATION );
-  }
-  DALI_TEST_CHECK( inputStyleChangedSignal );
+  field.SetProperty( TextField::Property::PLACEHOLDER, placeholderMapSet );
+  placeholderMapGet = field.GetProperty<Property::Map>( TextField::Property::PLACEHOLDER );
+  DALI_TEST_EQUALS( placeholderMapGet.Count(), placeholderMapSet.Count(), TEST_LOCATION );
+  DALI_TEST_EQUALS( DaliTestCheckMaps( placeholderMapGet, placeholderMapSet ), true, TEST_LOCATION );
 
-  gInputStyleChangedCallbackCalled = false;
-  gInputStyleMask = TextField::InputStyle::NONE;
-  inputStyleChangedSignal = false;
+  END_TEST;
+}
 
-  field.SetProperty( TextField::Property::INPUT_COLOR, Color::YELLOW );
+int UtcDaliTextFieldPlaceholderCoverage(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline("UtcDaliTextFieldPlaceholderCoverage");
+
+  // mPlaceholderFont is created only once, so create a new control for coverage.
+  TextField fieldForCoverage = TextField::New();
+  DALI_TEST_CHECK(fieldForCoverage);
+  application.GetScene().Add(fieldForCoverage);
+
+  // for SetPlaceholderFontFamily() coverage.
+  Property::Map fontFamilyMap;
+  fontFamilyMap[Text::PlaceHolder::Property::FONT_FAMILY] = "Arial";
+  fieldForCoverage.SetProperty(TextField::Property::PLACEHOLDER, fontFamilyMap);
+
+  // mPlaceholderFont is created only once, so create a new control for coverage.
+  fieldForCoverage = TextField::New();
+  DALI_TEST_CHECK(fieldForCoverage);
+  application.GetScene().Add(fieldForCoverage);
+
+  // for SetPlaceholderTextFontSize coverage.
+  Property::Map fontSizeMap;
+  fontSizeMap[Text::PlaceHolder::Property::PIXEL_SIZE] = 15.0f;
+  fieldForCoverage.SetProperty(TextField::Property::PLACEHOLDER, fontSizeMap);
+
+  // mPlaceholderFont is created only once, so create a new control for coverage.
+  fieldForCoverage = TextField::New();
+  DALI_TEST_CHECK(fieldForCoverage);
+  application.GetScene().Add(fieldForCoverage);
+
+  // for SetPlaceholderTextFontWeight coverage.
+  Property::Map fontStyleWeightMap;
+  Property::Map fontStyleWeightPropertyMap;
+  fontStyleWeightPropertyMap.Insert("weight", "bold");
+  fontStyleWeightMap[Text::PlaceHolder::Property::FONT_STYLE] = fontStyleWeightPropertyMap;
+  fieldForCoverage.SetProperty(TextField::Property::PLACEHOLDER, fontStyleWeightMap);
+
+  // mPlaceholderFont is created only once, so create a new control for coverage.
+  fieldForCoverage = TextField::New();
+  DALI_TEST_CHECK(fieldForCoverage);
+  application.GetScene().Add(fieldForCoverage);
+
+  // for SetPlaceholderTextFontWidth coverage.
+  Property::Map fontStyleWidthMap;
+  Property::Map fontStyleWidthPropertyMap;
+  fontStyleWidthPropertyMap.Insert("width", "expanded");
+  fontStyleWidthMap[Text::PlaceHolder::Property::FONT_STYLE] = fontStyleWidthPropertyMap;
+  fieldForCoverage.SetProperty(TextField::Property::PLACEHOLDER, fontStyleWidthMap);
+
+  // mPlaceholderFont is created only once, so create a new control for coverage.
+  fieldForCoverage = TextField::New();
+  DALI_TEST_CHECK(fieldForCoverage);
+  application.GetScene().Add(fieldForCoverage);
+
+  // for SetPlaceholderTextFontSlant coverage.
+  Property::Map fontStyleSlantMap;
+  Property::Map fontStyleSlantPropertyMap;
+  fontStyleSlantPropertyMap.Insert("slant", "italic");
+  fontStyleSlantMap[Text::PlaceHolder::Property::FONT_STYLE] = fontStyleSlantPropertyMap;
+  fieldForCoverage.SetProperty(TextField::Property::PLACEHOLDER, fontStyleSlantMap);
 
-  Property::Map fontStyleMapSet;
-  fontStyleMapSet.Insert( "weight", "thin" );
-  fontStyleMapSet.Insert( "width", "condensed" );
-  fontStyleMapSet.Insert( "slant", "italic" );
+  END_TEST;
+}
 
-  field.SetProperty( TextField::Property::INPUT_FONT_STYLE, fontStyleMapSet );
-  field.SetProperty( TextField::Property::INPUT_POINT_SIZE, 20.f );
+int UtcDaliTextFieldSetPaddingProperty(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline("UtcDaliTextFieldSetPaddingProperty\n");
 
-  field.SetProperty( TextField::Property::INPUT_UNDERLINE, "underline" );
-  field.SetProperty( TextField::Property::INPUT_SHADOW, "shadow" );
-  field.SetProperty( TextField::Property::INPUT_EMBOSS, "emboss" );
-  field.SetProperty( TextField::Property::INPUT_OUTLINE, "outline" );
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( 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 );
 
-  // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Executes the idle callbacks added by the text control on the change of input style.
-  application.RunIdles();
-
-  DALI_TEST_CHECK( !gInputStyleChangedCallbackCalled );
-  DALI_TEST_CHECK( !inputStyleChangedSignal );
+  Vector3 originalSize = field.GetNaturalSize();
 
-  // Create a tap event to touch the text field.
-  TestGenerateTap( application, 63.0f, 25.0f, 300 );
+  field.SetProperty( Toolkit::Control::Property::PADDING, Extents( 10, 10, 10, 10 ) );
 
-  // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Executes the idle callbacks added by the text control on the change of input style.
-  application.RunIdles();
+  DALI_TEST_EQUALS( field.GetProperty<Extents>( Toolkit::Control::Property::PADDING ), Extents( 10, 10, 10, 10 ), TEST_LOCATION );
 
-  DALI_TEST_CHECK( gInputStyleChangedCallbackCalled );
-  if( gInputStyleChangedCallbackCalled )
-  {
-    DALI_TEST_EQUALS( static_cast<unsigned int>( gInputStyleMask ),
-                      static_cast<unsigned int>( TextField::InputStyle::COLOR |
-                                                 TextField::InputStyle::POINT_SIZE |
-                                                 TextField::InputStyle::FONT_STYLE |
-                                                 TextField::InputStyle::UNDERLINE |
-                                                 TextField::InputStyle::SHADOW |
-                                                 TextField::InputStyle::EMBOSS |
-                                                 TextField::InputStyle::OUTLINE ),
-                      TEST_LOCATION );
+  Vector3 paddingAddedSize = field.GetNaturalSize();
 
-    const Vector4 color = field.GetProperty( TextField::Property::INPUT_COLOR ).Get<Vector4>();
-    DALI_TEST_EQUALS( color, Color::BLACK, TEST_LOCATION );
-  }
-  DALI_TEST_CHECK( inputStyleChangedSignal );
+  DALI_TEST_EQUALS( originalSize.width + 10 + 10 , paddingAddedSize.width, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+
+  DALI_TEST_EQUALS( originalSize.height + 10 + 10 , paddingAddedSize.height, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
 
   END_TEST;
 }
 
-int utcDaliTextFieldEvent01(void)
+int UtcDaliTextFieldEnableShiftSelectionProperty(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" utcDaliTextFieldEvent01");
-
-  // Creates a tap event. After creating a tap event the text field should
-  // have the focus and add text with key events should be possible.
+  tet_infoline("UtcDaliTextFieldEnableShiftSelectionProperty");
 
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
-
-  application.GetScene().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 );
 
-  // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Avoid a crash when core load gl resources.
-  application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
-
-  // Render and notify
-  application.SendNotification();
-  application.Render();
+  // The default value of ENABLE_SHIFT_SELECTION is 'true'.
+  DALI_TEST_EQUALS( field.GetProperty<bool>( DevelTextField::Property::ENABLE_SHIFT_SELECTION ), true, TEST_LOCATION );
 
-  // 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 ) );
+  // Check the enable shift selection property
+  field.SetProperty( DevelTextField::Property::ENABLE_SHIFT_SELECTION, false );
+  DALI_TEST_EQUALS( field.GetProperty<bool>( DevelTextField::Property::ENABLE_SHIFT_SELECTION ), false, TEST_LOCATION );
 
-  // Render and notify
   application.SendNotification();
   application.Render();
 
-  DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::TEXT ), std::string(""), TEST_LOCATION );
+  END_TEST;
+}
 
-  // Create a tap event to touch the text field.
-  TestGenerateTap( application, 150.0f, 25.0f );
+int UtcDaliTextFieldEnableGrabHandleProperty(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline("UtcDaliTextFieldEnableGrabHandleProperty");
 
-  // Render and notify
-  application.SendNotification();
-  application.Render();
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( 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 );
 
-  // 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 ) );
-  // 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 ) );
+  // The default value of ENABLE_GRAB_HANDLE is 'true'.
+  DALI_TEST_EQUALS( field.GetProperty<bool>( DevelTextField::Property::ENABLE_GRAB_HANDLE ), true, TEST_LOCATION );
+
+  // Check the enable grab handle property
+  field.SetProperty( DevelTextField::Property::ENABLE_GRAB_HANDLE, false );
+  DALI_TEST_EQUALS( field.GetProperty<bool>( DevelTextField::Property::ENABLE_GRAB_HANDLE ), false, TEST_LOCATION );
 
-  // Render and notify
   application.SendNotification();
   application.Render();
 
-  DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::TEXT ), std::string("aa"), TEST_LOCATION );
-
-  // Create a second text field and send key events to it.
-  TextField field2 = TextField::New();
+  END_TEST;
+}
 
-  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 ));
+int UtcDaliTextFieldMatchSystemLanguageDirectionProperty(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline("UtcDaliTextFieldMatchSystemLanguageDirectionProperty");
 
-  application.GetScene().Add( field2 );
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( 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 );
 
-  // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Create a tap event on the second text field.
-  TestGenerateTap( application, 150.0f, 125.0f );
-
-  // Render and notify
-  application.SendNotification();
-  application.Render();
+  // The default value of MATCH_SYSTEM_LANGUAGE_DIRECTION is 'true'.
+  DALI_TEST_EQUALS( field.GetProperty<bool>( DevelTextField::Property::MATCH_SYSTEM_LANGUAGE_DIRECTION ), true, TEST_LOCATION );
 
-  // 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 ) );
+  // Check the match system language direction property
+  field.SetProperty( DevelTextField::Property::MATCH_SYSTEM_LANGUAGE_DIRECTION, false );
+  DALI_TEST_EQUALS( field.GetProperty<bool>( DevelTextField::Property::MATCH_SYSTEM_LANGUAGE_DIRECTION ), false, TEST_LOCATION );
 
-  // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Check the text has been added to the second text field.
-  DALI_TEST_EQUALS( field2.GetProperty<std::string>( TextField::Property::TEXT ), std::string("aa"), TEST_LOCATION );
-
   END_TEST;
 }
 
-int utcDaliTextFieldEvent02(void)
+int utcDaliTextFieldLayoutDirectionCoverage(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" utcDaliTextFieldEvent02");
-
-  // Checks if the right number of actors are created.
+  tet_infoline(" utcDaliTextFieldLayoutDirectionCoverage");
 
+  // Creates a tap event. After creating a tap event the text field should
+  // have the focus and add text with key events should be possible.
   TextField field = TextField::New();
-  field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
   DALI_TEST_CHECK( field );
-  LoadMarkerImages(application, field);
 
   application.GetScene().Add( field );
 
@@ -1678,1113 +3480,1144 @@ int utcDaliTextFieldEvent02(void)
   application.SendNotification();
   application.Render();
 
-  // Check there are the expected number of children ( stencil ).
-  DALI_TEST_EQUALS( field.GetChildCount(), 1u, TEST_LOCATION );
-
-  Actor stencil = field.GetChildAt( 0u );
-  DALI_TEST_EQUALS( stencil.GetChildCount(), 0u, TEST_LOCATION );
+  // init direction for coverage
+  // Set horizontal alignment END
+  field.SetProperty( TextField::Property::HORIZONTAL_ALIGNMENT, "END");
 
   // Create a tap event to touch the text field.
-  TestGenerateTap( application, 150.0f, 25.0f, 300 );
+  TestGenerateTap( application, 150.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
-  Actor layer = field.GetChildAt( 1u );
-  DALI_TEST_EQUALS( layer.GetChildCount(), 1u, TEST_LOCATION ); // The cursor.
-  DALI_TEST_EQUALS( stencil.GetChildCount(), 0u, TEST_LOCATION );
+  // Set MATCH_SYSTEM_LANGUAGE_DIRECTION to true to use the layout direction.
+  field.SetProperty( DevelTextField::Property::MATCH_SYSTEM_LANGUAGE_DIRECTION, true );
+  field.SetProperty( Actor::Property::LAYOUT_DIRECTION, LayoutDirection::RIGHT_TO_LEFT );
 
-  // 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 ) );
+  // Set horizontal alignment BEGIN
+  field.SetProperty( TextField::Property::HORIZONTAL_ALIGNMENT, "BEGIN");
+
+  // Create a tap event to touch the text field.
+  TestGenerateTap( application, 150.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Checks the cursor and the renderer have been created.
-  DALI_TEST_EQUALS( layer.GetChildCount(), 1u, TEST_LOCATION ); // The cursor.
-  DALI_TEST_EQUALS( stencil.GetChildCount(), 1u, TEST_LOCATION ); // The renderer
-
-  Control cursor = Control::DownCast( layer.GetChildAt( 0u ) );
-  DALI_TEST_CHECK( cursor );
-
-  // The offscreen root actor has a container with all the actors which contain the text renderers.
-  Actor container = stencil.GetChildAt( 0u );
-  for( unsigned int index = 0; index < container.GetChildCount(); ++index )
-  {
-    Renderer renderer = container.GetChildAt( index ).GetRendererAt( 0u );
-    DALI_TEST_CHECK( renderer );
-  }
+  // Set horizontal alignment CENTER
+  field.SetProperty( TextField::Property::HORIZONTAL_ALIGNMENT, "CENTER");
 
-  // Move the cursor and check the position changes.
-  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 ) );
+  // Create a tap event to touch the text field.
+  TestGenerateTap( application, 150.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
-  Vector3 position2 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
-  DALI_TEST_CHECK( position2.x < position1.x );
+  // Set horizontal alignment END
+  field.SetProperty( TextField::Property::HORIZONTAL_ALIGNMENT, "END");
 
-  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  // Create a tap event to touch the text field.
+  TestGenerateTap( application, 150.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
-  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 ) );
+  // 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 ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
-  Vector3 position4 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
+  DALI_TEST_EQUALS( false, field.HasKeyInputFocus(), TEST_LOCATION );
 
-  // Send some taps and check the cursor positions.
+  END_TEST;
+}
 
-  // Try to tap at the beginning.
-  TestGenerateTap( application, 1.0f, 25.0f, 900 );
+int UtcDaliTextFieldGetInputMethodContext(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline("UtcDaliTextFieldGetInputMethodContext");
 
-  // Render and notify
-  application.SendNotification();
-  application.Render();
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( DevelTextField::GetInputMethodContext( field ) );
 
-  // Cursor position should be the same than position1.
-  Vector3 position5 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
+  END_TEST;
+}
 
-  DALI_TEST_EQUALS( position4, position5, TEST_LOCATION ); // Should be in the same position2.
+int UtcDaliTextFieldSelectWholeText(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliTextFieldSelectWholeText ");
 
-  // Tap away from the start position.
-  TestGenerateTap( application, 16.0f, 25.0f, 1500 );
+  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 );
 
-  // Render and notify
   application.SendNotification();
   application.Render();
 
-  Vector3 position6 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
-
-  DALI_TEST_CHECK( position6.x > position5.x );
+  DALI_TEST_EQUALS( 1u, textField.GetChildCount(), TEST_LOCATION );
 
-  // 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 ) );
-  field.SetProperty( TextField::Property::TEXT, "" );
+  DevelTextField::SelectWholeText( textField );
 
-  // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Cursor position should be the same than position2.
-  Vector3 position7 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
+  // Nothing should have been selected. The number of children is still 1
+  DALI_TEST_EQUALS( 1u, textField.GetChildCount(), TEST_LOCATION );
 
-  DALI_TEST_EQUALS( position4, position7, TEST_LOCATION );// Should be in the same position2.
+  textField.SetProperty( TextField::Property::TEXT, "Hello world" );
 
-  // Should not be a renderer.
-  DALI_TEST_EQUALS( stencil.GetChildCount(), 0u, TEST_LOCATION );
+  application.SendNotification();
+  application.Render();
 
-  // Chanege exceed policy (EXCEED_POLICY_ORIGINAL doesn't use stencil )
-  field.SetProperty( TextField::Property::TEXT, "This is a long text for the size of the text-field." );
-  field.SetProperty( TextField::Property::EXCEED_POLICY, Dali::Toolkit::TextField::EXCEED_POLICY_ORIGINAL );
+  DevelTextField::SelectWholeText( textField );
 
   application.SendNotification();
   application.Render();
 
-  // There are renderer and decorator layer
-  DALI_TEST_EQUALS( field.GetChildCount(), 2u, TEST_LOCATION );
+  // 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 utcDaliTextFieldEvent03(void)
+int UtcDaliTextFieldSelectText(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" utcDaliTextFieldEvent03");
-
-  // Checks if the highlight actor is created.
+  tet_infoline(" UtcDaliTextFieldSelectText ");
 
-  TextField field = TextField::New();
-  DALI_TEST_CHECK( field );
+  TextField textField = TextField::New();
 
-  application.GetScene().Add( field );
+  application.GetScene().Add( textField );
 
-  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.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 );
+  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 );
-  LoadMarkerImages(application, field);
 
-  // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Tap first to get the focus.
-  TestGenerateTap( application, 3.0f, 25.0f );
+  DevelTextField::SelectText( textField, 0, 5 );
 
-  // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Double tap to select a word.
-  TestGenerateTap( application, 3.0f, 25.0f );
+  // Nothing is selected
+  std::string selectedText = textField.GetProperty( DevelTextField::Property::SELECTED_TEXT ).Get<std::string>();
+  DALI_TEST_EQUALS( "", selectedText, TEST_LOCATION );
+
+  textField.SetProperty( TextField::Property::TEXT, "Hello world" );
 
-  // Render and notify
   application.SendNotification();
   application.Render();
 
-  // The offscreen root actor should have two actors: the renderer and the highlight actor.
-  Actor stencil = field.GetChildAt( 0u );
+  // Hello is selected
+  DevelTextField::SelectText( textField, 0, 5 );
 
-  // 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 );
+  application.SendNotification();
+  application.Render();
 
-  // The offscreen root actor has a container with all the actors which contain the text renderers.
-  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 );
-  }
+  selectedText = textField.GetProperty( DevelTextField::Property::SELECTED_TEXT ).Get<std::string>();
+  DALI_TEST_EQUALS( "Hello", selectedText, TEST_LOCATION );
+
+  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::SELECTED_TEXT_START ).Get<int>(), 0, TEST_LOCATION );
+  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::SELECTED_TEXT_END ).Get<int>(), 5, TEST_LOCATION );
+
+  // world is selected
+  DevelTextField::SelectText( textField, 6, 11 );
+
+  application.SendNotification();
+  application.Render();
+
+  selectedText = textField.GetProperty( DevelTextField::Property::SELECTED_TEXT ).Get<std::string>();
+  DALI_TEST_EQUALS( "world", selectedText, TEST_LOCATION );
+
+  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::SELECTED_TEXT_START ).Get<int>(), 6, TEST_LOCATION );
+  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::SELECTED_TEXT_END ).Get<int>(), 11, TEST_LOCATION );
 
   END_TEST;
 }
 
-int utcDaliTextFieldEvent04(void)
+int UtcDaliTextFieldSelectNone(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" utcDaliTextFieldEvent04");
+  tet_infoline(" UtcDaliTextFieldSelectWholeText ");
 
-  // Checks if the highlight actor is created.
+  TextField textField = TextField::New();
 
-  TextField field = TextField::New();
-  DALI_TEST_CHECK( field );
-  application.GetScene().Add( field );
-  LoadMarkerImages(application, field);
-  // Render and notify
-  application.SendNotification();
-  application.Render();
+  application.GetScene().Add( textField );
 
-  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.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 );
+  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 );
-  // Render and notify
+
   application.SendNotification();
   application.Render();
 
-  // Create a tap event to touch the text field.
-  TestGenerateTap( application, 150.0f, 25.0f );
-  // Render and notify
+  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 );
 
-  // Tap first to get the focus.
-  TestGenerateTap( application, 1.0f, 25.0f );
+  DevelTextField::SelectWholeText( textField );
 
-  // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Double tap to select a word.
-  TestGenerateTap( application, 1.0f, 25.0f );
+  // 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 );
 
-  // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Tap grab handle
-  TestGenerateTap( application, 0.0f, 40.0f );
+  // Nothing is selected
+  selectedText = textField.GetProperty( DevelTextField::Property::SELECTED_TEXT ).Get<std::string>();
+  DALI_TEST_EQUALS( "", selectedText, TEST_LOCATION );
+
   END_TEST;
 }
 
-int utcDaliTextFieldEvent05(void)
+int UtcDaliTextFieldSelectRange(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" utcDaliTextFieldEvent05");
+  tet_infoline(" UtcDaliTextFieldSelectRange ");
 
-  // Checks dragging of cursor/grab handle
+  TextField textField = TextField::New();
 
-  TextField field = TextField::New();
-  DALI_TEST_CHECK( field );
-  application.GetScene().Add( field );
-  LoadMarkerImages(application, field);
-  // Render and notify
-  application.SendNotification();
-  application.Render();
+  application.GetScene().Add( textField );
 
-  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.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 );
+  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 );
-  // Render and notify
-  application.SendNotification();
-  application.Render();
 
-  // Create a tap event to touch the text field.
-  TestGenerateTap( application, 150.0f, 25.0f );
-  // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Tap first to get the focus.
-  TestGenerateTap( application, 1.0f, 25.0f );
+  textField.SetProperty( TextField::Property::TEXT, "Hello world" );
 
-  // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Double tap to select a word.
-  TestGenerateTap( application, 1.0f, 25.0f );
+  textField.SetProperty( DevelTextField::Property::SELECTED_TEXT_START , 0);
+  textField.SetProperty( DevelTextField::Property::SELECTED_TEXT_END , 5);
 
-  // Render and notify
-  application.SendNotification();
-  application.Render();
+  // Hello is selected
+  std::string selectedText = textField.GetProperty( DevelTextField::Property::SELECTED_TEXT ).Get<std::string>();
+  DALI_TEST_EQUALS( "Hello", selectedText, TEST_LOCATION );
+
+  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::SELECTED_TEXT_START ).Get<int>(), 0, TEST_LOCATION );
+  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::SELECTED_TEXT_END ).Get<int>(), 5, TEST_LOCATION );
+
+  textField.SetProperty( DevelTextField::Property::SELECTED_TEXT_START , 6);
+  textField.SetProperty( DevelTextField::Property::SELECTED_TEXT_END , 11);
+
+  // world is selected
+  selectedText = textField.GetProperty( DevelTextField::Property::SELECTED_TEXT ).Get<std::string>();
+  DALI_TEST_EQUALS( "world", selectedText, TEST_LOCATION );
+
+  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::SELECTED_TEXT_START ).Get<int>(), 6, TEST_LOCATION );
+  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::SELECTED_TEXT_END ).Get<int>(), 11, TEST_LOCATION );
 
-  Actor stencil = field.GetChildAt( 1u );
   END_TEST;
 }
 
-int utcDaliTextFieldEvent06(void)
+int UtcDaliTextFieldEnableEditing(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" utcDaliTextFieldEvent06");
+  tet_infoline(" UtcDaliTextFieldEnableEditing ");
 
-  // Checks Longpress when in edit mode
+  TextField textField = TextField::New();
 
-  TextField field = TextField::New();
-  DALI_TEST_CHECK( field );
-  application.GetScene().Add( field );
-  LoadMarkerImages(application, field);
-  // Render and notify
-  application.SendNotification();
-  application.Render();
+  application.GetScene().Add( textField );
 
-  field.SetProperty( TextField::Property::TEXT, "Thisisalongtextforthesizeofthetextfield." );
-  field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
-  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 );
+  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 );
-  // Render and notify
-  application.SendNotification();
-  application.Render();
 
-  // Create a tap event to touch the text field.
-  TestGenerateTap( application, 150.0f, 25.0f );
-  // Render and notify
   application.SendNotification();
   application.Render();
 
-
-  // Tap first to get the focus.
-  TestGenerateTap( application, 1.0f, 25.0f );
+  textField.SetKeyInputFocus();
+  textField.SetProperty( DevelTextField::Property::ENABLE_EDITING, false );
+  application.ProcessEvent( GenerateKey( "D", "", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::DOWN, "D", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Long Press
-  TestGenerateLongPress(application, 1.0f, 25.0f);
+  DALI_TEST_EQUALS( textField.GetProperty( TextField::Property::TEXT ).Get<std::string>(), "", TEST_LOCATION );
+  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::ENABLE_EDITING ).Get<bool>(), false, TEST_LOCATION );
+
+
+  textField.SetKeyInputFocus();
+  textField.SetProperty( DevelTextField::Property::ENABLE_EDITING, true );
+  application.ProcessEvent( GenerateKey( "D", "", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::DOWN, "D", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
+  DALI_TEST_EQUALS( textField.GetProperty( TextField::Property::TEXT ).Get<std::string>(), "D", TEST_LOCATION );
+  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::ENABLE_EDITING ).Get<bool>(), true, TEST_LOCATION );
+
   END_TEST;
 }
 
-int utcDaliTextFieldEvent07(void)
+int UtcDaliToolkitTextFieldFontSizeScale(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" utcDaliTextFieldEvent07");
+  tet_infoline(" UtcDaliToolkitTextFieldFontSizeScale");
 
-  // Checks Longpress to start edit mode
+  TextField textField = TextField::New();
+  textField.SetProperty( TextField::Property::POINT_SIZE, 30.f );
+  textField.SetProperty( TextField::Property::TEXT, "Test" );
+  Vector3 nonScaledSize = textField.GetNaturalSize();
 
-  TextField field = TextField::New();
-  DALI_TEST_CHECK( field );
-  application.GetScene().Add( field );
-  LoadMarkerImages(application, field);
-  // Render and notify
-  application.SendNotification();
-  application.Render();
+  TextField textFieldScaled = TextField::New();
+  textFieldScaled.SetProperty( TextField::Property::POINT_SIZE, 15.f );
+  textFieldScaled.SetProperty( Toolkit::DevelTextField::Property::FONT_SIZE_SCALE, 2.f );
+  textFieldScaled.SetProperty( TextField::Property::TEXT, "Test" );
+  Vector3 scaledSize = textFieldScaled.GetNaturalSize();
 
-  field.SetProperty( TextField::Property::TEXT, "Thisisalongtextforthesizeofthetextfield." );
-  field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
-  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 );
+  DALI_TEST_EQUALS( nonScaledSize, scaledSize, TEST_LOCATION );
 
-  // Avoid a crash when core load gl resources.
-  application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
-  // Render and notify
-  application.SendNotification();
-  application.Render();
+  textField.SetProperty( TextField::Property::PIXEL_SIZE, 30.f );
+  textField.SetProperty( TextField::Property::TEXT, "Test" );
+  nonScaledSize = textField.GetNaturalSize();
 
-  // Long Press
-  TestGenerateLongPress(application, 1.0f, 25.0f);
+  textFieldScaled.SetProperty( TextField::Property::PIXEL_SIZE, 15.f );
+  textFieldScaled.SetProperty( Toolkit::DevelTextField::Property::FONT_SIZE_SCALE, 2.f );
+  textFieldScaled.SetProperty( TextField::Property::TEXT, "Test" );
+  scaledSize = textFieldScaled.GetNaturalSize();
 
-  // Render and notify
-  application.SendNotification();
-  application.Render();
+  DALI_TEST_EQUALS( nonScaledSize, scaledSize, TEST_LOCATION );
 
   END_TEST;
 }
 
-int utcDaliTextFieldEvent08(void)
+int UtcDaliTextFieldPrimaryCursorPosition(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" utcDaliTextFieldEvent08");
-
-  Dali::Clipboard clipboard = Clipboard::Get();
-  clipboard.SetItem("testTextFieldEvent");
+  tet_infoline(" UtcDaliTextFieldPrimaryCursorPosition ");
 
-  // Checks Longpress when only place holder text
+  TextField textField = TextField::New();
 
-  TextField field = TextField::New();
-  DALI_TEST_CHECK( field );
-  application.GetScene().Add( field );
-  LoadMarkerImages(application, field);
-  // Render and notify
-  application.SendNotification();
-  application.Render();
+  application.GetScene().Add( textField );
 
-  field.SetProperty( TextField::Property::PLACEHOLDER_TEXT, "Setting Placeholder Text" );
-  field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
-  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 );
+  textField.SetProperty( TextField::Property::TEXT, "ABCEF");
+  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 );
-  // Render and notify
+
+  textField.SetProperty( DevelTextField::Property::PRIMARY_CURSOR_POSITION, 3);
   application.SendNotification();
   application.Render();
+  textField.SetKeyInputFocus();
 
-  // Long Press
-  TestGenerateLongPress( application, 1.0f, 25.0f, 20 );
+  application.ProcessEvent( GenerateKey( "D", "", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::DOWN, "D", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
-  Wait(application, 500);
+  DALI_TEST_EQUALS( textField.GetProperty( TextField::Property::TEXT ).Get<std::string>(), "ABCDEF", TEST_LOCATION );
+  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::PRIMARY_CURSOR_POSITION ).Get<int>(), 4, TEST_LOCATION );
 
-  TestEndLongPress( application, 1.0f, 25.0f, 520 );
+  END_TEST;
+}
 
-  // Long Press
-  TestGenerateLongPress( application, 1.0f, 25.0f, 600 );
+// test max length when set after setting long text
+int utcDaliTextFieldMaxCharactersReachedAfterSetText(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextFieldMaxCharactersReachedAfterSetText");
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( field );
 
-  // Render and notify
-  application.Render();
+  application.GetScene().Add( field );
 
-  Wait(application, 500);
+  field.SetProperty(TextField::Property::TEXT, "123456789");
 
-  Integration::Scene stage = application.GetScene();
-  Layer layer = stage.GetRootLayer();
-  Actor actor = layer.FindChildByName("optionPaste");
+  const int maxNumberOfCharacters = 3;
+  field.SetProperty( TextField::Property::MAX_LENGTH, maxNumberOfCharacters );
 
-  if (actor)
-  {
-    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);
+  field.SetKeyInputFocus();
 
-    Dali::Integration::TouchEvent event;
-    event = Dali::Integration::TouchEvent();
-    event.AddPoint( GetPointDownInside( position ) );
-    application.ProcessEvent( event );
+  // connect to the text max lengh reached signal.
+  ConnectionTracker* testTracker = new ConnectionTracker();
+  bool maxLengthReachedSignal = false;
+  field.ConnectSignal( testTracker, "maxLengthReached",   CallbackFunctor(&maxLengthReachedSignal) );
 
-    event = Dali::Integration::TouchEvent();
-    event.AddPoint( GetPointUpInside( position ) );
-    application.ProcessEvent( event );
-  }
-  DALI_TEST_EQUALS( field.GetProperty<std::string>( TextEditor::Property::TEXT ), std::string("testTextFieldEvent"), TEST_LOCATION );
+  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( maxLengthReachedSignal );
+
+  DALI_TEST_EQUALS( field.GetProperty( TextField::Property::TEXT ).Get<std::string>(), "123456789", TEST_LOCATION );
 
   END_TEST;
 }
 
-int utcDaliTextFieldEvent09(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" utcDaliTextFieldEvent09");
-
-  TextField field = TextField::New();
-  DALI_TEST_CHECK( field );
-  application.GetScene().Add( field );
-  LoadMarkerImages(application, field);
-  // Render and notify
-  application.SendNotification();
-  application.Render();
 
-  field.SetProperty( TextField::Property::TEXT, "Hello" );
-  field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
-  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 );
+int UtcDaliTextFieldAtlasLimitationIsEnabledForLargeFontPointSize(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliTextFieldAtlasLimitationIsEnabledForLargeFontPointSize ");
 
-  // Create a tap event to touch the text field.
-  TestGenerateTap( application, 150.0f, 25.0f );
-  application.SendNotification();
-  application.Render();
+  // +2: First one to handle the equal case. Second one to handle odd to even case of GetNaturalSize
+  const uint32_t lessThanWidth = TextAbstraction::FontClient::MAX_TEXT_ATLAS_WIDTH - TextAbstraction::FontClient::PADDING_TEXT_ATLAS_BLOCK + 2;
+  const uint32_t lessThanHeight = TextAbstraction::FontClient::MAX_TEXT_ATLAS_HEIGHT - TextAbstraction::FontClient::PADDING_TEXT_ATLAS_BLOCK + 2;
 
-  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.SendNotification();
-  application.Render();
+  // Create a text field
+  TextField textField = TextField::New();
+
+  //Set size to avoid automatic eliding
+  textField.SetProperty( Actor::Property::SIZE, Vector2(1025, 1025));
+  //Set very large font-size using point-size
+  textField.SetProperty( TextField::Property::POINT_SIZE, 1000) ;
+  //Specify font-family
+  textField.SetProperty( TextField::Property::FONT_FAMILY, "DejaVu Sans");
+  //Set text to check if appear or not
+  textField.SetProperty( TextField::Property::TEXT, "A");
+
+  application.GetScene().Add( textField );
 
-  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.SendNotification();
   application.Render();
+  //Use GetNaturalSize to verify that size of block does not exceed Atlas size
+  Vector3 naturalSize = textField.GetNaturalSize();
 
-  map[ HiddenInput::Property::MODE ] = HiddenInput::Mode::HIDE_COUNT;
-  map[ HiddenInput::Property::SUBSTITUTE_COUNT ] = 2;
-  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.SendNotification();
-    application.Render();
-  }
+  DALI_TEST_GREATER( lessThanWidth, static_cast<uint32_t>(naturalSize.width), TEST_LOCATION );
+  DALI_TEST_GREATER( lessThanHeight, static_cast<uint32_t>(naturalSize.height), TEST_LOCATION );
 
-  map[ HiddenInput::Property::MODE ] = HiddenInput::Mode::SHOW_COUNT;
-  map[ HiddenInput::Property::SUBSTITUTE_COUNT ] = 2;
-  field.SetProperty( TextField::Property::HIDDEN_INPUT_SETTINGS, map );
-  for( unsigned int index = 0u; index < 5u; ++index )
+  END_TEST;
+}
+
+int UtcDaliTextFieldAtlasLimitationIsEnabledPerformanceCases(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliTextFieldAtlasLimitationIsEnabledPerformanceCases ");
+
+  // +2: First one to handle the equal case. Second one to handle odd to even case of GetNaturalSize
+  const uint32_t lessThanWidth = TextAbstraction::FontClient::MAX_TEXT_ATLAS_WIDTH - TextAbstraction::FontClient::PADDING_TEXT_ATLAS_BLOCK + 2;
+  const uint32_t lessThanHeight = TextAbstraction::FontClient::MAX_TEXT_ATLAS_HEIGHT - TextAbstraction::FontClient::PADDING_TEXT_ATLAS_BLOCK + 2;
+
+  Vector3 naturalSize; //Use GetNaturalSize to verify that size of block does not exceed Atlas size
+  // Create a text editor
+  TextField textField = TextField::New();
+
+  //Set size to avoid automatic eliding
+  textField.SetProperty( Actor::Property::SIZE, Vector2(1025, 1025));
+  textField.SetProperty( TextField::Property::FONT_FAMILY, "DejaVu Sans");
+  textField.SetProperty( TextField::Property::TEXT, "A");
+
+  const int numberOfCases = 6;
+  int arrayCases[numberOfCases] = {323, 326, 330, 600, 1630, 2500};
+
+  for (int index=0; index < numberOfCases; index++)
   {
-    application.ProcessEvent( GenerateKey( "d", "", "d", 0, 0, 0, Integration::KeyEvent::DOWN, "d", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+    tet_printf(" UtcDaliTextFieldAtlasLimitationIsEnabledPerformanceCases point-size= %d \n", arrayCases[index]);
+    textField.SetProperty( TextField::Property::POINT_SIZE, arrayCases[index]) ;
+    application.GetScene().Add( textField );
     application.SendNotification();
     application.Render();
+    naturalSize = textField.GetNaturalSize();
+    DALI_TEST_GREATER( lessThanWidth, static_cast<uint32_t>(naturalSize.width), TEST_LOCATION );
+    DALI_TEST_GREATER( lessThanHeight, static_cast<uint32_t>(naturalSize.height), TEST_LOCATION );
+
   }
 
-  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.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.SendNotification();
-  application.Render();
+  END_TEST;
+}
 
-  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.SendNotification();
-  application.Render();
+int UtcDaliToolkitTextFieldEllipsisPositionProperty(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextFieldEllipsisPositionProperty ");
+  TextField textField = TextField::New();
+
+  tet_infoline(" UtcDaliToolkitTextFieldEllipsisPositionProperty - Default is END");
+  DALI_TEST_EQUALS( textField.GetProperty< int >( DevelTextField::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::END ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextFieldEllipsisPositionProperty - Change to START");
+  textField.SetProperty(DevelTextField::Property::ELLIPSIS_POSITION, DevelText::EllipsisPosition::START);
+  DALI_TEST_EQUALS( textField.GetProperty< int >( DevelTextField::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::START ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextFieldEllipsisPositionProperty - Change to MIDDLE");
+  textField.SetProperty(DevelTextField::Property::ELLIPSIS_POSITION, DevelText::EllipsisPosition::MIDDLE);
+  DALI_TEST_EQUALS( textField.GetProperty< int >( DevelTextField::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::MIDDLE ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextFieldEllipsisPositionProperty - Change to END");
+  textField.SetProperty(DevelTextField::Property::ELLIPSIS_POSITION, DevelText::EllipsisPosition::END);
+  DALI_TEST_EQUALS( textField.GetProperty< int >( DevelTextField::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::END ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextFieldEllipsisPositionProperty - Change to START using integer");
+  textField.SetProperty(DevelTextField::Property::ELLIPSIS_POSITION, 1);
+  DALI_TEST_EQUALS( textField.GetProperty< int >( DevelTextField::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::START ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextFieldEllipsisPositionProperty - Change to MIDDLE using integer");
+  textField.SetProperty(DevelTextField::Property::ELLIPSIS_POSITION, 2);
+  DALI_TEST_EQUALS( textField.GetProperty< int >( DevelTextField::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::MIDDLE ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextFieldEllipsisPositionProperty - Change to END using integer");
+  textField.SetProperty(DevelTextField::Property::ELLIPSIS_POSITION, 0);
+  DALI_TEST_EQUALS( textField.GetProperty< int >( DevelTextField::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::END ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to START using string - uppercase");
+  textField.SetProperty(DevelTextField::Property::ELLIPSIS_POSITION, "START");
+  DALI_TEST_EQUALS( textField.GetProperty< int >( DevelTextField::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::START ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to MIDDLE using string - uppercase");
+  textField.SetProperty(DevelTextField::Property::ELLIPSIS_POSITION, "MIDDLE");
+  DALI_TEST_EQUALS( textField.GetProperty< int >( DevelTextField::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::MIDDLE ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to END using string - uppercase");
+  textField.SetProperty(DevelTextField::Property::ELLIPSIS_POSITION, "END");
+  DALI_TEST_EQUALS( textField.GetProperty< int >( DevelTextField::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::END ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to START using string - lowercase");
+  textField.SetProperty(DevelTextField::Property::ELLIPSIS_POSITION, "start");
+  DALI_TEST_EQUALS( textField.GetProperty< int >( DevelTextField::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::START ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to MIDDLE using string - lowercase");
+  textField.SetProperty(DevelTextField::Property::ELLIPSIS_POSITION, "middle");
+  DALI_TEST_EQUALS( textField.GetProperty< int >( DevelTextField::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::MIDDLE ), TEST_LOCATION );
+
+  tet_infoline(" UtcDaliToolkitTextlabelEllipsisPositionProperty - Change to END using string - lowercase");
+  textField.SetProperty(DevelTextField::Property::ELLIPSIS_POSITION, "end");
+  DALI_TEST_EQUALS( textField.GetProperty< int >( DevelTextField::Property::ELLIPSIS_POSITION ), static_cast< int >( Toolkit::DevelText::EllipsisPosition::END ), TEST_LOCATION );
 
-  Property::Map mapGet;
-  mapGet = field.GetProperty<Property::Map>( TextField::Property::HIDDEN_INPUT_SETTINGS );
-  DALI_TEST_EQUALS( map.Count(), mapGet.Count(), TEST_LOCATION );
-  DALI_TEST_EQUALS( DaliTestCheckMaps( map, mapGet ), true, TEST_LOCATION );
   END_TEST;
 }
 
-
-int utcDaliTextFieldStyleWhilstSelected(void)
+int UtcDaliTextFieldCopyText(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" utcDaliTextFieldStyleWhilstSelected");
+  tet_infoline(" UtcDaliTextFieldCopyText ");
 
-  // Change font and styles whilst text is selected whilst word selected
+  TextField textField = TextField::New();
 
-  TextField field = TextField::New();
-  DALI_TEST_CHECK( field );
-  application.GetScene().Add( field );
-  LoadMarkerImages(application, field);
-  // Render and notify
-  application.SendNotification();
-  application.Render();
+  std::string selectedText = "";
+  std::string copiedText = "";
 
-  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.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( 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 );
-  // Render and notify
+
   application.SendNotification();
   application.Render();
 
-  // Create a tap event to touch the text field.
-  TestGenerateTap( application, 150.0f, 25.0f );
-  // Render and notify
+  textField.SetProperty( TextField::Property::TEXT, "Hello world" );
+
   application.SendNotification();
   application.Render();
 
+  // Hello is selected
+  DevelTextField::SelectText( textField, 0, 5 );
 
-  // Tap first to get the focus.
-  TestGenerateTap( application, 1.0f, 25.0f );
-
-  // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Double tap to select a word.
-  TestGenerateTap( application, 1.0f, 25.0f );
+  selectedText = textField.GetProperty( DevelTextField::Property::SELECTED_TEXT ).Get<std::string>();
+  DALI_TEST_EQUALS( "Hello", selectedText, TEST_LOCATION );
+
+  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::SELECTED_TEXT_START ).Get<int>(), 0, TEST_LOCATION );
+  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::SELECTED_TEXT_END ).Get<int>(), 5, TEST_LOCATION );
+
+  // Hello is copied
+  copiedText = DevelTextField::CopyText( textField );
+  DALI_TEST_EQUALS( "Hello", copiedText, TEST_LOCATION );
+
+  // world is selected
+  DevelTextField::SelectText( textField, 6, 11 );
 
-  // Render and notify
   application.SendNotification();
   application.Render();
 
-  field.SetProperty( TextField::Property::INPUT_FONT_FAMILY, "Setting input font family" );
-  DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::INPUT_FONT_FAMILY ), "Setting input font family", TEST_LOCATION );
+  selectedText = textField.GetProperty( DevelTextField::Property::SELECTED_TEXT ).Get<std::string>();
+  DALI_TEST_EQUALS( "world", selectedText, TEST_LOCATION );
 
-  Property::Map fontStyleMapSet;
-  Property::Map fontStyleMapGet;
+  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::SELECTED_TEXT_START ).Get<int>(), 6, TEST_LOCATION );
+  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::SELECTED_TEXT_END ).Get<int>(), 11, TEST_LOCATION );
 
-  fontStyleMapSet.Insert( "weight", "bold" );
-  fontStyleMapSet.Insert( "slant", "italic" );
-  field.SetProperty( TextField::Property::INPUT_FONT_STYLE, fontStyleMapSet );
+  // world is copied
+  copiedText = DevelTextField::CopyText( textField );
+  DALI_TEST_EQUALS( "world", copiedText, TEST_LOCATION );
 
-  fontStyleMapGet = field.GetProperty<Property::Map>( TextField::Property::INPUT_FONT_STYLE );
-  DALI_TEST_EQUALS( fontStyleMapGet.Count(), fontStyleMapSet.Count(), TEST_LOCATION );
-  DALI_TEST_EQUALS( DaliTestCheckMaps( fontStyleMapGet, fontStyleMapSet ), true, TEST_LOCATION );
+  // "lo wo" is selected
+  DevelTextField::SelectText( textField, 3, 8 );
 
-  fontStyleMapSet.Clear();
-  fontStyleMapSet.Insert( "width", "expanded" );
-  fontStyleMapSet.Insert( "slant", "italic" );
-  field.SetProperty( TextField::Property::INPUT_FONT_STYLE, fontStyleMapSet );
+  application.SendNotification();
+  application.Render();
 
-  fontStyleMapGet = field.GetProperty<Property::Map>( TextField::Property::INPUT_FONT_STYLE );
-  DALI_TEST_EQUALS( fontStyleMapGet.Count(), fontStyleMapSet.Count(), TEST_LOCATION );
-  DALI_TEST_EQUALS( DaliTestCheckMaps( fontStyleMapGet, fontStyleMapSet ), true, TEST_LOCATION );
+  selectedText = textField.GetProperty( DevelTextField::Property::SELECTED_TEXT ).Get<std::string>();
+  DALI_TEST_EQUALS( "lo wo", selectedText, TEST_LOCATION );
 
-  field.SetProperty( TextField::Property::INPUT_POINT_SIZE, 12.f );
-  DALI_TEST_EQUALS( field.GetProperty<float>( TextField::Property::INPUT_POINT_SIZE ), 12.f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::SELECTED_TEXT_START ).Get<int>(), 3, TEST_LOCATION );
+  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::SELECTED_TEXT_END ).Get<int>(), 8, TEST_LOCATION );
 
-  field.SetProperty( TextField::Property::TEXT_COLOR, Color::RED );
-  DALI_TEST_EQUALS( field.GetProperty<Vector4>( TextField::Property::TEXT_COLOR ), Color::RED, TEST_LOCATION );
+  // "lo wo" is copied
+  copiedText = DevelTextField::CopyText( textField );
+  DALI_TEST_EQUALS( "lo wo", copiedText, TEST_LOCATION );
 
-  fontStyleMapSet.Clear();
-  fontStyleMapSet.Insert( "weight", "bold" );
-  fontStyleMapSet.Insert( "slant", "italic" );
+  END_TEST;
+}
 
-  field.SetProperty( TextField::Property::FONT_STYLE, fontStyleMapSet );
+int UtcDaliTextFieldCutText(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliTextFieldCutText ");
 
-  fontStyleMapGet = field.GetProperty<Property::Map>( TextField::Property::FONT_STYLE );
-  DALI_TEST_EQUALS( fontStyleMapGet.Count(), fontStyleMapSet.Count(), TEST_LOCATION );
-  DALI_TEST_EQUALS( DaliTestCheckMaps( fontStyleMapGet, fontStyleMapSet ), true, TEST_LOCATION );
+  TextField textField = TextField::New();
 
-  fontStyleMapSet.Clear();
-  fontStyleMapSet.Insert( "width", "expanded" );
+  std::string selectedText = "";
 
-  field.SetProperty( TextField::Property::FONT_STYLE, fontStyleMapSet );
+  application.GetScene().Add( textField );
 
-  fontStyleMapGet = field.GetProperty<Property::Map>( TextField::Property::FONT_STYLE );
-  DALI_TEST_EQUALS( fontStyleMapGet.Count(), fontStyleMapSet.Count(), TEST_LOCATION );
-  DALI_TEST_EQUALS( DaliTestCheckMaps( fontStyleMapGet, fontStyleMapSet ), true, TEST_LOCATION );
+  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 );
 
-  // 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.SendNotification();
   application.Render();
 
-  DALI_TEST_CHECK( !field.HasKeyInputFocus() );
+  textField.SetProperty( TextField::Property::TEXT, "Hello world" );
 
-  END_TEST;
-}
+  application.SendNotification();
+  application.Render();
 
-int utcDaliTextFieldEscKeyLoseFocus(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" utcDaliTextFieldEscKeyLoseFocus");
+  // Hello is selected
+  DevelTextField::SelectText( textField, 0, 5 );
 
-  // Creates a tap event. After creating a tap event the text field should
-  // have the focus and add text with key events should be possible.
+  application.SendNotification();
+  application.Render();
 
-  TextField field = TextField::New();
-  DALI_TEST_CHECK( field );
+  selectedText = textField.GetProperty( DevelTextField::Property::SELECTED_TEXT ).Get<std::string>();
+  DALI_TEST_EQUALS( "Hello", selectedText, TEST_LOCATION );
 
-  application.GetScene().Add( field );
+  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::SELECTED_TEXT_START ).Get<int>(), 0, TEST_LOCATION );
+  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::SELECTED_TEXT_END ).Get<int>(), 5, TEST_LOCATION );
 
-  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 );
+  // Hello is cut
+  DALI_TEST_EQUALS( "Hello", DevelTextField::CutText( textField ), TEST_LOCATION );
 
-  // Avoid a crash when core load gl resources.
-  application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
+  DALI_TEST_EQUALS( textField.GetProperty( TextField::Property::TEXT ).Get<std::string>(), " world", TEST_LOCATION );
+
+  // " w" is selected
+  DevelTextField::SelectText( textField, 0, 2 );
 
-  // Render and notify
   application.SendNotification();
   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 ) );
+  selectedText = textField.GetProperty( DevelTextField::Property::SELECTED_TEXT ).Get<std::string>();
+  DALI_TEST_EQUALS( " w", selectedText, TEST_LOCATION );
+
+  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::SELECTED_TEXT_START ).Get<int>(), 0, TEST_LOCATION );
+  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::SELECTED_TEXT_END ).Get<int>(), 2, TEST_LOCATION );
+
+  // " w" is cut
+  DALI_TEST_EQUALS( " w", DevelTextField::CutText( textField ), TEST_LOCATION );
 
-  // Render and notify
   application.SendNotification();
   application.Render();
 
-  DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::TEXT ), std::string(""), TEST_LOCATION );
+  DALI_TEST_EQUALS( textField.GetProperty( TextField::Property::TEXT ).Get<std::string>(), "orld", TEST_LOCATION );
 
-  // Create a tap event to touch the text field.
-  TestGenerateTap( application, 150.0f, 25.0f );
+  // Test Cut from the middle
+
+  // "rl" is selected
+  DevelTextField::SelectText( textField, 1, 3 );
 
-  // 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 ) );
+  selectedText = textField.GetProperty( DevelTextField::Property::SELECTED_TEXT ).Get<std::string>();
+  DALI_TEST_EQUALS( "rl", selectedText, TEST_LOCATION );
+
+  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::SELECTED_TEXT_START ).Get<int>(), 1, TEST_LOCATION );
+  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::SELECTED_TEXT_END ).Get<int>(), 3, TEST_LOCATION );
+
+  // "rl" is cut
+  DALI_TEST_EQUALS( "rl", DevelTextField::CutText( textField ), TEST_LOCATION );
 
-  // Render and notify
   application.SendNotification();
   application.Render();
 
-  DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::TEXT ), std::string("ad"), TEST_LOCATION );
+  DALI_TEST_EQUALS( textField.GetProperty( TextField::Property::TEXT ).Get<std::string>(), "od", 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 ) );
+  // Test Cut from the end
+
+  // "d" is selected
+  DevelTextField::SelectText( textField, 1, 2 );
 
-  // Render and notify
   application.SendNotification();
   application.Render();
 
-  DALI_TEST_EQUALS( false, field.HasKeyInputFocus(), TEST_LOCATION );
+  selectedText = textField.GetProperty( DevelTextField::Property::SELECTED_TEXT ).Get<std::string>();
+  DALI_TEST_EQUALS( "d", selectedText, 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 ) );
+  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::SELECTED_TEXT_START ).Get<int>(), 1, TEST_LOCATION );
+  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::SELECTED_TEXT_END ).Get<int>(), 2, TEST_LOCATION );
+
+  // "d" is cut
+  DALI_TEST_EQUALS( "d", DevelTextField::CutText( textField ), TEST_LOCATION );
 
-  // Render and notify
   application.SendNotification();
   application.Render();
 
-  DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::TEXT ), std::string("ad"), TEST_LOCATION );
+  DALI_TEST_EQUALS( textField.GetProperty( TextField::Property::TEXT ).Get<std::string>(), "o", TEST_LOCATION );
 
   END_TEST;
 }
 
-int utcDaliTextFieldSomeSpecialKeys(void)
+int UtcDaliTextFieldPasteText(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" utcDaliTextFieldSomeSpecialKeys");
+  tet_infoline(" UtcDaliTextFieldPasteText ");
 
-  // Checks some special keys when the text is selected.
+  TextField textField = TextField::New();
+
+  application.GetScene().Add( textField );
+
+  std::string cutText = "";
+  std::string copiedText = "";
+
+  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 );
 
-  TextField field = TextField::New();
-  DALI_TEST_CHECK( field );
-  application.GetScene().Add( field );
-  LoadMarkerImages(application, field);
-  // Render and notify
   application.SendNotification();
   application.Render();
 
-  const std::string longText( "This is a long text for the size of the text-field." );
+  textField.SetProperty( TextField::Property::TEXT, "Hello World" );
 
-  field.SetProperty( TextField::Property::TEXT, longText );
-  field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
-  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.SendNotification();
+  application.Render();
+
+  // Tap on the text editor
+  TestGenerateTap( application, 3.0f, 25.0f );
 
-  // Avoid a crash when core load gl resources.
-  application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
   // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Create a tap event to touch the text field.
-  TestGenerateTap( application, 150.0f, 25.0f );
+  // Select some text in the right of the current cursor position
+  DevelTextField::SelectText( textField, 0, 3 );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Tap first to get the focus.
-  TestGenerateTap( application, 1.0f, 25.0f );
+  // Cut the selected text
+  cutText = DevelTextField::CutText(textField);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Double tap to select a word.
-  TestGenerateTap( application, 1.0f, 25.0f );
+  DALI_TEST_EQUALS( "Hel", cutText, TEST_LOCATION );
+  DALI_TEST_EQUALS( textField.GetProperty( TextField::Property::TEXT ).Get<std::string>(), "lo World", TEST_LOCATION );
+
+  DevelTextField::SelectText( textField, 0, 3 );
 
   // 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 ) );
+  // Copy the selected text
+  copiedText = DevelTextField::CopyText(textField);
 
   // 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 ) );
+  DALI_TEST_EQUALS( "lo ", copiedText, TEST_LOCATION );
+  DALI_TEST_EQUALS( "lo World", textField.GetProperty<std::string>( TextField::Property::TEXT ), TEST_LOCATION );
+
+  // Move the cursor to the end of the line
+  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 ) );
+  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 ) );
+  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();
 
-  // 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 ) );
+  // Paste the selected text at the current cursor position
+  DevelTextField::PasteText(textField);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
-  // The text shouldn't be deleted.
-  DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::TEXT ), longText, TEST_LOCATION );
+  DALI_TEST_EQUALS( textField.GetProperty( TextField::Property::TEXT ).Get<std::string>(), "lo Worldlo ", TEST_LOCATION );
 
   END_TEST;
 }
-
-int utcDaliTextFieldSizeUpdate(void)
+int utcDaliTextFieldCursorPositionChangedSignal(void)
 {
   ToolkitTestApplication application;
-  tet_infoline("utcDaliTextFieldSizeUpdate");
+  tet_infoline(" utcDaliTextFieldCursorPositionChangedSignal");
 
-  // Checks some special keys when the text is selected.
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
-  application.GetScene().Add( field );
-
-  float previousHeight = 0.0f;
-  float currentHeight = 0.0f;
-  const float fieldWidth = 1920.0f;
 
+  application.GetScene().Add( field );
 
-  // "ㅁ" is bigger then "ኢ"
-  field.SetProperty( Actor::Property::SIZE, Vector2( fieldWidth ,10.0f ) );
-  field.SetResizePolicy( ResizePolicy::FIXED , Dimension::WIDTH );
-  field.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY , Dimension::HEIGHT );
+  // connect to the selection changed signal.
+  ConnectionTracker* testTracker = new ConnectionTracker();
+  DevelTextField::CursorPositionChangedSignal(field).Connect(&TestCursorPositionChangedCallback);
+  bool cursorPositionChangedSignal = false;
+  field.ConnectSignal( testTracker, "cursorPositionChanged",   CallbackFunctor(&cursorPositionChangedSignal) );
 
-  field.SetProperty( TextField::Property::TEXT, "ኢ");
+  field.SetProperty( TextField::Property::TEXT, "Hello world Hello world" );
+  field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
+  field.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 50.f ) );
   field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
   field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
 
-  field.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
-  KeyboardFocusManager::Get().SetCurrentFocusActor( field );
+  // Avoid a crash when core load gl resources.
+  application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
 
+  // Render and notify
   application.SendNotification();
   application.Render();
 
-  previousHeight = field.GetHeightForWidth( fieldWidth );
-  DALI_TEST_EQUALS( previousHeight, field.GetProperty<float>( Actor::Property::SIZE_HEIGHT ) , TEST_LOCATION );
+  field.SetKeyInputFocus();
 
-  // 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 ) );
+  // Tap on the text field
+  TestGenerateTap( application, 3.0f, 25.0f );
 
+  // Render and notify
   application.SendNotification();
   application.Render();
 
-  currentHeight = field.GetHeightForWidth( fieldWidth );
-  DALI_TEST_EQUALS( currentHeight, field.GetProperty<float>( Actor::Property::SIZE_HEIGHT ), TEST_LOCATION );
-  DALI_TEST_EQUALS( (previousHeight < currentHeight), true , TEST_LOCATION );
-
-  END_TEST;
-}
-
-int utcDaliTextFieldExtremlyLargePointSize(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" utcDaliTextFieldExtremlyLargePointSize");
-
-  TextField field = TextField::New();
-
-  field.SetProperty( TextField::Property::TEXT, "Text" );
-  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
-  {
-    field.SetProperty( TextField::Property::POINT_SIZE, 160.0f );
-    application.SendNotification();
-    DALI_TEST_CHECK( field );
-  }
-  catch (...)
-  {
-    tet_result(TET_FAIL);
-  }
-  END_TEST;
-}
+  DALI_TEST_CHECK(gCursorPositionChangedCallbackCalled);
+  DALI_TEST_EQUALS(oldCursorPos, 23, TEST_LOCATION);
 
-int UtcDaliTextFieldDefaultFontStylePropertyCoverage(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline("UtcDaliTextFieldFontStylePorpertyCoverage");
-  TextField field = TextField::New();
-  DALI_TEST_CHECK( field );
-  application.GetScene().Add( field );
+  gCursorPositionChangedCallbackCalled = false;
 
-  Property::Map fontStyleMapGet;
+  // Move to left.
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
-  fontStyleMapGet = field.GetProperty<Property::Map>( TextField::Property::FONT_STYLE );
+  // Render and notify
+  application.SendNotification();
+  application.Render();
 
-  Property::Value* weightValue = NULL;
-  Property::Value* widthValue = NULL;
-  Property::Value* slantValue = NULL;
-  weightValue = fontStyleMapGet.Find( "weight" );
-  widthValue = fontStyleMapGet.Find( "width" );
-  slantValue = fontStyleMapGet.Find( "slant" );
-  DALI_TEST_CHECK( !weightValue );
-  DALI_TEST_CHECK( !widthValue );
-  DALI_TEST_CHECK( !slantValue );
+  DALI_TEST_CHECK(gCursorPositionChangedCallbackCalled);
+  DALI_TEST_EQUALS(oldCursorPos, 17, TEST_LOCATION);
 
-  END_TEST;
-}
+  gCursorPositionChangedCallbackCalled = false;
 
-int UtcDaliTextFieldSettingPlaceholder(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline("UtcDaliTextFieldSettingPlaceholder");
+  // Insert D
+  application.ProcessEvent( GenerateKey( "D", "", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::DOWN, "D", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
-  TextField field = TextField::New();
-  DALI_TEST_CHECK( field );
-  application.GetScene().Add( field );
+  // Render and notify
+  application.SendNotification();
+  application.Render();
 
-  // Check the placeholder property with pixel size
-  Property::Map placeholderPixelSizeMapSet;
-  Property::Map placeholderPixelSizeMapGet;
-  Property::Map placeholderFontstyleMap;
-  placeholderPixelSizeMapSet[ Text::PlaceHolder::Property::TEXT ] = "Setting Placeholder Text";
-  placeholderPixelSizeMapSet[ Text::PlaceHolder::Property::TEXT_FOCUSED ] = "Setting Placeholder Text Focused";
-  placeholderPixelSizeMapSet[ Text::PlaceHolder::Property::COLOR ] = Color::BLUE;
-  placeholderPixelSizeMapSet[ Text::PlaceHolder::Property::FONT_FAMILY ] = "Arial";
-  placeholderPixelSizeMapSet[ Text::PlaceHolder::Property::PIXEL_SIZE ] = 15.0f;
-  placeholderPixelSizeMapSet[ Text::PlaceHolder::Property::ELLIPSIS ] = true;
+  DALI_TEST_CHECK(gCursorPositionChangedCallbackCalled);
+  DALI_TEST_EQUALS(oldCursorPos, 16, TEST_LOCATION);
 
-  placeholderFontstyleMap.Insert( "weight", "bold" );
-  placeholderPixelSizeMapSet[ Text::PlaceHolder::Property::FONT_STYLE ] = placeholderFontstyleMap;
-  field.SetProperty( TextField::Property::PLACEHOLDER, placeholderPixelSizeMapSet );
+  gCursorPositionChangedCallbackCalled = false;
 
-  placeholderPixelSizeMapGet = field.GetProperty<Property::Map>( TextField::Property::PLACEHOLDER );
-  DALI_TEST_EQUALS( placeholderPixelSizeMapGet.Count(), placeholderPixelSizeMapSet.Count(), TEST_LOCATION );
-  DALI_TEST_EQUALS( DaliTestCheckMaps( placeholderPixelSizeMapGet, placeholderPixelSizeMapSet ), true, TEST_LOCATION );
+  //delete one character
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_BACKSPACE, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
-  // Check the placeholder property with point size
-  Property::Map placeholderMapSet;
-  Property::Map placeholderMapGet;
-  placeholderMapSet[ Text::PlaceHolder::Property::TEXT ] = "Setting Placeholder Text";
-  placeholderMapSet[ Text::PlaceHolder::Property::TEXT_FOCUSED ] = "Setting Placeholder Text Focused";
-  placeholderMapSet[ Text::PlaceHolder::Property::COLOR ] = Color::RED;
-  placeholderMapSet[ Text::PlaceHolder::Property::FONT_FAMILY ] = "Arial";
-  placeholderMapSet[ Text::PlaceHolder::Property::POINT_SIZE ] = 12.0f;
-  placeholderMapSet[ Text::PlaceHolder::Property::ELLIPSIS ] = false;
+  // Render and notify
+  application.SendNotification();
+  application.Render();
 
-  // Check the placeholder font style property
-  placeholderFontstyleMap.Clear();
+  DALI_TEST_CHECK(gCursorPositionChangedCallbackCalled);
+  DALI_TEST_EQUALS(oldCursorPos, 17, TEST_LOCATION);
 
-  placeholderFontstyleMap.Insert( "weight", "bold" );
-  placeholderFontstyleMap.Insert( "width", "condensed" );
-  placeholderFontstyleMap.Insert( "slant", "italic" );
-  placeholderMapSet[ Text::PlaceHolder::Property::FONT_STYLE ] = placeholderFontstyleMap;
-  field.SetProperty( TextField::Property::PLACEHOLDER, placeholderMapSet );
+  gCursorPositionChangedCallbackCalled = false;
 
-  placeholderMapGet = field.GetProperty<Property::Map>( TextField::Property::PLACEHOLDER );
-  DALI_TEST_EQUALS( placeholderMapGet.Count(), placeholderMapSet.Count(), TEST_LOCATION );
-  DALI_TEST_EQUALS( DaliTestCheckMaps( placeholderMapGet, placeholderMapSet ), true, TEST_LOCATION );
+  field.SetProperty( TextField::Property::TEXT, "Hello" );
 
-  // Reset font style.
-  placeholderFontstyleMap.Clear();
-  placeholderFontstyleMap.Insert( "weight", "normal" );
-  placeholderFontstyleMap.Insert( "slant", "oblique" );
-  placeholderMapSet[ Text::PlaceHolder::Property::FONT_STYLE ] = placeholderFontstyleMap;
-  field.SetProperty( TextField::Property::PLACEHOLDER, placeholderMapSet );
+  // Render and notify
+  application.SendNotification();
+  application.Render();
 
-  placeholderMapGet = field.GetProperty<Property::Map>( TextField::Property::PLACEHOLDER );
-  DALI_TEST_EQUALS( placeholderMapGet.Count(), placeholderMapSet.Count(), TEST_LOCATION );
-  DALI_TEST_EQUALS( DaliTestCheckMaps( placeholderMapGet, placeholderMapSet ), true, TEST_LOCATION );
+  DALI_TEST_CHECK(gCursorPositionChangedCallbackCalled);
+  DALI_TEST_EQUALS(oldCursorPos, 16, TEST_LOCATION);
 
-  placeholderFontstyleMap.Clear();
-  placeholderFontstyleMap.Insert( "slant", "roman" );
-  placeholderMapSet[ Text::PlaceHolder::Property::FONT_STYLE ] = placeholderFontstyleMap;
-  field.SetProperty( TextField::Property::PLACEHOLDER, placeholderMapSet );
+  gCursorPositionChangedCallbackCalled = false;
 
-  placeholderMapGet = field.GetProperty<Property::Map>( TextField::Property::PLACEHOLDER );
+  field.SetProperty(DevelTextField::Property::PRIMARY_CURSOR_POSITION, 3);
 
-  placeholderFontstyleMap.Clear();
-  placeholderMapSet[ Text::PlaceHolder::Property::FONT_STYLE ] = placeholderFontstyleMap;
+  // Render and notify
+  application.SendNotification();
+  application.Render();
 
-  field.SetProperty( TextField::Property::PLACEHOLDER, placeholderMapSet );
-  placeholderMapGet = field.GetProperty<Property::Map>( TextField::Property::PLACEHOLDER );
-  DALI_TEST_EQUALS( placeholderMapGet.Count(), placeholderMapSet.Count(), TEST_LOCATION );
-  DALI_TEST_EQUALS( DaliTestCheckMaps( placeholderMapGet, placeholderMapSet ), true, TEST_LOCATION );
+  DALI_TEST_CHECK(gCursorPositionChangedCallbackCalled);
+  DALI_TEST_EQUALS(oldCursorPos, 5, TEST_LOCATION);
 
   END_TEST;
 }
 
-int UtcDaliTextFieldSetPaddingProperty(void)
+int utcDaliTextFieldGeometryEllipsisStart(void)
 {
   ToolkitTestApplication application;
-  tet_infoline("UtcDaliTextFieldSetPaddingProperty\n");
+  tet_infoline(" utcDaliTextFieldGeometryEllipsisStart");
 
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
-  field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
+
+  application.GetScene().Add( field );
+
+  field.SetProperty( TextField::Property::POINT_SIZE, 7.f );
+  field.SetProperty( Actor::Property::SIZE, Vector2( 250.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 );
+  field.SetProperty( TextField::Property::ENABLE_MARKUP, true );
+  field.SetProperty( DevelTextField::Property::ELLIPSIS, true );
+  field.SetProperty( DevelTextField::Property::ELLIPSIS_POSITION, DevelText::EllipsisPosition::START );
+  field.SetProperty( TextField::Property::TEXT, "Hello World" );
+
+  // Avoid a crash when core load gl resources.
+  application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
 
+  // Render and notify
   application.SendNotification();
   application.Render();
 
-  Vector3 originalSize = field.GetNaturalSize();
-
-  field.SetProperty( Toolkit::Control::Property::PADDING, Extents( 10, 10, 10, 10 ) );
+  unsigned int expectedCount = 1;
+  unsigned int startIndex = 0;
+  unsigned int endIndex = 10;
 
-  application.SendNotification();
-  application.Render();
+  Vector<Vector2> positionsList = DevelTextField::GetTextPosition(field, startIndex, endIndex);
+  Vector<Vector2> sizeList = DevelTextField::GetTextSize(field, startIndex, endIndex);
 
-  DALI_TEST_EQUALS( field.GetProperty<Extents>( Toolkit::Control::Property::PADDING ), Extents( 10, 10, 10, 10 ), TEST_LOCATION );
+  DALI_TEST_EQUALS(positionsList.Size(), expectedCount, TEST_LOCATION);
+  DALI_TEST_EQUALS(sizeList.Size(), expectedCount, TEST_LOCATION);
 
-  Vector3 paddingAddedSize = field.GetNaturalSize();
+  Vector<Vector2> expectedSizes;
+  Vector<Vector2> expectedPositions;
 
-  DALI_TEST_EQUALS( originalSize.width + 10 + 10 , paddingAddedSize.width, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+  expectedPositions.PushBack(Vector2(14, 0));
+  expectedSizes.PushBack(Vector2(106, 25));
 
-  DALI_TEST_EQUALS( originalSize.height + 10 + 10 , paddingAddedSize.height, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+  TestTextGeometryUtils::CheckGeometryResult(positionsList, sizeList, expectedPositions, expectedSizes);
 
   END_TEST;
 }
 
-int UtcDaliTextFieldEnableShiftSelectionProperty(void)
+int utcDaliTextFieldGeometryEllipsisEnd(void)
 {
   ToolkitTestApplication application;
-  tet_infoline("UtcDaliTextFieldEnableShiftSelectionProperty");
+  tet_infoline(" utcDaliTextFieldGeometryEllipsisEnd");
 
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
-  field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
+
+  application.GetScene().Add( field );
+
+  field.SetProperty( TextField::Property::POINT_SIZE, 7.f );
+  field.SetProperty( Actor::Property::SIZE, Vector2( 250.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 );
+  field.SetProperty( TextField::Property::ENABLE_MARKUP, true );
+  field.SetProperty( DevelTextField::Property::ELLIPSIS, true );
+  field.SetProperty( DevelTextField::Property::ELLIPSIS_POSITION, DevelText::EllipsisPosition::END );
+  field.SetProperty( TextField::Property::TEXT, "Hello World" );
 
+  // Avoid a crash when core load gl resources.
+  application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
+
+  // Render and notify
   application.SendNotification();
   application.Render();
 
-  // The default value of ENABLE_SHIFT_SELECTION is 'true'.
-  DALI_TEST_EQUALS( field.GetProperty<bool>( DevelTextField::Property::ENABLE_SHIFT_SELECTION ), true, TEST_LOCATION );
+  unsigned int expectedCount = 1;
+  unsigned int startIndex = 0;
+  unsigned int endIndex = 10;
 
-  // Check the enable shift selection property
-  field.SetProperty( DevelTextField::Property::ENABLE_SHIFT_SELECTION, false );
-  DALI_TEST_EQUALS( field.GetProperty<bool>( DevelTextField::Property::ENABLE_SHIFT_SELECTION ), false, TEST_LOCATION );
+  Vector<Vector2> positionsList = DevelTextField::GetTextPosition(field, startIndex, endIndex);
+  Vector<Vector2> sizeList = DevelTextField::GetTextSize(field, startIndex, endIndex);
 
-  application.SendNotification();
-  application.Render();
+  DALI_TEST_EQUALS(positionsList.Size(), expectedCount, TEST_LOCATION);
+  DALI_TEST_EQUALS(sizeList.Size(), expectedCount, TEST_LOCATION);
+
+  Vector<Vector2> expectedSizes;
+  Vector<Vector2> expectedPositions;
+
+  expectedPositions.PushBack(Vector2(-2, 0));
+  expectedSizes.PushBack(Vector2(122, 25));
+
+  TestTextGeometryUtils::CheckGeometryResult(positionsList, sizeList, expectedPositions, expectedSizes);
 
   END_TEST;
 }
 
-int UtcDaliTextFieldEnableGrabHandleProperty(void)
+int utcDaliTextFieldGeometryRTL(void)
 {
   ToolkitTestApplication application;
-  tet_infoline("UtcDaliTextFieldEnableGrabHandleProperty");
+  tet_infoline(" utcDaliTextFieldGeometryRTL");
 
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
+
+  application.GetScene().Add( field );
+
+  field.SetProperty( TextField::Property::POINT_SIZE, 7.f );
   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();
-
-  // The default value of ENABLE_GRAB_HANDLE is 'true'.
-  DALI_TEST_EQUALS( field.GetProperty<bool>( DevelTextField::Property::ENABLE_GRAB_HANDLE ), true, TEST_LOCATION );
+  field.SetProperty( TextField::Property::ENABLE_MARKUP, true );
+  field.SetProperty( TextField::Property::TEXT, "السطر الاخير" );
 
-  // Check the enable grab handle property
-  field.SetProperty( DevelTextField::Property::ENABLE_GRAB_HANDLE, false );
-  DALI_TEST_EQUALS( field.GetProperty<bool>( DevelTextField::Property::ENABLE_GRAB_HANDLE ), false, TEST_LOCATION );
+  // Avoid a crash when core load gl resources.
+  application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
 
+  // Render and notify
   application.SendNotification();
   application.Render();
 
+  unsigned int expectedCount = 1;
+  unsigned int startIndex = 1;
+  unsigned int endIndex = 7;
+
+  Vector<Vector2> positionsList = DevelTextField::GetTextPosition(field, startIndex, endIndex);
+  Vector<Vector2> sizeList = DevelTextField::GetTextSize(field, startIndex, endIndex);
+
+  DALI_TEST_EQUALS(positionsList.Size(), expectedCount, TEST_LOCATION);
+  DALI_TEST_EQUALS(sizeList.Size(), expectedCount, TEST_LOCATION);
+
+  Vector<Vector2> expectedSizes;
+  Vector<Vector2> expectedPositions;
+
+  expectedPositions.PushBack(Vector2(38, 0));
+  expectedSizes.PushBack(Vector2(73, 25));
+
+  TestTextGeometryUtils::CheckGeometryResult(positionsList, sizeList, expectedPositions, expectedSizes);
+
   END_TEST;
 }
 
-int UtcDaliTextFieldMatchSystemLanguageDirectionProperty(void)
+int utcDaliTextFieldGeometryGlyphMiddle(void)
 {
   ToolkitTestApplication application;
-  tet_infoline("UtcDaliTextFieldMatchSystemLanguageDirectionProperty");
+  tet_infoline(" utcDaliTextFieldGeometryGlyphMiddle");
 
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
-  field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
+
+  application.GetScene().Add( field );
+
+  field.SetProperty( TextField::Property::POINT_SIZE, 7.f );
+  field.SetProperty( Actor::Property::SIZE, Vector2( 150.f, 200.f ) );
   field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
   field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
-  application.GetScene().Add( field );
+  field.SetProperty( TextField::Property::ENABLE_MARKUP, true );
+  field.SetProperty( TextField::Property::TEXT, "لا تحتوي على لا" );
+
+  // Avoid a crash when core load gl resources.
+  application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
 
+  // Render and notify
   application.SendNotification();
   application.Render();
 
-  // The default value of MATCH_SYSTEM_LANGUAGE_DIRECTION is 'false'.
-  DALI_TEST_EQUALS( field.GetProperty<bool>( DevelTextField::Property::MATCH_SYSTEM_LANGUAGE_DIRECTION ), false, TEST_LOCATION );
+  unsigned int expectedCount = 1;
+  unsigned int startIndex = 1;
+  unsigned int endIndex = 13;
 
-  // Check the match system language direction property
-  field.SetProperty( DevelTextField::Property::MATCH_SYSTEM_LANGUAGE_DIRECTION, true );
-  DALI_TEST_EQUALS( field.GetProperty<bool>( DevelTextField::Property::MATCH_SYSTEM_LANGUAGE_DIRECTION ), true, TEST_LOCATION );
+  Vector<Vector2> positionsList = DevelTextField::GetTextPosition(field, startIndex, endIndex);
+  Vector<Vector2> sizeList = DevelTextField::GetTextSize(field, startIndex, endIndex);
 
-  application.SendNotification();
-  application.Render();
+  DALI_TEST_EQUALS(positionsList.Size(), expectedCount, TEST_LOCATION);
+  DALI_TEST_EQUALS(sizeList.Size(), expectedCount, TEST_LOCATION);
+
+  Vector<Vector2> expectedSizes;
+  Vector<Vector2> expectedPositions;
+
+  expectedPositions.PushBack(Vector2(6, 0));
+  expectedSizes.PushBack(Vector2(124, 25));
+
+  TestTextGeometryUtils::CheckGeometryResult(positionsList, sizeList, expectedPositions, expectedSizes);
 
   END_TEST;
 }
 
-int utcDaliTextFieldLayoutDirectionCoverage(void)
+int utcDaliTextFieldSelectionClearedSignal(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" utcDaliTextFieldLayoutDirectionCoverage");
+  tet_infoline(" utcDaliTextFieldSelectionClearedSignal");
 
-  // Creates a tap event. After creating a tap event the text field should
-  // have the focus and add text with key events should be possible.
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
 
   application.GetScene().Add( field );
 
-  field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
+  // connect to the selection changed signal.
+  ConnectionTracker* testTracker = new ConnectionTracker();
+  DevelTextField::SelectionClearedSignal(field).Connect(&TestSelectionClearedCallback);
+  bool selectionClearedSignal = false;
+  field.ConnectSignal( testTracker, "selectionCleared",   CallbackFunctor(&selectionClearedSignal) );
+
+  field.SetProperty( TextField::Property::TEXT, "Hello\nworld\nHello world" );
+  field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
+  field.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 50.f ) );
   field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
   field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
 
@@ -2795,296 +4628,301 @@ int utcDaliTextFieldLayoutDirectionCoverage(void)
   application.SendNotification();
   application.Render();
 
-  // init direction for coverage
-  // Set horizontal alignment END
-  field.SetProperty( TextField::Property::HORIZONTAL_ALIGNMENT, "END");
-
-  // Create a tap event to touch the text field.
-  TestGenerateTap( application, 150.0f, 25.0f );
+  // Tap on the text editor
+  TestGenerateTap( application, 3.0f, 25.0f );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Set MATCH_SYSTEM_LANGUAGE_DIRECTION to true to use the layout direction.
-  field.SetProperty( DevelTextField::Property::MATCH_SYSTEM_LANGUAGE_DIRECTION, true );
-  field.SetProperty( Actor::Property::LAYOUT_DIRECTION, LayoutDirection::RIGHT_TO_LEFT );
-
-  // Set horizontal alignment BEGIN
-  field.SetProperty( TextField::Property::HORIZONTAL_ALIGNMENT, "BEGIN");
+  // Move to second line of the text & Select some text in the right of the current cursor position
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) ); 
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
-  // Create a tap event to touch the text field.
-  TestGenerateTap( application, 150.0f, 25.0f );
+  // remove selection
+  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();
   application.Render();
 
-  // Set horizontal alignment CENTER
-  field.SetProperty( TextField::Property::HORIZONTAL_ALIGNMENT, "CENTER");
-
-  // Create a tap event to touch the text field.
-  TestGenerateTap( application, 150.0f, 25.0f );
+  DALI_TEST_CHECK(gSelectionClearedCallbackCalled);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Set horizontal alignment END
-  field.SetProperty( TextField::Property::HORIZONTAL_ALIGNMENT, "END");
-
-  // Create a tap event to touch the text field.
-  TestGenerateTap( application, 150.0f, 25.0f );
+  // Tap on the text editor
+  TestGenerateTap( application, 3.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 ) );
+  gSelectionClearedCallbackCalled = false;
+
+  // Move to second line of the text & select.
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+
+  //remove selection
+  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();
 
-  DALI_TEST_EQUALS( false, field.HasKeyInputFocus(), TEST_LOCATION );
+  DALI_TEST_CHECK(gSelectionClearedCallbackCalled);
 
-  END_TEST;
-}
+  gSelectionClearedCallbackCalled = false;
 
-int UtcDaliTextFieldGetInputMethodContext(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline("UtcDaliTextFieldGetInputMethodContext");
+  // Render and notify
+  application.SendNotification();
+  application.Render();
 
-  TextField field = TextField::New();
-  DALI_TEST_CHECK( DevelTextField::GetInputMethodContext( field ) );
+  // Move to second line of the text & select.
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
-  END_TEST;
-}
+  // replace D with selected text
+  application.ProcessEvent( GenerateKey( "D", "", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::DOWN, "D", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
-int UtcDaliTextFieldSelectWholeText(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcDaliTextFieldSelectWholeText ");
+  // Render and notify
+  application.SendNotification();
+  application.Render();
 
-  TextField textField = TextField::New();
+  DALI_TEST_CHECK(gSelectionClearedCallbackCalled);
 
-  application.GetScene().Add( textField );
+  gSelectionClearedCallbackCalled = false;
 
-  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 );
+  // Render and notify
+  application.SendNotification();
+  application.Render();
 
-  // Avoid a crash when core load gl resources.
-  application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
+  DevelTextField::SelectText( field ,1, 3 );
 
+  // Render and notify
   application.SendNotification();
   application.Render();
 
-  DALI_TEST_EQUALS( 1u, textField.GetChildCount(), TEST_LOCATION );
-
-  DevelTextField::SelectWholeText( textField );
+  field.SetProperty( DevelTextField::Property::PRIMARY_CURSOR_POSITION, 3);
 
+  // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Nothing should have been selected. The number of children is still 1
-  DALI_TEST_EQUALS( 1u, textField.GetChildCount(), TEST_LOCATION );
+  DALI_TEST_CHECK(gSelectionClearedCallbackCalled);
 
-  textField.SetProperty( TextField::Property::TEXT, "Hello world" );
+  gSelectionClearedCallbackCalled = false;
+
+  DevelTextField::SelectText( field ,1, 3 );
 
+  // Render and notify
   application.SendNotification();
   application.Render();
 
-  DevelTextField::SelectWholeText( textField );
+  // select none
+  DevelTextField::SelectNone(field);
 
+  // Render and notify
   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 );
+  DALI_TEST_CHECK(gSelectionClearedCallbackCalled);
 
   END_TEST;
 }
 
-int UtcDaliTextFieldSelectNone(void)
+int utcDaliTextFieldSelectionChangedSignal(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" UtcDaliTextFieldSelectWholeText ");
+  tet_infoline(" utcDaliTextFieldSelectionChangedSignal");
 
-  TextField textField = TextField::New();
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( field );
 
-  application.GetScene().Add( textField );
+  application.GetScene().Add( field );
 
-  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 );
+  // connect to the selection changed signal.
+  ConnectionTracker* testTracker = new ConnectionTracker();
+  DevelTextField::SelectionChangedSignal(field).Connect(&TestSelectionChangedCallback);
+  bool selectionChangedSignal = false;
+  field.ConnectSignal( testTracker, "selectionChanged",   CallbackFunctor(&selectionChangedSignal) );
+
+  field.SetProperty( TextField::Property::TEXT, "Hello world Hello world" );
+  field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
+  field.SetProperty( Actor::Property::SIZE, Vector2( 100.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 );
 
+  // Render and notify
   application.SendNotification();
   application.Render();
 
-  textField.SetProperty( TextField::Property::TEXT, "Hello world" );
+  // Tap on the text field
+  TestGenerateTap( application, 3.0f, 25.0f );
 
+  // Render and notify
   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 );
+  // Select some text in the right of the current cursor position
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_SHIFT_LEFT, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
+  // Render and notify
   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 );
+  DALI_TEST_CHECK(gSelectionChangedCallbackCalled);
+  DALI_TEST_EQUALS(oldSelectionStart, oldSelectionEnd, TEST_LOCATION);
 
-  DevelTextField::SelectNone( textField );
+  gSelectionChangedCallbackCalled = false;
+
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
+  // Render and notify
   application.SendNotification();
   application.Render();
 
-  // Nothing is selected
-  selectedText = textField.GetProperty( DevelTextField::Property::SELECTED_TEXT ).Get<std::string>();
-  DALI_TEST_EQUALS( "", selectedText, TEST_LOCATION );
+  DALI_TEST_CHECK(gSelectionChangedCallbackCalled);
+  DALI_TEST_EQUALS(oldSelectionStart, 0, TEST_LOCATION);
+  DALI_TEST_EQUALS(oldSelectionEnd, 1, TEST_LOCATION);
 
-  END_TEST;
-}
+  gSelectionChangedCallbackCalled = false;
 
-int UtcDaliTextFieldSelectRange(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcDaliTextFieldSelectRange ");
+  application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::UP, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
 
-  TextField textField = TextField::New();
+  // Render and notify
+  application.SendNotification();
+  application.Render();
 
-  application.GetScene().Add( textField );
+  DALI_TEST_CHECK(gSelectionChangedCallbackCalled);
+  DALI_TEST_EQUALS(oldSelectionStart, 0, TEST_LOCATION);
+  DALI_TEST_EQUALS(oldSelectionEnd, 2, TEST_LOCATION);
 
-  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 );
+  gSelectionChangedCallbackCalled = false;
+  field.SetKeyInputFocus();
 
-  // Avoid a crash when core load gl resources.
-  application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  DevelTextField::SelectText( field ,0, 5 );
 
   application.SendNotification();
   application.Render();
 
-  textField.SetProperty( TextField::Property::TEXT, "Hello world" );
+  DALI_TEST_CHECK(gSelectionChangedCallbackCalled);
+  DALI_TEST_EQUALS(oldSelectionStart, oldSelectionEnd, TEST_LOCATION);
+
+  gSelectionChangedCallbackCalled = false;
 
+  field.SetProperty( DevelTextField::Property::PRIMARY_CURSOR_POSITION, 3);
+
+  // Render and notify
   application.SendNotification();
   application.Render();
 
-  textField.SetProperty( DevelTextField::Property::SELECTED_TEXT_START , 0);
-  textField.SetProperty( DevelTextField::Property::SELECTED_TEXT_END , 5);
+  DALI_TEST_CHECK(gSelectionChangedCallbackCalled);
+  DALI_TEST_EQUALS(oldSelectionStart, 0, TEST_LOCATION);
+  DALI_TEST_EQUALS(oldSelectionEnd, 5, TEST_LOCATION);
 
-  // Hello is selected
-  std::string selectedText = textField.GetProperty( DevelTextField::Property::SELECTED_TEXT ).Get<std::string>();
-  DALI_TEST_EQUALS( "Hello", selectedText, TEST_LOCATION );
+  gSelectionChangedCallbackCalled = false;
 
-  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::SELECTED_TEXT_START ).Get<int>(), 0, TEST_LOCATION );
-  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::SELECTED_TEXT_END ).Get<int>(), 5, TEST_LOCATION );
+  // select all text
+  DevelTextField::SelectWholeText(field);
 
-  textField.SetProperty( DevelTextField::Property::SELECTED_TEXT_START , 6);
-  textField.SetProperty( DevelTextField::Property::SELECTED_TEXT_END , 11);
+  // Render and notify
+  application.SendNotification();
+  application.Render();
 
-  // world is selected
-  selectedText = textField.GetProperty( DevelTextField::Property::SELECTED_TEXT ).Get<std::string>();
-  DALI_TEST_EQUALS( "world", selectedText, TEST_LOCATION );
+  DALI_TEST_CHECK(gSelectionChangedCallbackCalled);
+  DALI_TEST_EQUALS(oldSelectionStart, oldSelectionEnd, TEST_LOCATION);
 
-  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::SELECTED_TEXT_START ).Get<int>(), 6, TEST_LOCATION );
-  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::SELECTED_TEXT_END ).Get<int>(), 11, TEST_LOCATION );
+  gSelectionChangedCallbackCalled = false;
+
+  // select none
+  DevelTextField::SelectNone(field);
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_CHECK(gSelectionChangedCallbackCalled);
+  DALI_TEST_EQUALS(oldSelectionStart, 0, TEST_LOCATION);
+  DALI_TEST_EQUALS(oldSelectionEnd, 23, TEST_LOCATION);
 
   END_TEST;
 }
 
-int UtcDaliTextFieldEnableEditing(void)
+int UtcDaliToolkitTextFieldStrikethroughGeneration(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" UtcDaliTextFieldEnableEditing ");
+  tet_infoline(" UtcDaliToolkitTextFieldStrikethroughGeneration");
 
   TextField textField = TextField::New();
+  textField.SetProperty( TextField::Property::TEXT, "Test" );
+  textField.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 100.f ) );
+  textField.SetProperty( TextField::Property::POINT_SIZE, 10) ;
+  textField.SetProperty( TextField::Property::FONT_FAMILY, "DejaVu Sans");
 
   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.SetKeyInputFocus();
-  textField.SetProperty( DevelTextField::Property::ENABLE_EDITING, false );
-  application.ProcessEvent( GenerateKey( "D", "", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::DOWN, "D", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
-
-  // Render and notify
   application.SendNotification();
   application.Render();
 
-  DALI_TEST_EQUALS( textField.GetProperty( TextField::Property::TEXT ).Get<std::string>(), "", TEST_LOCATION );
-  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::ENABLE_EDITING ).Get<bool>(), false, TEST_LOCATION );
+  Property::Map strikethroughMapSet;
+  Property::Map strikethroughMapGet;
 
+  strikethroughMapSet.Insert( "enable", true );
+  strikethroughMapSet.Insert( "color", Color::RED );
+  strikethroughMapSet.Insert( "height", 2.0f );
 
-  textField.SetKeyInputFocus();
-  textField.SetProperty( DevelTextField::Property::ENABLE_EDITING, true );
-  application.ProcessEvent( GenerateKey( "D", "", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::DOWN, "D", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+  // Check the strikethrough property
+  textField.SetProperty( DevelTextField::Property::STRIKETHROUGH, strikethroughMapSet );
+  strikethroughMapGet = textField.GetProperty<Property::Map>( DevelTextField::Property::STRIKETHROUGH );
+  textField.SetProperty( TextField::Property::TEXT, "Test1" );
+  DALI_TEST_EQUALS( strikethroughMapGet.Count(), strikethroughMapSet.Count(), TEST_LOCATION );
+  DALI_TEST_EQUALS( DaliTestCheckMaps( strikethroughMapGet, strikethroughMapSet ), true, TEST_LOCATION );
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
-  DALI_TEST_EQUALS( textField.GetProperty( TextField::Property::TEXT ).Get<std::string>(), "D", TEST_LOCATION );
-  DALI_TEST_EQUALS( textField.GetProperty( DevelTextField::Property::ENABLE_EDITING ).Get<bool>(), true, TEST_LOCATION );
+  strikethroughMapSet.Clear();
+  strikethroughMapGet.Clear();
 
   END_TEST;
 }
 
-int UtcDaliToolkitTextFieldFontSizeScale(void)
+int UtcDaliToolkitTextFieldInputStrikethroughGeneration(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" UtcDaliToolkitTextFieldFontSizeScale");
+  tet_infoline(" UtcDaliToolkitTextFieldInputStrikethroughGeneration");
 
   TextField textField = TextField::New();
-  textField.SetProperty( TextField::Property::POINT_SIZE, 30.f );
   textField.SetProperty( TextField::Property::TEXT, "Test" );
-  Vector3 nonScaledSize = textField.GetNaturalSize();
-
-  TextField textFieldScaled = TextField::New();
-  textFieldScaled.SetProperty( TextField::Property::POINT_SIZE, 15.f );
-  textFieldScaled.SetProperty( Toolkit::DevelTextField::Property::FONT_SIZE_SCALE, 2.f );
-  textFieldScaled.SetProperty( TextField::Property::TEXT, "Test" );
-  Vector3 scaledSize = textFieldScaled.GetNaturalSize();
+  textField.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 100.f ) );
+  textField.SetProperty( TextField::Property::POINT_SIZE, 10) ;
+  textField.SetProperty( TextField::Property::FONT_FAMILY, "DejaVu Sans");
 
-  DALI_TEST_EQUALS( nonScaledSize, scaledSize, TEST_LOCATION );
+  application.GetScene().Add( textField );
+  application.SendNotification();
+  application.Render();
 
-  textField.SetProperty( TextField::Property::PIXEL_SIZE, 30.f );
-  textField.SetProperty( TextField::Property::TEXT, "Test" );
-  nonScaledSize = textField.GetNaturalSize();
+  std::string strikethroughSettings1( "{\"enable\":\"true\",\"color\":\"red\",\"height\":\"2\"}" );
 
-  textFieldScaled.SetProperty( TextField::Property::PIXEL_SIZE, 15.f );
-  textFieldScaled.SetProperty( Toolkit::DevelTextField::Property::FONT_SIZE_SCALE, 2.f );
-  textFieldScaled.SetProperty( TextField::Property::TEXT, "Test" );
-  scaledSize = textFieldScaled.GetNaturalSize();
+  // Check the strikethrough property
+  textField.SetProperty( DevelTextField::Property::INPUT_STRIKETHROUGH, strikethroughSettings1 );
+  textField.SetProperty( TextField::Property::TEXT, "Test1" );
+  DALI_TEST_EQUALS( textField.GetProperty<std::string>( DevelTextField::Property::INPUT_STRIKETHROUGH ), strikethroughSettings1, TEST_LOCATION );
 
-  DALI_TEST_EQUALS( nonScaledSize, scaledSize, TEST_LOCATION );
+  // Render and notify
+  application.SendNotification();
+  application.Render();
 
   END_TEST;
 }