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=b86f96b36c59badd5f8cff304b7e7b54280179a1;hp=48c2bcc95dd7c6d564a023c0dc97c51d4c826691;hb=9b354691eaa778b98da70233ec7124d97e10ea34;hpb=a2c1293114a5e1ab31bf6bcea8d6574ccaf1fcfb diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp index 48c2bcc..b86f96b 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -3836,6 +3837,9 @@ int UtcDaliTextFieldEnableEditing(void) application.SendNotification(); application.Render(); + textField.SetProperty(DevelActor::Property::USER_INTERACTION_ENABLED, true); + DALI_TEST_EQUALS(textField.GetProperty(DevelActor::Property::USER_INTERACTION_ENABLED).Get(), true, TEST_LOCATION); + 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)); @@ -3858,6 +3862,24 @@ int UtcDaliTextFieldEnableEditing(void) DALI_TEST_EQUALS(textField.GetProperty(TextField::Property::TEXT).Get(), "D", TEST_LOCATION); DALI_TEST_EQUALS(textField.GetProperty(DevelTextField::Property::ENABLE_EDITING).Get(), true, TEST_LOCATION); + // Check the user interaction enabled and for coverage + DevelTextField::SelectWholeText(textField); + + // Render and notify + application.SendNotification(); + application.Render(); + + textField.SetKeyInputFocus(); + textField.SetProperty(DevelActor::Property::USER_INTERACTION_ENABLED, 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(), "D", TEST_LOCATION); + DALI_TEST_EQUALS(textField.GetProperty(DevelActor::Property::USER_INTERACTION_ENABLED).Get(), false, TEST_LOCATION); + END_TEST; }