X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-Control.cpp;h=bfb390cb6cc7441e9a168a06878a7156d920547b;hb=2019141bbcd901c7096f42caa9aa5ebb1324c983;hp=ffe1ee73cfb3a712d8a139422628d60747747ad8;hpb=ca4209fb071e5c353a7e528098a2e497765118d8;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Control.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Control.cpp index ffe1ee7..bfb390c 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-Control.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-Control.cpp @@ -865,3 +865,53 @@ int UtcDaliControlResourcesReady(void) END_TEST; } + +int UtcDaliControlMarginProperty(void) +{ + ToolkitTestApplication application; + + Control control = Control::New(); + control.SetBackgroundColor( Color::BLUE ); + + control.SetProperty( Control::Property::MARGIN, Extents( 20, 10, 0, 0 ) ); + + Stage::GetCurrent().Add( control ); + + application.SendNotification(); + application.Render(); + + DALI_TEST_EQUALS( control.GetProperty( Control::Property::MARGIN ), Extents( 20, 10, 0, 0 ), TEST_LOCATION ); + + // Parent control has one ImageView as a Child. + ImageView image = ImageView::New(); + image.SetBackgroundColor( Color::RED ); + image.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); + image.SetProperty( Control::Property::PADDING, Extents( 10, 10, 10, 10 ) ); + control.Add( image ); + + application.SendNotification(); + application.Render(); + + DALI_TEST_EQUALS( image.GetProperty( Control::Property::PADDING ), Extents( 10, 10, 10, 10 ), TEST_LOCATION ); + + END_TEST; +} + +int UtcDaliControlPaddingProperty(void) +{ + ToolkitTestApplication application; + + Control control = Control::New(); + control.SetBackgroundColor( Color::BLUE ); + + control.SetProperty( Control::Property::PADDING, Extents( 10, 10, 10, 10 ) ); + + Stage::GetCurrent().Add( control ); + + application.SendNotification(); + application.Render(); + + DALI_TEST_EQUALS( control.GetProperty( Control::Property::PADDING ), Extents( 10, 10, 10, 10 ), TEST_LOCATION ); + + END_TEST; +}