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-TextEditor.cpp;h=18225bb13cfc0db7c0f9f38c97dc62321a925cec;hp=b01a27f1878098f7139c9e8fe1b42bb28c042e92;hb=60d99d04d7677a1b91d4f2fdd9e74bc5e1b5e7bf;hpb=db577f5da5695be7d4e6e884e735cc9f0c7f487c diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp index b01a27f..18225bb 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp @@ -1745,6 +1745,13 @@ int utcDaliTextEditorEvent03(void) application.SendNotification(); application.Render(); + // Pan Press + TestGenerateMiniPan(application); + + // Render and notify + application.SendNotification(); + application.Render(); + END_TEST; } @@ -2416,6 +2423,15 @@ int utcDaliTextEditorHandles(void) application.SendNotification(); application.Render(); + // Pan the grab handle + uint32_t time = 100; + TestStartPan( application, Vector2(10.0f, 50.0f), Vector2(10.0f, 50.0f), time ); + TestMovePan( application, Vector2(10.0f, 30.0f), time ); + TestEndPan( application, Vector2(10.0f, 50.0f), time); + application.SendNotification(); + application.Render(); + + // Release the grab handle. event = Dali::Integration::TouchEvent(); event.AddPoint( GetPointUpInside( touchPos ) ); @@ -2829,3 +2845,30 @@ int utcDaliTextEditorMaxCharactersReached(void) END_TEST; } + +int UtcDaliTextEditorSelectRange(void) +{ + ToolkitTestApplication application; + tet_infoline("utcDaliTextEditorSelectRange"); + + TextEditor textEditor = TextEditor::New(); + DALI_TEST_CHECK( textEditor ); + + application.GetScene().Add( textEditor ); + + // Avoid a crash when core load gl resources. + application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE ); + + application.SendNotification(); + application.Render(); + + textEditor.SetProperty( TextEditor::Property::TEXT, "Hello world" ); + + textEditor.SetProperty( DevelTextEditor::Property::SELECTED_TEXT_START, 0 ); + textEditor.SetProperty( DevelTextEditor::Property::SELECTED_TEXT_END, 5 ); + + DALI_TEST_EQUALS( textEditor.GetProperty( DevelTextEditor::Property::SELECTED_TEXT_START ).Get(), 0, TEST_LOCATION ); + DALI_TEST_EQUALS( textEditor.GetProperty( DevelTextEditor::Property::SELECTED_TEXT_END ).Get(), 5, TEST_LOCATION ); + + END_TEST; +} \ No newline at end of file