X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit-unmanaged%2Futc-Dali-CheckBoxButton.cpp;h=f0169006b8af8f9abe8b2d6f6eddd100bcc9e35c;hb=19861d578c48671e9b58bd67345b709273c3e031;hp=96c468a56ce1426d79ea63677104f03bceb05b54;hpb=fa6279fb2830427d5ab569ca14e6ade1557ef2fa;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-CheckBoxButton.cpp b/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-CheckBoxButton.cpp index 96c468a..f016900 100644 --- a/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-CheckBoxButton.cpp +++ b/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-CheckBoxButton.cpp @@ -1,18 +1,19 @@ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Flora License, Version 1.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://floralicense.org/license/ -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an AS IS BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #include #include @@ -26,9 +27,9 @@ namespace { static bool gCheckBoxButtonState = false; -bool CheckBoxButtonClicked( Button button ) +bool CheckBoxButtonClicked( Button button, bool state ) { - gCheckBoxButtonState = static_cast( button ).IsChecked(); + gCheckBoxButtonState = state; return true; } @@ -74,7 +75,7 @@ int UtcDaliCheckBoxButtonSetGetChecked(void) tet_infoline(" UtcDaliCheckBoxButtonSetGetChecked"); CheckBoxButton checkBoxButton = CheckBoxButton::New(); - checkBoxButton.ClickedSignal().Connect( &CheckBoxButtonClicked ); + checkBoxButton.StateChangedSignal().Connect( &CheckBoxButtonClicked ); // global var used to check if CheckBoxButtonClicked is called; gCheckBoxButtonState = false; @@ -167,42 +168,42 @@ int UtcDaliCheckBoxButtonSetImages(void) DALI_TEST_EQUALS( size.width, 40.f, TEST_LOCATION ); DALI_TEST_EQUALS( size.height, 40.f, TEST_LOCATION ); - checkBoxButton.SetDimmedBackgroundImage( image03 ); + checkBoxButton.SetDisabledBackgroundImage( image03 ); application.SendNotification(); application.Render(); - size = checkBoxButton.GetDimmedBackgroundImage().GetCurrentSize(); + size = checkBoxButton.GetDisabledBackgroundImage().GetCurrentSize(); DALI_TEST_EQUALS( size.width, 50.f, TEST_LOCATION ); DALI_TEST_EQUALS( size.height, 50.f, TEST_LOCATION ); - checkBoxButton.SetDimmedBackgroundImage( imageActor03 ); + checkBoxButton.SetDisabledBackgroundImage( imageActor03 ); application.SendNotification(); application.Render(); - size = checkBoxButton.GetDimmedBackgroundImage().GetCurrentSize(); + size = checkBoxButton.GetDisabledBackgroundImage().GetCurrentSize(); DALI_TEST_EQUALS( size.width, 60.f, TEST_LOCATION ); DALI_TEST_EQUALS( size.height, 60.f, TEST_LOCATION ); - checkBoxButton.SetDimmedCheckedImage( image04 ); + checkBoxButton.SetDisabledCheckedImage( image04 ); application.SendNotification(); application.Render(); - size = checkBoxButton.GetDimmedCheckedImage().GetCurrentSize(); + size = checkBoxButton.GetDisabledCheckedImage().GetCurrentSize(); DALI_TEST_EQUALS( size.width, 70.f, TEST_LOCATION ); DALI_TEST_EQUALS( size.height, 70.f, TEST_LOCATION ); - checkBoxButton.SetDimmedCheckedImage( imageActor04 ); + checkBoxButton.SetDisabledCheckedImage( imageActor04 ); application.SendNotification(); application.Render(); - size = checkBoxButton.GetDimmedCheckedImage().GetCurrentSize(); + size = checkBoxButton.GetDisabledCheckedImage().GetCurrentSize(); DALI_TEST_EQUALS( size.width, 80.f, TEST_LOCATION ); DALI_TEST_EQUALS( size.height, 80.f, TEST_LOCATION );