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-EffectsView.cpp;h=fbaa3de9acf820556526367c51f5a4185dd1e576;hp=2cce946f7f903a2610f005db19930496024bf11a;hb=268f651469300b3950b3f314fa33803b6c24273e;hpb=ad110f27c01af7e617df158891eef5cf60bf22e6 diff --git a/automated-tests/src/dali-toolkit/utc-Dali-EffectsView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-EffectsView.cpp index 2cce946..fbaa3de 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-EffectsView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-EffectsView.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. @@ -45,7 +45,7 @@ int UtcDaliEffectsViewNew(void) view = EffectsView::New( EffectsView::DROP_SHADOW ); DALI_TEST_CHECK( view ); - Stage::GetCurrent().Add( view ); + application.GetScene().Add( view ); view.Reset(); view = EffectsView::New( EffectsView::EMBOSS ); @@ -106,21 +106,21 @@ int UtcDaliEffectsViewAddRemoveDropShadow(void) DALI_TEST_CHECK( view ); Actor actor = Actor::New(); - DALI_TEST_CHECK( !actor.OnStage() ); + DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) ); view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); - view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize()); + view.SetProperty( Actor::Property::SIZE, application.GetScene().GetSize()); view.Add(actor); - Stage::GetCurrent().Add(view); + application.GetScene().Add(view); - DALI_TEST_CHECK( actor.OnStage() ); + DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) ); DALI_TEST_CHECK( actor.GetParent() ); DALI_TEST_CHECK( actor.GetParent() != view ); view.Remove(actor); - DALI_TEST_CHECK( !actor.OnStage() ); + DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) ); END_TEST; } @@ -133,7 +133,7 @@ int UtcDaliEffectsViewAddRemoveEmboss(void) tet_infoline("Checking number of render tasks = 1"); application.SendNotification(); application.Render(); - Stage stage = Stage::GetCurrent(); + Integration::Scene stage = application.GetScene(); DALI_TEST_EQUALS( stage.GetRenderTaskList().GetTaskCount(), 1, TEST_LOCATION ); tet_infoline("Create effects view"); @@ -153,7 +153,7 @@ int UtcDaliEffectsViewAddRemoveEmboss(void) Actor actor = Actor::New(); actor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); - DALI_TEST_CHECK( !actor.OnStage() ); + DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) ); view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); @@ -162,7 +162,7 @@ int UtcDaliEffectsViewAddRemoveEmboss(void) stage.Add(view); - DALI_TEST_CHECK( actor.OnStage() ); + DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) ); application.SendNotification(); application.Render(); @@ -208,7 +208,7 @@ int UtcDaliEffectsViewOnStage(void) EffectsView view = EffectsView::New(EffectsView::EMBOSS); view.SetProperty( Actor::Property::SIZE, Vector2(100.f, 100.f) ); - Stage stage = Stage::GetCurrent(); + Integration::Scene stage = application.GetScene(); DALI_TEST_CHECK( stage.GetRenderTaskList().GetTaskCount() == 1 ); stage.Add( view ); @@ -225,7 +225,7 @@ int UtcDaliEffectsViewOffStage(void) EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW); view.SetProperty( Actor::Property::SIZE, Vector2(100.f, 100.f) ); - Stage stage = Stage::GetCurrent(); + Integration::Scene stage = application.GetScene(); DALI_TEST_CHECK( stage.GetRenderTaskList().GetTaskCount() == 1 ); stage.Add( view ); @@ -336,7 +336,7 @@ int UtcDaliEffectsViewOffsetProperty(void) ToolkitTestApplication application; EffectsView view = EffectsView::New( EffectsView::EMBOSS ); - Stage::GetCurrent().Add( view ); + application.GetScene().Add( view ); Property::Value value = view.GetProperty( EffectsView::Property::EFFECT_OFFSET ); Vector3 offsetValue; @@ -371,7 +371,7 @@ int UtcDaliEffectsViewColorProperty(void) ToolkitTestApplication application; EffectsView view = EffectsView::New( EffectsView::DROP_SHADOW ); - Stage::GetCurrent().Add( view ); + application.GetScene().Add( view ); Property::Value value = view.GetProperty( EffectsView::Property::EFFECT_COLOR ); Vector4 colorValue; @@ -459,7 +459,7 @@ int UtcDaliEffectsViewSetRefreshOnDemandP(void) EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW); view.SetProperty( Actor::Property::SIZE, Vector2(100.f, 100.f) ); - Stage stage = Stage::GetCurrent(); + Integration::Scene stage = application.GetScene(); stage.Add( view ); application.SendNotification(); application.Render(); @@ -497,7 +497,7 @@ int UtcDaliEffectsViewSetRefreshOnDemandN(void) int UtcDaliEffectsViewSizeSet(void) { ToolkitTestApplication application; - Stage stage = Stage::GetCurrent(); + Integration::Scene stage = application.GetScene(); { EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW);