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-ScrollBar.cpp;h=c287c5e9555f7e94bd880ae7f23acc20e15020e8;hp=94137239ea3b24968ae07cfc02ba8dd9c4839150;hb=268f651469300b3950b3f314fa33803b6c24273e;hpb=5e937a6322849b76d49d5b3f41cb5d91c94acd3e diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ScrollBar.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ScrollBar.cpp index 9413723..c287c5e 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ScrollBar.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ScrollBar.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. @@ -19,8 +19,10 @@ #include #include #include +#include "dali-toolkit-test-utils/toolkit-timer.h" #include #include +#include using namespace Dali; using namespace Toolkit; @@ -115,6 +117,8 @@ static Vector2 PerformGestureSwipe(ToolkitTestApplication& application, Vector2 for(int i = 0; i < frames; i++) { + Test::EmitGlobalTimerSignal(); + pos += direction; // Move in this direction time += RENDER_FRAME_INTERVAL; TestMovePan( application, pos, time); @@ -185,20 +189,20 @@ int UtcDaliToolkitScrollBarNewP(void) DALI_TEST_CHECK( scrollBar ); END_TEST; - ScrollBar vertical = ScrollBar::New(ScrollBar::Vertical); + ScrollBar vertical = ScrollBar::New(ScrollBar::VERTICAL); DALI_TEST_CHECK( vertical ); - DALI_TEST_CHECK( vertical.GetScrollDirection() == ScrollBar::Vertical ); + DALI_TEST_CHECK( vertical.GetScrollDirection() == ScrollBar::VERTICAL ); Property::Value value = vertical.GetProperty(ScrollBar::Property::SCROLL_DIRECTION); std::string scrollDirection = value.Get(); - DALI_TEST_EQUALS( scrollDirection, "Vertical", TEST_LOCATION ); + DALI_TEST_EQUALS( scrollDirection, "VERTICAL", TEST_LOCATION ); - ScrollBar horizontal = ScrollBar::New(ScrollBar::Horizontal); + ScrollBar horizontal = ScrollBar::New(ScrollBar::HORIZONTAL); DALI_TEST_CHECK( horizontal ); - DALI_TEST_CHECK( horizontal.GetScrollDirection() == ScrollBar::Horizontal ); + DALI_TEST_CHECK( horizontal.GetScrollDirection() == ScrollBar::HORIZONTAL ); value = vertical.GetProperty(ScrollBar::Property::SCROLL_DIRECTION); scrollDirection = value.Get(); - DALI_TEST_EQUALS( scrollDirection, "Horizontal", TEST_LOCATION ); + DALI_TEST_EQUALS( scrollDirection, "HORIZONTAL", TEST_LOCATION ); END_TEST; } @@ -219,17 +223,17 @@ int UtcDaliToolkitScrollBarCreateP(void) ScrollBar scrollBar = ScrollBar::DownCast( handle ); DALI_TEST_CHECK( scrollBar ); - scrollBar.SetProperty(ScrollBar::Property::SCROLL_DIRECTION, "Vertical"); - scrollBar.SetProperty(ScrollBar::Property::INDICATOR_HEIGHT_POLICY, "Fixed"); + scrollBar.SetProperty(ScrollBar::Property::SCROLL_DIRECTION, "VERTICAL"); + scrollBar.SetProperty(ScrollBar::Property::INDICATOR_HEIGHT_POLICY, "FIXED"); - DALI_TEST_EQUALS( scrollBar.GetScrollDirection(), Toolkit::ScrollBar::Vertical, TEST_LOCATION ); - DALI_TEST_EQUALS( scrollBar.GetIndicatorHeightPolicy(), Toolkit::ScrollBar::Fixed, TEST_LOCATION ); + DALI_TEST_EQUALS( scrollBar.GetScrollDirection(), Toolkit::ScrollBar::VERTICAL, TEST_LOCATION ); + DALI_TEST_EQUALS( scrollBar.GetIndicatorHeightPolicy(), Toolkit::ScrollBar::FIXED, TEST_LOCATION ); - scrollBar.SetProperty(ScrollBar::Property::SCROLL_DIRECTION, "Horizontal"); - scrollBar.SetProperty(ScrollBar::Property::INDICATOR_HEIGHT_POLICY, "Variable"); + scrollBar.SetProperty(ScrollBar::Property::SCROLL_DIRECTION, "HORIZONTAL"); + scrollBar.SetProperty(ScrollBar::Property::INDICATOR_HEIGHT_POLICY, "VARIABLE"); - DALI_TEST_EQUALS( scrollBar.GetScrollDirection(), Toolkit::ScrollBar::Horizontal, TEST_LOCATION ); - DALI_TEST_EQUALS( scrollBar.GetIndicatorHeightPolicy(), Toolkit::ScrollBar::Variable, TEST_LOCATION ); + DALI_TEST_EQUALS( scrollBar.GetScrollDirection(), Toolkit::ScrollBar::HORIZONTAL, TEST_LOCATION ); + DALI_TEST_EQUALS( scrollBar.GetIndicatorHeightPolicy(), Toolkit::ScrollBar::VARIABLE, TEST_LOCATION ); END_TEST; } @@ -267,17 +271,17 @@ int UtcDaliToolkitScrollBarSetScrollPropertySourceP(void) ToolkitTestApplication application; // Create a vertical scroll bar - ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical); + ScrollBar scrollBar = ScrollBar::New(ScrollBar::VERTICAL); DALI_TEST_CHECK( scrollBar ); - DALI_TEST_CHECK( scrollBar.GetScrollDirection() == ScrollBar::Vertical ); + DALI_TEST_CHECK( scrollBar.GetScrollDirection() == ScrollBar::VERTICAL ); float scrollBarHeight = 100.0f; - scrollBar.SetSize(20.0f, scrollBarHeight, 0.0f); - Stage::GetCurrent().Add( scrollBar ); + scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, scrollBarHeight, 0.0f) ); + application.GetScene().Add( scrollBar ); // Create a source actor that owns the scroll properties required by the scroll bar Actor sourceActor = Actor::New(); - Stage::GetCurrent().Add( sourceActor ); + application.GetScene().Add( sourceActor ); // Register the scroll properties Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f ); @@ -355,7 +359,7 @@ int UtcDaliToolkitScrollBarSetScrollPropertySourceP(void) // Create another source actor Actor newSourceActor = Actor::New(); - Stage::GetCurrent().Add( newSourceActor ); + application.GetScene().Add( newSourceActor ); // Register the scroll properties Property::Index newPropertyScrollPosition = newSourceActor.RegisterProperty( "sourcePosition", 0.0f ); @@ -512,14 +516,14 @@ int UtcDaliToolkitScrollBarSetScrollPositionIntervalsP(void) ToolkitTestApplication application; // Create a vertical scroll bar - ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical); + ScrollBar scrollBar = ScrollBar::New(ScrollBar::VERTICAL); DALI_TEST_CHECK( scrollBar ); scrollBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); scrollBar.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); - scrollBar.SetSize(20.0f, 800.0f, 0.0f); + scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) ); - Stage::GetCurrent().Add( scrollBar ); + application.GetScene().Add( scrollBar ); // Connect to the ScrollPositionIntervalReached signal scrollBar.ScrollPositionIntervalReachedSignal().Connect( &OnScrollPositionIntervalReached ); @@ -530,7 +534,7 @@ int UtcDaliToolkitScrollBarSetScrollPositionIntervalsP(void) // Create a source actor that owns the scroll properties required by the scroll bar Actor sourceActor = Actor::New(); - Stage::GetCurrent().Add( sourceActor ); + application.GetScene().Add( sourceActor ); // Register the scroll properties Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f ); @@ -632,7 +636,7 @@ int UtcDaliToolkitScrollBarGetScrollPositionIntervalsP(void) ToolkitTestApplication application; // Create a vertical scroll bar - ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical); + ScrollBar scrollBar = ScrollBar::New(ScrollBar::VERTICAL); DALI_TEST_CHECK( scrollBar ); // Set the values to get notified when the scroll positions of the source actor goes above or below these values @@ -681,13 +685,13 @@ int UtcDaliToolkitScrollBarGetScrollDirectionP(void) ToolkitTestApplication application; // Create a vertical scroll bar - ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical); + ScrollBar scrollBar = ScrollBar::New(ScrollBar::VERTICAL); DALI_TEST_CHECK( scrollBar ); - DALI_TEST_CHECK( scrollBar.GetScrollDirection() == ScrollBar::Vertical ); + DALI_TEST_CHECK( scrollBar.GetScrollDirection() == ScrollBar::VERTICAL ); // Change the direction of scroll bar to horizontal - scrollBar.SetScrollDirection(ScrollBar::Horizontal); - DALI_TEST_CHECK( scrollBar.GetScrollDirection() == ScrollBar::Horizontal ); + scrollBar.SetScrollDirection(ScrollBar::HORIZONTAL); + DALI_TEST_CHECK( scrollBar.GetScrollDirection() == ScrollBar::HORIZONTAL ); END_TEST; } @@ -701,12 +705,12 @@ int UtcDaliToolkitScrollBarSetIndicatorHeightPolicyP(void) DALI_TEST_CHECK( scrollBar ); float scrollBarHeight = 100.0f; - scrollBar.SetSize(20.0f, scrollBarHeight, 0.0f); - Stage::GetCurrent().Add( scrollBar ); + scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, scrollBarHeight, 0.0f) ); + application.GetScene().Add( scrollBar ); // Create a source actor that owns the scroll properties required by the scroll bar Actor sourceActor = Actor::New(); - Stage::GetCurrent().Add( sourceActor ); + application.GetScene().Add( sourceActor ); // Register the scroll properties Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f ); @@ -735,11 +739,11 @@ int UtcDaliToolkitScrollBarSetIndicatorHeightPolicyP(void) DALI_TEST_EQUALS( indicatorHeight, scrollBarHeight * scrollBarHeight / 500.0f, TEST_LOCATION ); // Set the indicator height to be fixed to 50.0f - scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Fixed); + scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::FIXED); scrollBar.SetIndicatorFixedHeight(50.0f); Property::Value value = scrollBar.GetProperty(ScrollBar::Property::INDICATOR_HEIGHT_POLICY); - DALI_TEST_EQUALS(value.Get(), "Fixed", TEST_LOCATION ); + DALI_TEST_EQUALS(value.Get(), "FIXED", TEST_LOCATION ); // Render and notify application.SendNotification(); @@ -750,9 +754,9 @@ int UtcDaliToolkitScrollBarSetIndicatorHeightPolicyP(void) DALI_TEST_EQUALS( indicatorHeight, 50.0f, TEST_LOCATION ); // Set the indicator height to be variable - scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Variable); + scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::VARIABLE); value = scrollBar.GetProperty(ScrollBar::Property::INDICATOR_HEIGHT_POLICY); - DALI_TEST_EQUALS(value.Get(), "Variable", TEST_LOCATION ); + DALI_TEST_EQUALS(value.Get(), "VARIABLE", TEST_LOCATION ); // Render and notify application.SendNotification(); @@ -774,12 +778,12 @@ int UtcDaliToolkitScrollBarGetIndicatorHeightPolicyP(void) DALI_TEST_CHECK( scrollBar ); // Set the indicator height to be fixed - scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Fixed); - DALI_TEST_EQUALS( scrollBar.GetIndicatorHeightPolicy(), Toolkit::ScrollBar::Fixed, TEST_LOCATION ); + scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::FIXED); + DALI_TEST_EQUALS( scrollBar.GetIndicatorHeightPolicy(), Toolkit::ScrollBar::FIXED, TEST_LOCATION ); // Set the indicator height to be variable - scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Variable); - DALI_TEST_EQUALS( scrollBar.GetIndicatorHeightPolicy(), Toolkit::ScrollBar::Variable, TEST_LOCATION ); + scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::VARIABLE); + DALI_TEST_EQUALS( scrollBar.GetIndicatorHeightPolicy(), Toolkit::ScrollBar::VARIABLE, TEST_LOCATION ); END_TEST; } @@ -793,14 +797,14 @@ int UtcDaliToolkitScrollBarSetIndicatorFixedHeightP(void) DALI_TEST_CHECK( scrollBar ); float scrollBarHeight = 100.0f; - scrollBar.SetSize(20.0f, scrollBarHeight, 0.0f); - Stage::GetCurrent().Add( scrollBar ); + scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, scrollBarHeight, 0.0f) ); + application.GetScene().Add( scrollBar ); Actor indicator = scrollBar.GetScrollIndicator(); DALI_TEST_CHECK( indicator ); // Set the indicator height to be fixed to 50.0f - scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Fixed); + scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::FIXED); scrollBar.SetIndicatorFixedHeight(50.0f); // Render and notify @@ -854,7 +858,7 @@ int UtcDaliToolkitScrollBarSetIndicatorShowDurationP(void) ScrollBar scrollBar = ScrollBar::New(); DALI_TEST_CHECK( scrollBar ); - Stage::GetCurrent().Add( scrollBar ); + application.GetScene().Add( scrollBar ); Actor indicator = scrollBar.GetScrollIndicator(); DALI_TEST_CHECK( indicator ); @@ -864,14 +868,14 @@ int UtcDaliToolkitScrollBarSetIndicatorShowDurationP(void) DALI_TEST_EQUALS( scrollBar.GetIndicatorShowDuration(), 0.35f, TEST_LOCATION ); // Make the indicator invisible - indicator.SetProperty( DevelActor::Property::OPACITY,0.0f); + indicator.SetProperty( Actor::Property::OPACITY,0.0f); // Render and notify application.SendNotification(); application.Render(); // Check that the indicator is invisible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION ); // Show the indicator scrollBar.ShowIndicator(); @@ -884,21 +888,21 @@ int UtcDaliToolkitScrollBarSetIndicatorShowDurationP(void) application.Render(); // Check that the indicator is now visible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION ); // Set the duration to show the indicator to be 0.75 second scrollBar.SetIndicatorShowDuration(0.75); DALI_TEST_EQUALS( scrollBar.GetIndicatorShowDuration(), 0.75f, TEST_LOCATION ); // Make the indicator invisible - indicator.SetProperty( DevelActor::Property::OPACITY,0.0f); + indicator.SetProperty( Actor::Property::OPACITY,0.0f); // Render and notify application.SendNotification(); application.Render(); // Check that the indicator is invisible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION ); // Show the indicator scrollBar.ShowIndicator(); @@ -911,7 +915,7 @@ int UtcDaliToolkitScrollBarSetIndicatorShowDurationP(void) application.Render(); // Check that the indicator is not fully visible yet - DALI_TEST_CHECK( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ) != 1.0f ); + DALI_TEST_CHECK( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ) != 1.0f ); // Wait for another 0.4 second Wait(application, 400); @@ -921,7 +925,7 @@ int UtcDaliToolkitScrollBarSetIndicatorShowDurationP(void) application.Render(); // Check that the indicator is now fully visible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION ); END_TEST; } @@ -934,7 +938,7 @@ int UtcDaliToolkitScrollBarSetIndicatorShowDurationN(void) ScrollBar scrollBar = ScrollBar::New(); DALI_TEST_CHECK( scrollBar ); - Stage::GetCurrent().Add( scrollBar ); + application.GetScene().Add( scrollBar ); Actor indicator = scrollBar.GetScrollIndicator(); DALI_TEST_CHECK( indicator ); @@ -946,14 +950,14 @@ int UtcDaliToolkitScrollBarSetIndicatorShowDurationN(void) DALI_TEST_CHECK( duration > 0.0f ); // Make the indicator invisible - indicator.SetProperty( DevelActor::Property::OPACITY,0.0f); + indicator.SetProperty( Actor::Property::OPACITY,0.0f); // Render and notify application.SendNotification(); application.Render(); // Check that the indicator is invisible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION ); // Show the indicator scrollBar.ShowIndicator(); @@ -966,21 +970,21 @@ int UtcDaliToolkitScrollBarSetIndicatorShowDurationN(void) application.Render(); // Check that the indicator is now visible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION ); // Now set the duration to show the indicator to be a negative value (which should be ignored and therefore means instant) scrollBar.SetIndicatorShowDuration(-0.25f); DALI_TEST_EQUALS( scrollBar.GetIndicatorShowDuration(), -0.25f, TEST_LOCATION ); // Make the indicator invisible - indicator.SetProperty( DevelActor::Property::OPACITY,0.0f); + indicator.SetProperty( Actor::Property::OPACITY,0.0f); // Render and notify application.SendNotification(); application.Render(); // Check that the indicator is invisible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION ); // Show the indicator scrollBar.ShowIndicator(); @@ -990,7 +994,7 @@ int UtcDaliToolkitScrollBarSetIndicatorShowDurationN(void) application.Render(); // Check that the indicator becomes instantly visible in the next frame - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION ); END_TEST; } @@ -1026,7 +1030,7 @@ int UtcDaliToolkitScrollBarSetIndicatorHideDurationP(void) ScrollBar scrollBar = ScrollBar::New(); DALI_TEST_CHECK( scrollBar ); - Stage::GetCurrent().Add( scrollBar ); + application.GetScene().Add( scrollBar ); Actor indicator = scrollBar.GetScrollIndicator(); DALI_TEST_CHECK( indicator ); @@ -1036,14 +1040,14 @@ int UtcDaliToolkitScrollBarSetIndicatorHideDurationP(void) DALI_TEST_EQUALS( scrollBar.GetIndicatorHideDuration(), 0.15f, TEST_LOCATION ); // Make the indicator visible - indicator.SetProperty( DevelActor::Property::OPACITY,1.0f); + indicator.SetProperty( Actor::Property::OPACITY,1.0f); // Render and notify application.SendNotification(); application.Render(); // Check that the indicator is visible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION ); // Hide the indicator scrollBar.HideIndicator(); @@ -1056,21 +1060,21 @@ int UtcDaliToolkitScrollBarSetIndicatorHideDurationP(void) application.Render(); // Check that the indicator is now invisible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION ); // Set the duration to hide the indicator to be 0.65 second scrollBar.SetIndicatorHideDuration(0.65f); DALI_TEST_EQUALS( scrollBar.GetIndicatorHideDuration(), 0.65f, TEST_LOCATION ); // Make the indicator visible - indicator.SetProperty( DevelActor::Property::OPACITY,1.0f); + indicator.SetProperty( Actor::Property::OPACITY,1.0f); // Render and notify application.SendNotification(); application.Render(); // Check that the indicator is visible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION ); // Hide the indicator scrollBar.HideIndicator(); @@ -1083,7 +1087,7 @@ int UtcDaliToolkitScrollBarSetIndicatorHideDurationP(void) application.Render(); // Check that the indicator is not fully invisible yet - DALI_TEST_CHECK( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ) != 0.0f ); + DALI_TEST_CHECK( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ) != 0.0f ); // Wait for another 0.5 second Wait(application, 500); @@ -1093,7 +1097,7 @@ int UtcDaliToolkitScrollBarSetIndicatorHideDurationP(void) application.Render(); // Check that the indicator is now fully invisible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION ); END_TEST; } @@ -1106,7 +1110,7 @@ int UtcDaliToolkitScrollBarSetIndicatorHideDurationN(void) ScrollBar scrollBar = ScrollBar::New(); DALI_TEST_CHECK( scrollBar ); - Stage::GetCurrent().Add( scrollBar ); + application.GetScene().Add( scrollBar ); Actor indicator = scrollBar.GetScrollIndicator(); DALI_TEST_CHECK( indicator ); @@ -1118,14 +1122,14 @@ int UtcDaliToolkitScrollBarSetIndicatorHideDurationN(void) DALI_TEST_CHECK( duration > 0.0f ); // Make the indicator visible - indicator.SetProperty( DevelActor::Property::OPACITY,1.0f); + indicator.SetProperty( Actor::Property::OPACITY,1.0f); // Render and notify application.SendNotification(); application.Render(); // Check that the indicator is visible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION ); // Hide the indicator scrollBar.HideIndicator(); @@ -1138,21 +1142,21 @@ int UtcDaliToolkitScrollBarSetIndicatorHideDurationN(void) application.Render(); // Check that the indicator is now invisible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION ); // Now set the duration to hide the indicator to be a negative value (which should be ignored and therefore means instant) scrollBar.SetIndicatorHideDuration(-0.25f); DALI_TEST_EQUALS( scrollBar.GetIndicatorHideDuration(), -0.25f, TEST_LOCATION ); // Make the indicator visible - indicator.SetProperty( DevelActor::Property::OPACITY,1.0f); + indicator.SetProperty( Actor::Property::OPACITY,1.0f); // Render and notify application.SendNotification(); application.Render(); // Check that the indicator is visible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION ); // Hide the indicator scrollBar.HideIndicator(); @@ -1162,7 +1166,7 @@ int UtcDaliToolkitScrollBarSetIndicatorHideDurationN(void) application.Render(); // Check that the indicator becomes instantly invisible in the next frame - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION ); END_TEST; } @@ -1198,7 +1202,7 @@ int UtcDaliToolkitScrollBarShowIndicatorP(void) ScrollBar scrollBar = ScrollBar::New(); DALI_TEST_CHECK( scrollBar ); - Stage::GetCurrent().Add( scrollBar ); + application.GetScene().Add( scrollBar ); Actor indicator = scrollBar.GetScrollIndicator(); DALI_TEST_CHECK( indicator ); @@ -1210,14 +1214,14 @@ int UtcDaliToolkitScrollBarShowIndicatorP(void) DALI_TEST_CHECK( duration > 0.0f ); // Make the indicator invisible - indicator.SetProperty( DevelActor::Property::OPACITY,0.0f); + indicator.SetProperty( Actor::Property::OPACITY,0.0f); // Render and notify application.SendNotification(); application.Render(); // Check that the indicator is invisible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION ); // Show the indicator scrollBar.ShowIndicator(); @@ -1230,7 +1234,7 @@ int UtcDaliToolkitScrollBarShowIndicatorP(void) application.Render(); // Check that the indicator is now visible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION ); END_TEST; } @@ -1243,20 +1247,20 @@ int UtcDaliToolkitScrollBarShowIndicatorN(void) ScrollBar scrollBar = ScrollBar::New(); DALI_TEST_CHECK( scrollBar ); - Stage::GetCurrent().Add( scrollBar ); + application.GetScene().Add( scrollBar ); Actor indicator = scrollBar.GetScrollIndicator(); DALI_TEST_CHECK( indicator ); // Make the indicator initially visible - indicator.SetProperty( DevelActor::Property::OPACITY,1.0f); + indicator.SetProperty( Actor::Property::OPACITY,1.0f); // Render and notify application.SendNotification(); application.Render(); // Check that the indicator is initially visible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION ); // Get the default duration to show the indicator float duration = scrollBar.GetIndicatorShowDuration(); @@ -1272,7 +1276,7 @@ int UtcDaliToolkitScrollBarShowIndicatorN(void) application.Render(); // Check that the indicator is still visible in the very next frame - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION ); END_TEST; } @@ -1285,7 +1289,7 @@ int UtcDaliToolkitScrollBarHideIndicatorP(void) ScrollBar scrollBar = ScrollBar::New(); DALI_TEST_CHECK( scrollBar ); - Stage::GetCurrent().Add( scrollBar ); + application.GetScene().Add( scrollBar ); Actor indicator = scrollBar.GetScrollIndicator(); DALI_TEST_CHECK( indicator ); @@ -1297,14 +1301,14 @@ int UtcDaliToolkitScrollBarHideIndicatorP(void) DALI_TEST_CHECK( duration > 0.0f ); // Make the indicator visible - indicator.SetProperty( DevelActor::Property::OPACITY,1.0f); + indicator.SetProperty( Actor::Property::OPACITY,1.0f); // Render and notify application.SendNotification(); application.Render(); // Check that the indicator is visible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION ); // Hide the indicator scrollBar.HideIndicator(); @@ -1317,7 +1321,7 @@ int UtcDaliToolkitScrollBarHideIndicatorP(void) application.Render(); // Check that the indicator is now invisible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION ); END_TEST; } @@ -1330,20 +1334,20 @@ int UtcDaliToolkitScrollBarHideIndicatorN(void) ScrollBar scrollBar = ScrollBar::New(); DALI_TEST_CHECK( scrollBar ); - Stage::GetCurrent().Add( scrollBar ); + application.GetScene().Add( scrollBar ); Actor indicator = scrollBar.GetScrollIndicator(); DALI_TEST_CHECK( indicator ); // Make the indicator initially invisible - indicator.SetProperty( DevelActor::Property::OPACITY,0.0f); + indicator.SetProperty( Actor::Property::OPACITY,0.0f); // Render and notify application.SendNotification(); application.Render(); // Check that the indicator is initially invisible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION ); // Get the default duration to hide the indicator float duration = scrollBar.GetIndicatorHideDuration(); @@ -1359,7 +1363,7 @@ int UtcDaliToolkitScrollBarHideIndicatorN(void) application.Render(); // Check that the indicator is still invisible in the very next frame - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION ); END_TEST; } @@ -1372,7 +1376,7 @@ int UtcDaliToolkitScrollBarActionShowIndicator(void) ScrollBar scrollBar = ScrollBar::New(); DALI_TEST_CHECK( scrollBar ); - Stage::GetCurrent().Add( scrollBar ); + application.GetScene().Add( scrollBar ); Actor indicator = scrollBar.GetScrollIndicator(); DALI_TEST_CHECK( indicator ); @@ -1384,14 +1388,14 @@ int UtcDaliToolkitScrollBarActionShowIndicator(void) DALI_TEST_CHECK( duration > 0.0f ); // Make the indicator invisible - indicator.SetProperty( DevelActor::Property::OPACITY,0.0f); + indicator.SetProperty( Actor::Property::OPACITY,0.0f); // Render and notify application.SendNotification(); application.Render(); // Check that the indicator is invisible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION ); // Do the "ShowIndicator" action Property::Map emptyMap; @@ -1405,7 +1409,7 @@ int UtcDaliToolkitScrollBarActionShowIndicator(void) application.Render(); // Check that the indicator is now visible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION ); END_TEST; } @@ -1418,7 +1422,7 @@ int UtcDaliToolkitScrollBarActionHideIndicator(void) ScrollBar scrollBar = ScrollBar::New(); DALI_TEST_CHECK( scrollBar ); - Stage::GetCurrent().Add( scrollBar ); + application.GetScene().Add( scrollBar ); Actor indicator = scrollBar.GetScrollIndicator(); DALI_TEST_CHECK( indicator ); @@ -1430,14 +1434,14 @@ int UtcDaliToolkitScrollBarActionHideIndicator(void) DALI_TEST_CHECK( duration > 0.0f ); // Make the indicator visible - indicator.SetProperty( DevelActor::Property::OPACITY,1.0f); + indicator.SetProperty( Actor::Property::OPACITY,1.0f); // Render and notify application.SendNotification(); application.Render(); // Check that the indicator is visible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION ); // Do the "HideIndicator" action Property::Map emptyMap; @@ -1451,7 +1455,7 @@ int UtcDaliToolkitScrollBarActionHideIndicator(void) application.Render(); // Check that the indicator is now invisible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION ); END_TEST; } @@ -1464,7 +1468,7 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicator(void) ScrollBar scrollBar = ScrollBar::New(); DALI_TEST_CHECK( scrollBar ); - Stage::GetCurrent().Add( scrollBar ); + application.GetScene().Add( scrollBar ); Actor indicator = scrollBar.GetScrollIndicator(); DALI_TEST_CHECK( indicator ); @@ -1476,14 +1480,14 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicator(void) DALI_TEST_CHECK( duration > 0.0f ); // Make the indicator invisible - indicator.SetProperty( DevelActor::Property::OPACITY,0.0f); + indicator.SetProperty( Actor::Property::OPACITY,0.0f); // Render and notify application.SendNotification(); application.Render(); // Check that the indicator is invisible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION ); // Do the "ShowIndicator" action Property::Map emptyMap; @@ -1497,7 +1501,7 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicator(void) application.Render(); // Check that the indicator is now visible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION ); // Get the default duration to hide the indicator float hideDuration = scrollBar.GetProperty( ScrollBar::Property::INDICATOR_HIDE_DURATION ); @@ -1515,7 +1519,7 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicator(void) application.Render(); // Check that the indicator is now invisible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION ); END_TEST; } @@ -1528,13 +1532,13 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicatorImmediate(void) ScrollBar scrollBar = ScrollBar::New(); DALI_TEST_CHECK( scrollBar ); - Stage::GetCurrent().Add( scrollBar ); + application.GetScene().Add( scrollBar ); Actor indicator = scrollBar.GetScrollIndicator(); DALI_TEST_CHECK( indicator ); // Make the indicator invisible - indicator.SetProperty( DevelActor::Property::OPACITY,0.0f); + indicator.SetProperty( Actor::Property::OPACITY,0.0f); // Don't use a show animation; the indicator should appear immediately scrollBar.SetProperty( ScrollBar::Property::INDICATOR_SHOW_DURATION, 0.0f ); @@ -1557,7 +1561,7 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicatorImmediate(void) application.Render(); // Check that the indicator is now visible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION ); // Get the default duration to hide the indicator float hideDuration = scrollBar.GetProperty( ScrollBar::Property::INDICATOR_HIDE_DURATION ); @@ -1575,7 +1579,7 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicatorImmediate(void) application.Render(); // Check that the indicator is now invisible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION ); END_TEST; } @@ -1588,7 +1592,7 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicatorDuringHide(void) ScrollBar scrollBar = ScrollBar::New(); DALI_TEST_CHECK( scrollBar ); - Stage::GetCurrent().Add( scrollBar ); + application.GetScene().Add( scrollBar ); Actor indicator = scrollBar.GetScrollIndicator(); DALI_TEST_CHECK( indicator ); @@ -1600,14 +1604,14 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicatorDuringHide(void) DALI_TEST_CHECK( duration > 0.0f ); // Make the indicator visible - indicator.SetProperty( DevelActor::Property::OPACITY,1.0f); + indicator.SetProperty( Actor::Property::OPACITY,1.0f); // Render and notify application.SendNotification(); application.Render(); // Check that the indicator is visible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION ); // Hide the indicator scrollBar.HideIndicator(); @@ -1620,7 +1624,7 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicatorDuringHide(void) application.Render(); // Check that the indicator is now partially hidden - DALI_TEST_CHECK( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ) < 1.0f ); + DALI_TEST_CHECK( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ) < 1.0f ); // Now interrupt the Hide with a DoAction( "ShowTransientIndicator" ) @@ -1642,7 +1646,7 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicatorDuringHide(void) application.Render(); // Check that the indicator is now visible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION ); // Get the default duration to hide the indicator float hideDuration = scrollBar.GetProperty( ScrollBar::Property::INDICATOR_HIDE_DURATION ); @@ -1660,7 +1664,7 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicatorDuringHide(void) application.Render(); // Check that the indicator is now invisible - DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION ); END_TEST; } @@ -1670,18 +1674,18 @@ int UtcDaliToolkitScrollBarPanFinishedSignalP(void) ToolkitTestApplication application; // Create a vertical scroll bar - ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical); + ScrollBar scrollBar = ScrollBar::New(ScrollBar::VERTICAL); DALI_TEST_CHECK( scrollBar ); scrollBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); scrollBar.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); - scrollBar.SetSize(20.0f, 800.0f, 0.0f); + scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) ); // Set the indicator height to be fixed to 50.0f - scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Fixed); + scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::FIXED); scrollBar.SetIndicatorFixedHeight(50.0f); - Stage::GetCurrent().Add( scrollBar ); + application.GetScene().Add( scrollBar ); // Connect the pan finished signal ConnectionTracker connectionTracker; @@ -1695,7 +1699,7 @@ int UtcDaliToolkitScrollBarPanFinishedSignalP(void) // Create a source actor that owns the scroll properties required by the scroll bar Actor sourceActor = Actor::New(); - Stage::GetCurrent().Add( sourceActor ); + application.GetScene().Add( sourceActor ); // Register the scroll properties Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f ); @@ -1728,18 +1732,18 @@ int UtcDaliToolkitScrollBarPanFinishedSignalN(void) ToolkitTestApplication application; // Create a vertical scroll bar - ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical); + ScrollBar scrollBar = ScrollBar::New(ScrollBar::VERTICAL); DALI_TEST_CHECK( scrollBar ); scrollBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); scrollBar.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); - scrollBar.SetSize(20.0f, 800.0f, 0.0f); + scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) ); // Set the indicator height to be fixed to 50.0f - scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Fixed); + scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::FIXED); scrollBar.SetIndicatorFixedHeight(50.0f); - Stage::GetCurrent().Add( scrollBar ); + application.GetScene().Add( scrollBar ); // Connect the pan finished signal ConnectionTracker connectionTracker; @@ -1757,7 +1761,7 @@ int UtcDaliToolkitScrollBarPanFinishedSignalN(void) // Create a source actor that owns the scroll properties required by the scroll bar Actor sourceActor = Actor::New(); - Stage::GetCurrent().Add( sourceActor ); + application.GetScene().Add( sourceActor ); // Register the scroll properties Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f ); @@ -1795,14 +1799,14 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalP(void) ToolkitTestApplication application; // Create a vertical scroll bar - ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical); + ScrollBar scrollBar = ScrollBar::New(ScrollBar::VERTICAL); DALI_TEST_CHECK( scrollBar ); scrollBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); scrollBar.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); - scrollBar.SetSize(20.0f, 800.0f, 0.0f); + scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) ); - Stage::GetCurrent().Add( scrollBar ); + application.GetScene().Add( scrollBar ); ConnectionTracker connectionTracker; // Connect to the ScrollPositionIntervalReached signal @@ -1816,7 +1820,7 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalP(void) // Create a source actor that owns the scroll properties required by the scroll bar Actor sourceActor = Actor::New(); - Stage::GetCurrent().Add( sourceActor ); + application.GetScene().Add( sourceActor ); // Register the scroll properties Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f ); @@ -1911,14 +1915,14 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalN(void) ToolkitTestApplication application; // Create a vertical scroll bar - ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical); + ScrollBar scrollBar = ScrollBar::New(ScrollBar::VERTICAL); DALI_TEST_CHECK( scrollBar ); scrollBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); scrollBar.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); - scrollBar.SetSize(20.0f, 800.0f, 0.0f); + scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) ); - Stage::GetCurrent().Add( scrollBar ); + application.GetScene().Add( scrollBar ); // Connect to the ScrollPositionIntervalReached signal scrollBar.ScrollPositionIntervalReachedSignal().Connect( &OnScrollPositionIntervalReached ); @@ -1929,7 +1933,7 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalN(void) // Create a source actor that owns the scroll properties required by the scroll bar Actor sourceActor = Actor::New(); - Stage::GetCurrent().Add( sourceActor ); + application.GetScene().Add( sourceActor ); // Register the scroll properties Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f );