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-TextSelectionPopup.cpp;h=2cee1b52f3fc319099dd7195d93e3d7ed8dbc168;hp=f6f973062bbc11d445d6fa0d513279a42ae13b09;hb=9aece33ac67480cc57ed5d86ab4370fe313330ee;hpb=9d09b345fbdef7a0532f5b45ffe65754f87258c6;ds=sidebyside diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextSelectionPopup.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextSelectionPopup.cpp index f6f9730..2cee1b5 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextSelectionPopup.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextSelectionPopup.cpp @@ -20,6 +20,7 @@ #include #include #include +#include using namespace Dali; using namespace Toolkit; @@ -105,3 +106,37 @@ int UtcDaliToolkitTextSelectionPopupDownCastP(void) END_TEST; } + +// TextSelectionToolBar is used TextSelectionPopup, below tests it individually + +int UtcDaliToolkitTextSelectionToolBarP(void) +{ + + // Creates Toolbar, adds 2 options and a divider then resizes divider + ToolkitTestApplication application; + + TextSelectionToolbar toolbar = TextSelectionToolbar::New(); + + toolbar.SetProperty( Toolkit::TextSelectionToolbar::Property::MAX_SIZE, Size( 100.0f, 60.0f) ); + + Toolkit::PushButton option = Toolkit::PushButton::New(); + option.SetName( "test-option" ); + option.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); + toolbar.AddOption( option ); + + Toolkit::Control divider = Toolkit::Control::New(); + divider.SetSize( 2.0f, 0.0f ); + divider.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::HEIGHT ); + toolbar.AddDivider( divider ); + + Toolkit::PushButton option2 = Toolkit::PushButton::New(); + option2.SetName( "test-option-2" ); + option2.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); + toolbar.AddOption( option2 ); + + Size newSize = Size(3.0f, 0.0f); + toolbar.ResizeDividers( newSize ); + + DALI_TEST_CHECK( toolbar ); + END_TEST; +}