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-ControlWrapper.cpp;h=120f6b0888f2770ea425486130bb09b885640080;hp=e575bcae1312182e50d0e62abe1e33b103d9599c;hb=e9e0a004027846f001ca87c1db13c811177c8f70;hpb=d37f5d8ff0d554b566dfbcdc765a681123cbf4e8 diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ControlWrapper.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ControlWrapper.cpp index e575bca..120f6b0 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ControlWrapper.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ControlWrapper.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 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. @@ -319,7 +319,7 @@ int UtcDaliControlWrapperRelayoutRequest(void) Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT ); ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl ); - Stage::GetCurrent().Add( controlWrapper ); + application.GetScene().Add( controlWrapper ); application.SendNotification(); application.Render(); @@ -425,7 +425,7 @@ int UtcDaliControlWrapperRegisterVisualToSelf(void) { ToolkitTestApplication application; - Test::ObjectDestructionTracker objectDestructionTracker; + Test::ObjectDestructionTracker objectDestructionTracker( application.GetCore().GetObjectRegistry() ); { Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT ); @@ -461,7 +461,7 @@ int UtcDaliControlWrapperRegisterVisualWithDepthIndexToSelf(void) { ToolkitTestApplication application; - Test::ObjectDestructionTracker objectDestructionTracker; + Test::ObjectDestructionTracker objectDestructionTracker( application.GetCore().GetObjectRegistry() ); { Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT ); @@ -519,7 +519,7 @@ int UtcDaliControlWrapperRegisterDisabledVisual(void) DALI_TEST_EQUALS( controlWrapperImpl->GetVisual( TEST_PROPERTY ), visual, TEST_LOCATION ); DALI_TEST_EQUALS( controlWrapperImpl->IsVisualEnabled( TEST_PROPERTY ), false, TEST_LOCATION ); - Stage::GetCurrent().Add( controlWrapper ); + application.GetScene().Add( controlWrapper ); // Render and notify application.SendNotification(); @@ -562,7 +562,7 @@ int UtcDaliControlWrapperRegisterDisabledVisualWithDepthIndex(void) DALI_TEST_EQUALS( controlWrapperImpl->IsVisualEnabled( TEST_PROPERTY ), false, TEST_LOCATION ); DALI_TEST_EQUALS( visual.GetDepthIndex(), 10, TEST_LOCATION ); - Stage::GetCurrent().Add( controlWrapper ); + application.GetScene().Add( controlWrapper ); // Render and notify application.SendNotification(); @@ -635,7 +635,7 @@ int UtcDaliControlWrapperTransitionDataMap1N(void) controlWrapper.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS); controlWrapper.SetProperty( Dali::Actor::Property::NAME,"Actor1"); controlWrapper.SetProperty( Actor::Property::COLOR,Color::CYAN); - Stage::GetCurrent().Add(controlWrapper); + application.GetScene().Add(controlWrapper); Animation anim = controlWrapperImpl->CreateTransition( transition ); DALI_TEST_CHECK( ! anim ); @@ -697,7 +697,7 @@ int UtcDaliControlWrapperTestControlProperties(void) Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT ); ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl ); - Stage::GetCurrent().Add( controlWrapper ); + application.GetScene().Add( controlWrapper ); // "background" property Property::Map rendererMap; @@ -749,7 +749,7 @@ int UtcDaliControlWrapperAnimateVisual(void) tet_infoline("Test that the control wrapper's visuals can be animated by name when registered"); ToolkitTestApplication application; - Test::ObjectDestructionTracker objectDestructionTracker; + Test::ObjectDestructionTracker objectDestructionTracker( application.GetCore().GetObjectRegistry() ); { Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT ); @@ -774,7 +774,7 @@ int UtcDaliControlWrapperAnimateVisual(void) // Register to self controlWrapperImpl->TestRegisterVisual( index, visual ); - Stage::GetCurrent().Add( controlWrapper ); + application.GetScene().Add( controlWrapper ); controlWrapper.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) ); application.SendNotification(); application.Render(0); // Trigger animation start @@ -812,7 +812,7 @@ int UtcDaliControlWrapperAnimateVisual(void) DALI_TEST_EQUALS( objectDestructionTracker.IsDestroyed(), false, TEST_LOCATION ); // Control not destroyed yet DALI_TEST_EQUALS( controlWrapperImpl->GetVisual( index ), visual, TEST_LOCATION ); - Stage::GetCurrent().Remove( controlWrapper ); + application.GetScene().Remove( controlWrapper ); } DALI_TEST_EQUALS( objectDestructionTracker.IsDestroyed(), true, TEST_LOCATION ); // Should be destroyed