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-Button.cpp;h=ead898d941a48be1f0a39d0227ee10998547596e;hp=5aff1464b572a3f85539eaa4a259665448db8902;hb=afe38927f068846eaa02c374430da05f6209a6f9;hpb=d00a250741411c386d988e7ac34525cf94a1918e 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; +}