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-ToggleButton.cpp;h=6d3424ebfd20986b1d34e3a35c6e1c565d80e358;hp=230bdb87929557c4d4aadebc354b860b944dced9;hb=8a647e87a01c5c78451653c1264a9eea81ac9b20;hpb=5e937a6322849b76d49d5b3f41cb5d91c94acd3e diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ToggleButton.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ToggleButton.cpp old mode 100755 new mode 100644 index 230bdb8..6d3424e --- a/automated-tests/src/dali-toolkit/utc-Dali-ToggleButton.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ToggleButton.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -74,7 +74,7 @@ Dali::Integration::Point GetPointUpInside() int UtcDaliToggleButtonConstructorP(void) { - TestApplication application; + ToolkitTestApplication application; tet_infoline(" UtcDaliToggleButtonConstructorP"); ToggleButton button; @@ -84,7 +84,7 @@ int UtcDaliToggleButtonConstructorP(void) int UtcDaliToggleButtonCopyConstructorP(void) { - TestApplication application; + ToolkitTestApplication application; tet_infoline(" UtcDaliToggleButtonCopyConstructorP"); // Initialize an object, ref count == 1 @@ -97,7 +97,7 @@ int UtcDaliToggleButtonCopyConstructorP(void) int UtcDaliToggleButtonAssignmentOperatorP(void) { - TestApplication application; + ToolkitTestApplication application; tet_infoline(" UtcDaliToggleButtonAssignmentOperatorP"); ToggleButton button = ToggleButton::New(); @@ -128,7 +128,7 @@ int UtcDaliToggleButtonNewP(void) DALI_TEST_CHECK( toggleButton2 == toggleButton ); //Additional check to ensure object is created by checking if it's registered - ObjectRegistry registry = Stage::GetCurrent().GetObjectRegistry(); + ObjectRegistry registry = application.GetCore().GetObjectRegistry(); DALI_TEST_CHECK( registry ); gObjectCreatedCallBackCalled = false; @@ -171,10 +171,10 @@ int UtcDaliToggleButtonToggleStatesProperty(void) // Create the ToggleButton actor ToggleButton toggleButton = ToggleButton::New(); - Stage::GetCurrent().Add( toggleButton ); + application.GetScene().Add( toggleButton ); toggleButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); toggleButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT); - toggleButton.SetPosition( 0.0f, 0.0f ); + toggleButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f )); {// Check empty array Property::Array toggleIcons; @@ -252,10 +252,10 @@ int UtcDaliToggleButtonToggleTipsProperty( void ) // Create the ToggleButton actor ToggleButton toggleButton = ToggleButton::New(); - Stage::GetCurrent().Add( toggleButton ); + application.GetScene().Add( toggleButton ); toggleButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); toggleButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT); - toggleButton.SetPosition( 0.0f, 0.0f ); + toggleButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f )); { // Check empty tip array Property::Array toggleIcons; @@ -311,11 +311,11 @@ int UtcDaliToggleButtonStateChange(void) // Create the ToggleButton actor ToggleButton toggleButton = ToggleButton::New(); - Stage::GetCurrent().Add( toggleButton ); + application.GetScene().Add( toggleButton ); toggleButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); toggleButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT); - toggleButton.SetPosition( BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS ); - toggleButton.SetSize( BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS ); + toggleButton.SetProperty( Actor::Property::POSITION, BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS ); + toggleButton.SetProperty( Actor::Property::SIZE, BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS ); Property::Array toggleIcons; toggleIcons.PushBack( TEST_IMAGE_ONE ); //Icons path @@ -381,4 +381,4 @@ int UtcDaliToggleButtonStateChange(void) DALI_TEST_EQUALS( index, 0, TEST_LOCATION ); END_TEST; -} \ No newline at end of file +}