X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-Button.cpp;h=ead898d941a48be1f0a39d0227ee10998547596e;hb=4107c0f5ea45cd9e4e61d30c30e99de0e00287fc;hp=5aff1464b572a3f85539eaa4a259665448db8902;hpb=958bd01cb1bc4cf43cbe740a7b041927d9d34ed6;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Button.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Button.cpp index 5aff146..ead898d 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-Button.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-Button.cpp @@ -972,3 +972,38 @@ int UtcDaliButtonSetUnSelectedColorP(void) END_TEST; } +int UtcDaliButtonResetSelectedColorP(void) +{ + ToolkitTestApplication application; + tet_infoline(" UtcDaliButtonSetSelectedColorP"); + + PushButton pushButton = PushButton::New(); + Stage::GetCurrent().Add( pushButton ); + + application.SendNotification(); + application.Render(); + + const Vector4 FIRST_COLOR = Color::BLUE; + const Vector4 SECOND_COLOR = Color::BLUE; + + pushButton.SetSize( Vector2( 20.0f, 20.0f ) ); + pushButton.SetProperty( Button::Property::SELECTED_COLOR, FIRST_COLOR ); + + application.SendNotification(); + application.Render(); + + Vector4 color = pushButton.GetProperty( Button::Property::SELECTED_COLOR ); + + DALI_TEST_EQUALS( color, FIRST_COLOR, TEST_LOCATION ); + + pushButton.SetProperty( Button::Property::SELECTED_COLOR, SECOND_COLOR ); + + application.SendNotification(); + application.Render(); + + color = pushButton.GetProperty( Button::Property::SELECTED_COLOR ); + + DALI_TEST_EQUALS( color, SECOND_COLOR, TEST_LOCATION ); + + END_TEST; +}