X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-TextField.cpp;h=a8f2c9dc8f1aca1ac75e140fcd0f1a75c5dd58a0;hp=07f1cac4ea65b5e9dd2621c9964a92bd6130aaff;hb=05456785d7bfcc34f1bee09df6b30ceb8f6ff24f;hpb=c20463e1d4a77117810c67adfec49bcdfab5efde diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp index 07f1cac..a8f2c9d 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -1631,6 +1632,12 @@ int utcDaliTextFieldEvent01(void) 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, 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, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) ); application.ProcessEvent( GenerateKey( "a", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );