[dali_2.3.19] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-ScrollBar.cpp
index 1d32e33..c5ebbd9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
  *
  */
 
-#include <iostream>
 #include <stdlib.h>
+#include <iostream>
 #include <string>
+
 #include <dali-toolkit-test-suite-utils.h>
+#include "dali-toolkit-test-utils/toolkit-timer.h"
+
 #include <dali-toolkit/dali-toolkit.h>
-#include <dali/devel-api/actors/actor-devel.h>
 #include <dali-toolkit/devel-api/controls/scroll-bar/scroll-bar.h>
+#include <dali/devel-api/actors/actor-devel.h>
 
 using namespace Dali;
 using namespace Toolkit;
@@ -38,8 +41,7 @@ void dali_scrollbar_cleanup(void)
 
 namespace
 {
-
-const int RENDER_FRAME_INTERVAL = 16;                       ///< Duration of each frame in ms. (at approx 60FPS)
+const int RENDER_FRAME_INTERVAL = 16; ///< Duration of each frame in ms. (at approx 60FPS)
 
 /*
  * Simulate time passed by.
@@ -54,7 +56,7 @@ int Wait(ToolkitTestApplication& application, int duration = 0)
 {
   int time = 0;
 
-  for(int i = 0; i <= ( duration / RENDER_FRAME_INTERVAL); i++)
+  for(int i = 0; i <= (duration / RENDER_FRAME_INTERVAL); i++)
   {
     application.SendNotification();
     application.Render(RENDER_FRAME_INTERVAL);
@@ -67,7 +69,7 @@ int Wait(ToolkitTestApplication& application, int duration = 0)
 // Callback probes.
 
 static bool gOnPanFinishedCalled;                         ///< Whether the PanFinished signal was invoked.
-static bool gOnScrollPositionIntervalReachedSignalCalled;        ///< Whether the ScrollPositionIntervalReached signal was invoked.
+static bool gOnScrollPositionIntervalReachedSignalCalled; ///< Whether the ScrollPositionIntervalReached signal was invoked.
 
 /**
  * Invoked when pan gesture is finished on the scroll indicator.
@@ -80,7 +82,7 @@ static void OnPanFinished()
 struct CallbackFunctor
 {
   CallbackFunctor(bool* callbackFlag)
-  : mCallbackFlag( callbackFlag )
+  : mCallbackFlag(callbackFlag)
   {
   }
 
@@ -97,7 +99,7 @@ struct CallbackFunctor
  *
  * @param[in] position The current scroll position.
  */
-static void OnScrollPositionIntervalReached( float position )
+static void OnScrollPositionIntervalReached(float position)
 {
   gOnScrollPositionIntervalReachedSignalCalled = true;
 }
@@ -107,24 +109,26 @@ static Vector2 PerformGestureSwipe(ToolkitTestApplication& application, Vector2
   gOnPanFinishedCalled = false;
 
   // Now do a pan starting from (start) and heading (direction)
-  Vector2 pos( start + ( direction * 15 ) );
+  Vector2  pos(start + (direction * 15));
   uint32_t time = start_time;
 
-  TestStartPan( application, start, pos, time );
+  TestStartPan(application, start, pos, time);
 
   Wait(application);
 
   for(int i = 0; i < frames; i++)
   {
+    Test::EmitGlobalTimerSignal();
+
     pos += direction; // Move in this direction
     time += RENDER_FRAME_INTERVAL;
-    TestMovePan( application, pos, time);
+    TestMovePan(application, pos, time);
     Wait(application);
   }
 
   pos += direction; // Move in this direction.
   time += RENDER_FRAME_INTERVAL;
-  TestEndPan(application, pos, time );
+  TestEndPan(application, pos, time);
   Wait(application);
 
   return pos;
@@ -137,7 +141,7 @@ int UtcDaliToolkitScrollBarConstructorP(void)
   ToolkitTestApplication application;
 
   ScrollBar scrollBar;
-  DALI_TEST_CHECK( !scrollBar );
+  DALI_TEST_CHECK(!scrollBar);
   END_TEST;
 }
 
@@ -146,11 +150,11 @@ int UtcDaliToolkitScrollBarCopyConstructorP(void)
   ToolkitTestApplication application;
 
   ScrollBar scrollBar = ScrollBar::New();
-  scrollBar.SetProperty( ScrollBar::Property::INDICATOR_FIXED_HEIGHT, 38.2f );
+  scrollBar.SetProperty(ScrollBar::Property::INDICATOR_FIXED_HEIGHT, 38.2f);
 
-  ScrollBar copy( scrollBar );
-  DALI_TEST_CHECK( copy );
-  DALI_TEST_CHECK( copy.GetProperty<float>( ScrollBar::Property::INDICATOR_FIXED_HEIGHT ) == scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_FIXED_HEIGHT ) );
+  ScrollBar copy(scrollBar);
+  DALI_TEST_CHECK(copy);
+  DALI_TEST_CHECK(copy.GetProperty<float>(ScrollBar::Property::INDICATOR_FIXED_HEIGHT) == scrollBar.GetProperty<float>(ScrollBar::Property::INDICATOR_FIXED_HEIGHT));
   END_TEST;
 }
 
@@ -159,11 +163,11 @@ int UtcDaliToolkitScrollBarAssignmentOperatorP(void)
   ToolkitTestApplication application;
 
   ScrollBar scrollBar = ScrollBar::New();
-  scrollBar.SetProperty( ScrollBar::Property::INDICATOR_FIXED_HEIGHT, 38.2f );
+  scrollBar.SetProperty(ScrollBar::Property::INDICATOR_FIXED_HEIGHT, 38.2f);
 
   ScrollBar copy = scrollBar;
-  DALI_TEST_CHECK( copy );
-  DALI_TEST_CHECK( copy.GetProperty<float>( ScrollBar::Property::INDICATOR_FIXED_HEIGHT ) == scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_FIXED_HEIGHT ) );
+  DALI_TEST_CHECK(copy);
+  DALI_TEST_CHECK(copy.GetProperty<float>(ScrollBar::Property::INDICATOR_FIXED_HEIGHT) == scrollBar.GetProperty<float>(ScrollBar::Property::INDICATOR_FIXED_HEIGHT));
   END_TEST;
 }
 
@@ -174,7 +178,7 @@ int UtcDaliScrollBarDestructorP(void)
   ScrollBar* scrollBar = new ScrollBar();
   delete scrollBar;
 
-  DALI_TEST_CHECK( true );
+  DALI_TEST_CHECK(true);
   END_TEST;
 }
 
@@ -183,23 +187,23 @@ int UtcDaliToolkitScrollBarNewP(void)
   ToolkitTestApplication application;
 
   ScrollBar scrollBar = ScrollBar::New();
-  DALI_TEST_CHECK( scrollBar );
+  DALI_TEST_CHECK(scrollBar);
   END_TEST;
 
-  ScrollBar vertical = ScrollBar::New(ScrollBar::Vertical);
-  DALI_TEST_CHECK( vertical );
-  DALI_TEST_CHECK( vertical.GetScrollDirection() == ScrollBar::Vertical );
+  ScrollBar vertical = ScrollBar::New(ScrollBar::VERTICAL);
+  DALI_TEST_CHECK(vertical);
+  DALI_TEST_CHECK(vertical.GetScrollDirection() == ScrollBar::VERTICAL);
 
-  Property::Value value = vertical.GetProperty(ScrollBar::Property::SCROLL_DIRECTION);
-  std::string scrollDirection = value.Get<std::string>();
-  DALI_TEST_EQUALS( scrollDirection, "Vertical", TEST_LOCATION );
+  Property::Value value           = vertical.GetProperty(ScrollBar::Property::SCROLL_DIRECTION);
+  std::string     scrollDirection = value.Get<std::string>();
+  DALI_TEST_EQUALS(scrollDirection, "VERTICAL", TEST_LOCATION);
 
-  ScrollBar horizontal = ScrollBar::New(ScrollBar::Horizontal);
-  DALI_TEST_CHECK( horizontal );
-  DALI_TEST_CHECK( horizontal.GetScrollDirection() == ScrollBar::Horizontal );
-  value = vertical.GetProperty(ScrollBar::Property::SCROLL_DIRECTION);
+  ScrollBar horizontal = ScrollBar::New(ScrollBar::HORIZONTAL);
+  DALI_TEST_CHECK(horizontal);
+  DALI_TEST_CHECK(horizontal.GetScrollDirection() == ScrollBar::HORIZONTAL);
+  value           = vertical.GetProperty(ScrollBar::Property::SCROLL_DIRECTION);
   scrollDirection = value.Get<std::string>();
-  DALI_TEST_EQUALS( scrollDirection, "Horizontal", TEST_LOCATION );
+  DALI_TEST_EQUALS(scrollDirection, "HORIZONTAL", TEST_LOCATION);
 
   END_TEST;
 }
@@ -209,28 +213,28 @@ int UtcDaliToolkitScrollBarCreateP(void)
   ToolkitTestApplication application;
 
   TypeRegistry typeRegistry = TypeRegistry::Get();
-  DALI_TEST_CHECK( typeRegistry );
+  DALI_TEST_CHECK(typeRegistry);
 
-  TypeInfo typeInfo = typeRegistry.GetTypeInfo( "ScrollBar" );
-  DALI_TEST_CHECK( typeInfo );
+  TypeInfo typeInfo = typeRegistry.GetTypeInfo("ScrollBar");
+  DALI_TEST_CHECK(typeInfo);
 
   BaseHandle handle = typeInfo.CreateInstance();
-  DALI_TEST_CHECK( handle );
+  DALI_TEST_CHECK(handle);
 
-  ScrollBar scrollBar = ScrollBar::DownCast( handle );
-  DALI_TEST_CHECK( scrollBar );
+  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;
 }
@@ -239,14 +243,14 @@ int UtcDaliToolkitScrollBarDownCastP(void)
 {
   ToolkitTestApplication application;
 
-  ScrollBar scrollBar1 = ScrollBar::New();
-  BaseHandle object( scrollBar1 );
+  ScrollBar  scrollBar1 = ScrollBar::New();
+  BaseHandle object(scrollBar1);
 
-  ScrollBar scrollBar2 = ScrollBar::DownCast( object );
-  DALI_TEST_CHECK( scrollBar2 );
+  ScrollBar scrollBar2 = ScrollBar::DownCast(object);
+  DALI_TEST_CHECK(scrollBar2);
 
-  ScrollBar scrollBar3 = DownCast< ScrollBar >( object );
-  DALI_TEST_CHECK( scrollBar3 );
+  ScrollBar scrollBar3 = DownCast<ScrollBar>(object);
+  DALI_TEST_CHECK(scrollBar3);
   END_TEST;
 }
 
@@ -255,11 +259,11 @@ int UtcDaliToolkitScrollBarDownCastN(void)
   ToolkitTestApplication application;
 
   BaseHandle uninitializedObject;
-  ScrollBar scrollBar1 = ScrollBar::DownCast( uninitializedObject );
-  DALI_TEST_CHECK( !scrollBar1 );
+  ScrollBar  scrollBar1 = ScrollBar::DownCast(uninitializedObject);
+  DALI_TEST_CHECK(!scrollBar1);
 
-  ScrollBar scrollBar2 = DownCast< ScrollBar >( uninitializedObject );
-  DALI_TEST_CHECK( !scrollBar2 );
+  ScrollBar scrollBar2 = DownCast<ScrollBar>(uninitializedObject);
+  DALI_TEST_CHECK(!scrollBar2);
   END_TEST;
 }
 
@@ -268,28 +272,28 @@ int UtcDaliToolkitScrollBarSetScrollPropertySourceP(void)
   ToolkitTestApplication application;
 
   // Create a vertical scroll bar
-  ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical);
-  DALI_TEST_CHECK( scrollBar );
-  DALI_TEST_CHECK( scrollBar.GetScrollDirection() == ScrollBar::Vertical );
+  ScrollBar scrollBar = ScrollBar::New(ScrollBar::VERTICAL);
+  DALI_TEST_CHECK(scrollBar);
+  DALI_TEST_CHECK(scrollBar.GetScrollDirection() == ScrollBar::VERTICAL);
 
   float scrollBarHeight = 100.0f;
-  scrollBar.SetProperty( Actor::Property::SIZE, Vector3(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 );
-  Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "sourcePositionMin",   0.0f );
-  Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "sourcePositionMax",   100.0f );
-  Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "sourceContentSize",   500.0f );
+  Property::Index propertyScrollPosition    = sourceActor.RegisterProperty("sourcePosition", 0.0f);
+  Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty("sourcePositionMin", 0.0f);
+  Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty("sourcePositionMax", 100.0f);
+  Property::Index propertyScrollContentSize = sourceActor.RegisterProperty("sourceContentSize", 500.0f);
 
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePosition" ), propertyScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMin" ), propertyMinScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMax" ), propertyMaxScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourceContentSize" ), propertyScrollContentSize, TEST_LOCATION );
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourcePosition"), propertyScrollPosition, TEST_LOCATION);
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourcePositionMin"), propertyMinScrollPosition, TEST_LOCATION);
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourcePositionMax"), propertyMaxScrollPosition, TEST_LOCATION);
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourceContentSize"), propertyScrollContentSize, TEST_LOCATION);
 
   // Set the source of the scroll position properties.
   scrollBar.SetScrollPropertySource(sourceActor, propertyScrollPosition, propertyMinScrollPosition, propertyMaxScrollPosition, propertyScrollContentSize);
@@ -299,75 +303,75 @@ int UtcDaliToolkitScrollBarSetScrollPropertySourceP(void)
   application.Render();
 
   Actor indicator = scrollBar.GetScrollIndicator();
-  DALI_TEST_CHECK( indicator );
+  DALI_TEST_CHECK(indicator);
 
   // Check that the indicator size should be: scroll bar size * (scroll bar size / content size).
   // i.e. The bigger the content size, the smaller the indicator size
-  float indicatorHeight = indicator.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).y;
-  DALI_TEST_EQUALS( indicatorHeight, scrollBarHeight * scrollBarHeight / 500.0f, TEST_LOCATION );
+  float indicatorHeight = indicator.GetCurrentProperty<Vector3>(Actor::Property::SIZE).y;
+  DALI_TEST_EQUALS(indicatorHeight, scrollBarHeight * scrollBarHeight / 500.0f, TEST_LOCATION);
 
   // Decrease the content length
-  sourceActor.SetProperty( propertyScrollContentSize, 250.0f );
+  sourceActor.SetProperty(propertyScrollContentSize, 250.0f);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Check that the indicator size is changed accordingly
-  indicatorHeight = indicator.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).y;
-  DALI_TEST_EQUALS( indicatorHeight, scrollBarHeight * scrollBarHeight / 250.0f, TEST_LOCATION );
+  indicatorHeight = indicator.GetCurrentProperty<Vector3>(Actor::Property::SIZE).y;
+  DALI_TEST_EQUALS(indicatorHeight, scrollBarHeight * scrollBarHeight / 250.0f, TEST_LOCATION);
 
   // As scroll position is 0, check that the indicator position should be 0.0f.
-  float indicatorPosition = indicator.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y;
-  DALI_TEST_EQUALS( indicatorPosition, 0.0f, TEST_LOCATION );
+  float indicatorPosition = indicator.GetCurrentProperty<Vector3>(Actor::Property::POSITION).y;
+  DALI_TEST_EQUALS(indicatorPosition, 0.0f, TEST_LOCATION);
 
   // Set the scroll position to the middle
-  sourceActor.SetProperty( propertyScrollPosition, -50.0f );
+  sourceActor.SetProperty(propertyScrollPosition, -50.0f);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Check that the indicator should be in the middle of the scroll bar
-  indicatorPosition = indicator.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y;
-  DALI_TEST_EQUALS( indicatorPosition, (scrollBarHeight - indicatorHeight) * 0.5f, TEST_LOCATION );
+  indicatorPosition = indicator.GetCurrentProperty<Vector3>(Actor::Property::POSITION).y;
+  DALI_TEST_EQUALS(indicatorPosition, (scrollBarHeight - indicatorHeight) * 0.5f, TEST_LOCATION);
 
   // Set the scroll position to the maximum
-  sourceActor.SetProperty( propertyScrollPosition, -100.0f );
+  sourceActor.SetProperty(propertyScrollPosition, -100.0f);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Check that the indicator should be in the end of the scroll bar
-  indicatorPosition = indicator.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y;
-  DALI_TEST_EQUALS( indicatorPosition, scrollBarHeight - indicatorHeight, TEST_LOCATION );
+  indicatorPosition = indicator.GetCurrentProperty<Vector3>(Actor::Property::POSITION).y;
+  DALI_TEST_EQUALS(indicatorPosition, scrollBarHeight - indicatorHeight, TEST_LOCATION);
 
   // Increase the maximum scroll position to double
-  sourceActor.SetProperty( propertyMaxScrollPosition, 200.0f );
+  sourceActor.SetProperty(propertyMaxScrollPosition, 200.0f);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Check that the indicator should be now in the middle of the scroll bar
-  indicatorPosition = indicator.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y;
-  DALI_TEST_EQUALS( indicatorPosition, (scrollBarHeight - indicatorHeight) * 0.5f, TEST_LOCATION );
+  indicatorPosition = indicator.GetCurrentProperty<Vector3>(Actor::Property::POSITION).y;
+  DALI_TEST_EQUALS(indicatorPosition, (scrollBarHeight - indicatorHeight) * 0.5f, TEST_LOCATION);
 
   // 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 );
-  Property::Index newPropertyMinScrollPosition = newSourceActor.RegisterProperty( "sourcePositionMin",   0.0f );
-  Property::Index newPropertyMaxScrollPosition = newSourceActor.RegisterProperty( "sourcePositionMax",   200.0f );
-  Property::Index newPropertyScrollContentSize = newSourceActor.RegisterProperty( "sourceContentSize",   400.0f );
+  Property::Index newPropertyScrollPosition    = newSourceActor.RegisterProperty("sourcePosition", 0.0f);
+  Property::Index newPropertyMinScrollPosition = newSourceActor.RegisterProperty("sourcePositionMin", 0.0f);
+  Property::Index newPropertyMaxScrollPosition = newSourceActor.RegisterProperty("sourcePositionMax", 200.0f);
+  Property::Index newPropertyScrollContentSize = newSourceActor.RegisterProperty("sourceContentSize", 400.0f);
 
-  DALI_TEST_EQUALS( newSourceActor.GetPropertyIndex( "sourcePosition" ), newPropertyScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( newSourceActor.GetPropertyIndex( "sourcePositionMin" ), newPropertyMinScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( newSourceActor.GetPropertyIndex( "sourcePositionMax" ), newPropertyMaxScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( newSourceActor.GetPropertyIndex( "sourceContentSize" ), newPropertyScrollContentSize, TEST_LOCATION );
+  DALI_TEST_EQUALS(newSourceActor.GetPropertyIndex("sourcePosition"), newPropertyScrollPosition, TEST_LOCATION);
+  DALI_TEST_EQUALS(newSourceActor.GetPropertyIndex("sourcePositionMin"), newPropertyMinScrollPosition, TEST_LOCATION);
+  DALI_TEST_EQUALS(newSourceActor.GetPropertyIndex("sourcePositionMax"), newPropertyMaxScrollPosition, TEST_LOCATION);
+  DALI_TEST_EQUALS(newSourceActor.GetPropertyIndex("sourceContentSize"), newPropertyScrollContentSize, TEST_LOCATION);
 
   // Change the source of the scroll position properties to be the new source actor.
   scrollBar.SetScrollPropertySource(newSourceActor, newPropertyScrollPosition, newPropertyMinScrollPosition, newPropertyMaxScrollPosition, newPropertyScrollContentSize);
@@ -377,23 +381,23 @@ int UtcDaliToolkitScrollBarSetScrollPropertySourceP(void)
   application.Render();
 
   // Check that the indicator size is changed accordingly
-  indicatorHeight = indicator.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).y;
-  DALI_TEST_EQUALS( indicatorHeight, scrollBarHeight * scrollBarHeight / 400.0f, TEST_LOCATION );
+  indicatorHeight = indicator.GetCurrentProperty<Vector3>(Actor::Property::SIZE).y;
+  DALI_TEST_EQUALS(indicatorHeight, scrollBarHeight * scrollBarHeight / 400.0f, TEST_LOCATION);
 
   // Check that the indicator position goes back to the beginning of the scroll bar
-  indicatorPosition = indicator.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y;
-  DALI_TEST_EQUALS( indicatorPosition, 0.0f, TEST_LOCATION );
+  indicatorPosition = indicator.GetCurrentProperty<Vector3>(Actor::Property::POSITION).y;
+  DALI_TEST_EQUALS(indicatorPosition, 0.0f, TEST_LOCATION);
 
   // Set the scroll position to one fifth of the maximum
-  newSourceActor.SetProperty( propertyScrollPosition, -40.0f );
+  newSourceActor.SetProperty(propertyScrollPosition, -40.0f);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Check that the indicator should be in one fifth from the beginning of the scroll bar
-  indicatorPosition = indicator.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y;
-  DALI_TEST_EQUALS( indicatorPosition, (scrollBarHeight - indicatorHeight) * 0.2f, TEST_LOCATION );
+  indicatorPosition = indicator.GetCurrentProperty<Vector3>(Actor::Property::POSITION).y;
+  DALI_TEST_EQUALS(indicatorPosition, (scrollBarHeight - indicatorHeight) * 0.2f, TEST_LOCATION);
 
   END_TEST;
 }
@@ -404,13 +408,13 @@ int UtcDaliToolkitScrollBarSetScrollPropertySourceN(void)
 
   // Create a scroll bar
   ScrollBar scrollBar = ScrollBar::New();
-  DALI_TEST_CHECK( scrollBar );
+  DALI_TEST_CHECK(scrollBar);
 
   // Set empty handle of source object and invalid source property index.
   Actor sourceActor;
   scrollBar.SetScrollPropertySource(sourceActor, Property::INVALID_INDEX, Property::INVALID_INDEX, Property::INVALID_INDEX, Property::INVALID_INDEX);
 
-  DALI_TEST_CHECK( true );
+  DALI_TEST_CHECK(true);
   END_TEST;
 }
 
@@ -420,24 +424,24 @@ int UtcDaliToolkitScrollBarSetScrollIndicatorP(void)
 
   // Create a scroll bar
   ScrollBar scrollBar = ScrollBar::New();
-  DALI_TEST_CHECK( scrollBar );
+  DALI_TEST_CHECK(scrollBar);
 
   Actor indicator = scrollBar.GetScrollIndicator();
-  DALI_TEST_CHECK( indicator );
+  DALI_TEST_CHECK(indicator);
 
   // Set a new indicator
   Actor newIndicator = Actor::New();
   scrollBar.SetScrollIndicator(newIndicator);
 
   // Check that the new indicator is successfully set
-  DALI_TEST_CHECK( indicator != scrollBar.GetScrollIndicator() );
-  DALI_TEST_CHECK( newIndicator == scrollBar.GetScrollIndicator() );
+  DALI_TEST_CHECK(indicator != scrollBar.GetScrollIndicator());
+  DALI_TEST_CHECK(newIndicator == scrollBar.GetScrollIndicator());
 
   // Check that the new control indicator is successfully set
   Control controlIndicator = Control::New();
   scrollBar.SetScrollIndicator(controlIndicator);
 
-  DALI_TEST_CHECK( controlIndicator == Control::DownCast( scrollBar.GetScrollIndicator() ) );
+  DALI_TEST_CHECK(controlIndicator == Control::DownCast(scrollBar.GetScrollIndicator()));
   END_TEST;
 }
 
@@ -447,18 +451,18 @@ int UtcDaliToolkitScrollBarSetScrollIndicatorN(void)
 
   // Create a scroll bar
   ScrollBar scrollBar = ScrollBar::New();
-  DALI_TEST_CHECK( scrollBar );
+  DALI_TEST_CHECK(scrollBar);
 
   Actor indicator = scrollBar.GetScrollIndicator();
-  DALI_TEST_CHECK( indicator );
+  DALI_TEST_CHECK(indicator);
 
   // Try to set an uninitialized actor as the indicator
   Actor uninitializedIndicator;
   scrollBar.SetScrollIndicator(uninitializedIndicator);
 
   // Check that the uninitialized actor can not be set as the indicator
-  DALI_TEST_CHECK( indicator == scrollBar.GetScrollIndicator() );
-  DALI_TEST_CHECK( uninitializedIndicator != scrollBar.GetScrollIndicator() );
+  DALI_TEST_CHECK(indicator == scrollBar.GetScrollIndicator());
+  DALI_TEST_CHECK(uninitializedIndicator != scrollBar.GetScrollIndicator());
 
   END_TEST;
 }
@@ -469,19 +473,19 @@ int UtcDaliToolkitScrollBarGetScrollIndicatorP(void)
 
   // Create a scroll bar
   ScrollBar scrollBar = ScrollBar::New();
-  DALI_TEST_CHECK( scrollBar );
+  DALI_TEST_CHECK(scrollBar);
 
   Actor indicator = scrollBar.GetScrollIndicator();
-  DALI_TEST_CHECK( indicator );
+  DALI_TEST_CHECK(indicator);
 
   // Set a new indicator
   Actor newIndicator = Actor::New();
   scrollBar.SetScrollIndicator(newIndicator);
 
   // Check that the new indicator is successfully set
-  DALI_TEST_CHECK( scrollBar.GetScrollIndicator() );
-  DALI_TEST_CHECK( indicator != scrollBar.GetScrollIndicator() );
-  DALI_TEST_CHECK( newIndicator == scrollBar.GetScrollIndicator() );
+  DALI_TEST_CHECK(scrollBar.GetScrollIndicator());
+  DALI_TEST_CHECK(indicator != scrollBar.GetScrollIndicator());
+  DALI_TEST_CHECK(newIndicator == scrollBar.GetScrollIndicator());
 
   END_TEST;
 }
@@ -492,18 +496,18 @@ int UtcDaliToolkitScrollBarGetScrollIndicatorN(void)
 
   // Create a scroll bar
   ScrollBar scrollBar = ScrollBar::New();
-  DALI_TEST_CHECK( scrollBar );
+  DALI_TEST_CHECK(scrollBar);
 
   Actor indicator = scrollBar.GetScrollIndicator();
-  DALI_TEST_CHECK( indicator );
+  DALI_TEST_CHECK(indicator);
 
   // Try to set an uninitialized actor as the indicator
   Actor uninitializedIndicator;
   scrollBar.SetScrollIndicator(uninitializedIndicator);
 
   // Check that the indicator has not been changed
-  DALI_TEST_CHECK( indicator == scrollBar.GetScrollIndicator() );
-  DALI_TEST_CHECK( uninitializedIndicator != scrollBar.GetScrollIndicator() );
+  DALI_TEST_CHECK(indicator == scrollBar.GetScrollIndicator());
+  DALI_TEST_CHECK(uninitializedIndicator != scrollBar.GetScrollIndicator());
 
   END_TEST;
 }
@@ -513,17 +517,17 @@ int UtcDaliToolkitScrollBarSetScrollPositionIntervalsP(void)
   ToolkitTestApplication application;
 
   // Create a vertical scroll bar
-  ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical);
-  DALI_TEST_CHECK( scrollBar );
+  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.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) );
+  scrollBar.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
+  scrollBar.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
+  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 );
+  scrollBar.ScrollPositionIntervalReachedSignal().Connect(&OnScrollPositionIntervalReached);
 
   // Render and notify
   application.SendNotification();
@@ -531,18 +535,18 @@ 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 );
-  Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "sourcePositionMin",   0.0f );
-  Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "sourcePositionMax",   800.0f );
-  Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "sourceContentSize",   2000.0f );
+  Property::Index propertyScrollPosition    = sourceActor.RegisterProperty("sourcePosition", 0.0f);
+  Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty("sourcePositionMin", 0.0f);
+  Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty("sourcePositionMax", 800.0f);
+  Property::Index propertyScrollContentSize = sourceActor.RegisterProperty("sourceContentSize", 2000.0f);
 
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePosition" ), propertyScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMin" ), propertyMinScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMax" ), propertyMaxScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourceContentSize" ), propertyScrollContentSize, TEST_LOCATION );
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourcePosition"), propertyScrollPosition, TEST_LOCATION);
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourcePositionMin"), propertyMinScrollPosition, TEST_LOCATION);
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourcePositionMax"), propertyMaxScrollPosition, TEST_LOCATION);
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourceContentSize"), propertyScrollContentSize, TEST_LOCATION);
 
   // Set the source of the scroll position properties.
   scrollBar.SetScrollPropertySource(sourceActor, propertyScrollPosition, propertyMinScrollPosition, propertyMaxScrollPosition, propertyScrollContentSize);
@@ -553,9 +557,9 @@ int UtcDaliToolkitScrollBarSetScrollPositionIntervalsP(void)
 
   // Set the values to get notified when the scroll positions of the source actor goes above or below these values
   Dali::Vector<float> positionIntervals;
-  for( size_t i = 0; i != 10; ++i )
+  for(size_t i = 0; i != 10; ++i)
   {
-    positionIntervals.PushBack( -80.0f * i ); // should get notified for each 80 pixels
+    positionIntervals.PushBack(-80.0f * i); // should get notified for each 80 pixels
   }
   scrollBar.SetScrollPositionIntervals(positionIntervals);
 
@@ -563,31 +567,31 @@ int UtcDaliToolkitScrollBarSetScrollPositionIntervalsP(void)
   Dali::Vector<float> results = scrollBar.GetScrollPositionIntervals();
 
   // Check that the result is the same as the list previously set.
-  DALI_TEST_EQUALS( positionIntervals.Count(), results.Count(), TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[0], results[0], TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[1], results[1], TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[2], results[2], TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[3], results[3], TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[4], results[4], TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[5], results[5], TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[6], results[6], TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[7], results[7], TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[8], results[8], TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[9], results[9], TEST_LOCATION );
+  DALI_TEST_EQUALS(positionIntervals.Count(), results.Count(), TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[0], results[0], TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[1], results[1], TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[2], results[2], TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[3], results[3], TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[4], results[4], TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[5], results[5], TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[6], results[6], TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[7], results[7], TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[8], results[8], TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[9], results[9], TEST_LOCATION);
 
   // Reset the flag
   gOnScrollPositionIntervalReachedSignalCalled = false;
 
   // Animate the scroll position to cross the specified value
   Animation animation = Animation::New(0.1f);
-  animation.AnimateTo( Property( sourceActor, propertyScrollPosition ), -85.0f );
+  animation.AnimateTo(Property(sourceActor, propertyScrollPosition), -85.0f);
   animation.Play();
 
   // Wait for 0.1 second
   Wait(application, 100);
 
   // Check that the signal callback is called
-  DALI_TEST_EQUALS( gOnScrollPositionIntervalReachedSignalCalled, true, TEST_LOCATION );
+  DALI_TEST_EQUALS(gOnScrollPositionIntervalReachedSignalCalled, true, TEST_LOCATION);
 
   // Reset the flag
   gOnScrollPositionIntervalReachedSignalCalled = false;
@@ -598,14 +602,14 @@ int UtcDaliToolkitScrollBarSetScrollPositionIntervalsP(void)
 
   // Animate the scroll position to cross another specified value
   animation = Animation::New(0.1f);
-  animation.AnimateTo( Property( sourceActor, propertyScrollPosition ), -170.0f );
+  animation.AnimateTo(Property(sourceActor, propertyScrollPosition), -170.0f);
   animation.Play();
 
   // Wait for 0.1 second
   Wait(application, 100);
 
   // Check that the signal callback is called
-  DALI_TEST_EQUALS( gOnScrollPositionIntervalReachedSignalCalled, true, TEST_LOCATION );
+  DALI_TEST_EQUALS(gOnScrollPositionIntervalReachedSignalCalled, true, TEST_LOCATION);
 
   // Reset the flag
   gOnScrollPositionIntervalReachedSignalCalled = false;
@@ -616,14 +620,14 @@ int UtcDaliToolkitScrollBarSetScrollPositionIntervalsP(void)
 
   // Animate the scroll position back to the previous value
   animation = Animation::New(0.1f);
-  animation.AnimateTo( Property( sourceActor, propertyScrollPosition ), -85.0f );
+  animation.AnimateTo(Property(sourceActor, propertyScrollPosition), -85.0f);
   animation.Play();
 
   // Wait for 0.1 second
   Wait(application, 100);
 
   // Check that the signal callback is called
-  DALI_TEST_EQUALS( gOnScrollPositionIntervalReachedSignalCalled, true, TEST_LOCATION );
+  DALI_TEST_EQUALS(gOnScrollPositionIntervalReachedSignalCalled, true, TEST_LOCATION);
 
   END_TEST;
 }
@@ -633,14 +637,14 @@ int UtcDaliToolkitScrollBarGetScrollPositionIntervalsP(void)
   ToolkitTestApplication application;
 
   // Create a vertical scroll bar
-  ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical);
-  DALI_TEST_CHECK( scrollBar );
+  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
   Dali::Vector<float> positionIntervals;
-  for( size_t i = 0; i != 10; ++i )
+  for(size_t i = 0; i != 10; ++i)
   {
-    positionIntervals.PushBack( -80.0f * i ); // should get notified for each 80 pixels
+    positionIntervals.PushBack(-80.0f * i); // should get notified for each 80 pixels
   }
   scrollBar.SetScrollPositionIntervals(positionIntervals);
 
@@ -648,31 +652,31 @@ int UtcDaliToolkitScrollBarGetScrollPositionIntervalsP(void)
   Dali::Vector<float> results = scrollBar.GetScrollPositionIntervals();
 
   // Check that the result is the same as the list previously set.
-  DALI_TEST_EQUALS( positionIntervals.Count(), results.Count(), TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[0], results[0], TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[1], results[1], TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[2], results[2], TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[3], results[3], TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[4], results[4], TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[5], results[5], TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[6], results[6], TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[7], results[7], TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[8], results[8], TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[9], results[9], TEST_LOCATION );
+  DALI_TEST_EQUALS(positionIntervals.Count(), results.Count(), TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[0], results[0], TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[1], results[1], TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[2], results[2], TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[3], results[3], TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[4], results[4], TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[5], results[5], TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[6], results[6], TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[7], results[7], TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[8], results[8], TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[9], results[9], TEST_LOCATION);
 
   Property::Array resultArray = scrollBar.GetProperty<Property::Array>(Toolkit::ScrollBar::Property::SCROLL_POSITION_INTERVALS);
 
-  DALI_TEST_EQUALS( positionIntervals.Count(), resultArray.Count(), TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[0], resultArray[0].Get<float>(), TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[1], resultArray[1].Get<float>(), TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[2], resultArray[2].Get<float>(), TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[3], resultArray[3].Get<float>(), TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[4], resultArray[4].Get<float>(), TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[5], resultArray[5].Get<float>(), TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[6], resultArray[6].Get<float>(), TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[7], resultArray[7].Get<float>(), TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[8], resultArray[8].Get<float>(), TEST_LOCATION );
-  DALI_TEST_EQUALS( positionIntervals[9], resultArray[9].Get<float>(), TEST_LOCATION );
+  DALI_TEST_EQUALS(positionIntervals.Count(), resultArray.Count(), TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[0], resultArray[0].Get<float>(), TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[1], resultArray[1].Get<float>(), TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[2], resultArray[2].Get<float>(), TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[3], resultArray[3].Get<float>(), TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[4], resultArray[4].Get<float>(), TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[5], resultArray[5].Get<float>(), TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[6], resultArray[6].Get<float>(), TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[7], resultArray[7].Get<float>(), TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[8], resultArray[8].Get<float>(), TEST_LOCATION);
+  DALI_TEST_EQUALS(positionIntervals[9], resultArray[9].Get<float>(), TEST_LOCATION);
 
   END_TEST;
 }
@@ -682,13 +686,13 @@ int UtcDaliToolkitScrollBarGetScrollDirectionP(void)
   ToolkitTestApplication application;
 
   // Create a vertical scroll bar
-  ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical);
-  DALI_TEST_CHECK( scrollBar );
-  DALI_TEST_CHECK( scrollBar.GetScrollDirection() == ScrollBar::Vertical );
+  ScrollBar scrollBar = ScrollBar::New(ScrollBar::VERTICAL);
+  DALI_TEST_CHECK(scrollBar);
+  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;
 }
@@ -699,26 +703,26 @@ int UtcDaliToolkitScrollBarSetIndicatorHeightPolicyP(void)
 
   // Create a scroll bar
   ScrollBar scrollBar = ScrollBar::New();
-  DALI_TEST_CHECK( scrollBar );
+  DALI_TEST_CHECK(scrollBar);
 
   float scrollBarHeight = 100.0f;
-  scrollBar.SetProperty( Actor::Property::SIZE, Vector3(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 );
-  Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "sourcePositionMin",   0.0f );
-  Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "sourcePositionMax",   100.0f );
-  Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "sourceContentSize",   500.0f );
+  Property::Index propertyScrollPosition    = sourceActor.RegisterProperty("sourcePosition", 0.0f);
+  Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty("sourcePositionMin", 0.0f);
+  Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty("sourcePositionMax", 100.0f);
+  Property::Index propertyScrollContentSize = sourceActor.RegisterProperty("sourceContentSize", 500.0f);
 
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePosition" ), propertyScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMin" ), propertyMinScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMax" ), propertyMaxScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourceContentSize" ), propertyScrollContentSize, TEST_LOCATION );
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourcePosition"), propertyScrollPosition, TEST_LOCATION);
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourcePositionMin"), propertyMinScrollPosition, TEST_LOCATION);
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourcePositionMax"), propertyMaxScrollPosition, TEST_LOCATION);
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourceContentSize"), propertyScrollContentSize, TEST_LOCATION);
 
   // Set the source of the scroll position properties.
   scrollBar.SetScrollPropertySource(sourceActor, propertyScrollPosition, propertyMinScrollPosition, propertyMaxScrollPosition, propertyScrollContentSize);
@@ -728,40 +732,40 @@ int UtcDaliToolkitScrollBarSetIndicatorHeightPolicyP(void)
   application.Render();
 
   Actor indicator = scrollBar.GetScrollIndicator();
-  DALI_TEST_CHECK( indicator );
+  DALI_TEST_CHECK(indicator);
 
   // Check that the indicator size should be: scroll bar size * (scroll bar size / content size).
   // i.e. The bigger the content size, the smaller the indicator size
-  float indicatorHeight = indicator.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).y;
-  DALI_TEST_EQUALS( indicatorHeight, scrollBarHeight * scrollBarHeight / 500.0f, TEST_LOCATION );
+  float indicatorHeight = indicator.GetCurrentProperty<Vector3>(Actor::Property::SIZE).y;
+  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<std::string>(), "Fixed", TEST_LOCATION );
+  DALI_TEST_EQUALS(value.Get<std::string>(), "FIXED", TEST_LOCATION);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Check that the indicator size should be 50.0f
-  indicatorHeight = indicator.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).y;
-  DALI_TEST_EQUALS( indicatorHeight, 50.0f, TEST_LOCATION );
+  indicatorHeight = indicator.GetCurrentProperty<Vector3>(Actor::Property::SIZE).y;
+  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<std::string>(), "Variable", TEST_LOCATION );
+  DALI_TEST_EQUALS(value.Get<std::string>(), "VARIABLE", TEST_LOCATION);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Check that the indicator size should be: scroll bar size * (scroll bar size / content size).
-  indicatorHeight = indicator.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).y;
-  DALI_TEST_EQUALS( indicatorHeight, scrollBarHeight * scrollBarHeight / 500.0f, TEST_LOCATION );
+  indicatorHeight = indicator.GetCurrentProperty<Vector3>(Actor::Property::SIZE).y;
+  DALI_TEST_EQUALS(indicatorHeight, scrollBarHeight * scrollBarHeight / 500.0f, TEST_LOCATION);
 
   END_TEST;
 }
@@ -772,15 +776,15 @@ int UtcDaliToolkitScrollBarGetIndicatorHeightPolicyP(void)
 
   // Create a scroll bar
   ScrollBar scrollBar = ScrollBar::New();
-  DALI_TEST_CHECK( scrollBar );
+  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;
 }
@@ -791,17 +795,17 @@ int UtcDaliToolkitScrollBarSetIndicatorFixedHeightP(void)
 
   // Create a scroll bar
   ScrollBar scrollBar = ScrollBar::New();
-  DALI_TEST_CHECK( scrollBar );
+  DALI_TEST_CHECK(scrollBar);
 
   float scrollBarHeight = 100.0f;
-  scrollBar.SetProperty( Actor::Property::SIZE, Vector3(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 );
+  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
@@ -809,7 +813,7 @@ int UtcDaliToolkitScrollBarSetIndicatorFixedHeightP(void)
   application.Render();
 
   // Check that the indicator size should be 50.0f
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).y, 50.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(indicator.GetCurrentProperty<Vector3>(Actor::Property::SIZE).y, 50.0f, TEST_LOCATION);
 
   // Set the indicator height to be fixed to 25.0f
   scrollBar.SetIndicatorFixedHeight(25.0f);
@@ -819,7 +823,7 @@ int UtcDaliToolkitScrollBarSetIndicatorFixedHeightP(void)
   application.Render();
 
   // Check that the indicator size should be 25.0f
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).y, 25.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(indicator.GetCurrentProperty<Vector3>(Actor::Property::SIZE).y, 25.0f, TEST_LOCATION);
 
   END_TEST;
 }
@@ -830,19 +834,19 @@ int UtcDaliToolkitScrollBarGetIndicatorFixedHeightP(void)
 
   // Create a scroll bar
   ScrollBar scrollBar = ScrollBar::New();
-  DALI_TEST_CHECK( scrollBar );
+  DALI_TEST_CHECK(scrollBar);
 
   // Set the fixed indicator height to be 50.0f
   scrollBar.SetIndicatorFixedHeight(50.0f);
 
   // Check that the indicator size should be 50.0f
-  DALI_TEST_EQUALS( scrollBar.GetIndicatorFixedHeight(), 50.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(scrollBar.GetIndicatorFixedHeight(), 50.0f, TEST_LOCATION);
 
   // Set the indicator height to be fixed to 25.0f
   scrollBar.SetIndicatorFixedHeight(25.0f);
 
   // Check that the indicator size should be 50.0f
-  DALI_TEST_EQUALS( scrollBar.GetIndicatorFixedHeight(), 25.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(scrollBar.GetIndicatorFixedHeight(), 25.0f, TEST_LOCATION);
 
   END_TEST;
 }
@@ -853,26 +857,26 @@ int UtcDaliToolkitScrollBarSetIndicatorShowDurationP(void)
 
   // Create a scroll bar
   ScrollBar scrollBar = ScrollBar::New();
-  DALI_TEST_CHECK( scrollBar );
+  DALI_TEST_CHECK(scrollBar);
 
-  Stage::GetCurrent().Add( scrollBar );
+  application.GetScene().Add(scrollBar);
 
   Actor indicator = scrollBar.GetScrollIndicator();
-  DALI_TEST_CHECK( indicator );
+  DALI_TEST_CHECK(indicator);
 
   // Set the duration to show the indicator to be 0.35 second
   scrollBar.SetIndicatorShowDuration(0.35);
-  DALI_TEST_EQUALS( scrollBar.GetIndicatorShowDuration(), 0.35f, TEST_LOCATION );
+  DALI_TEST_EQUALS(scrollBar.GetIndicatorShowDuration(), 0.35f, TEST_LOCATION);
 
   // Make the indicator invisible
-  indicator.SetProperty( Actor::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 >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY), 0.0f, TEST_LOCATION);
 
   // Show the indicator
   scrollBar.ShowIndicator();
@@ -885,21 +889,21 @@ int UtcDaliToolkitScrollBarSetIndicatorShowDurationP(void)
   application.Render();
 
   // Check that the indicator is now visible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::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 );
+  DALI_TEST_EQUALS(scrollBar.GetIndicatorShowDuration(), 0.75f, TEST_LOCATION);
 
   // Make the indicator invisible
-  indicator.SetProperty( Actor::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 >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY), 0.0f, TEST_LOCATION);
 
   // Show the indicator
   scrollBar.ShowIndicator();
@@ -912,7 +916,7 @@ int UtcDaliToolkitScrollBarSetIndicatorShowDurationP(void)
   application.Render();
 
   // Check that the indicator is not fully visible yet
-  DALI_TEST_CHECK( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ) != 1.0f );
+  DALI_TEST_CHECK(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY) != 1.0f);
 
   // Wait for another 0.4 second
   Wait(application, 400);
@@ -922,7 +926,7 @@ int UtcDaliToolkitScrollBarSetIndicatorShowDurationP(void)
   application.Render();
 
   // Check that the indicator is now fully visible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY), 1.0f, TEST_LOCATION);
 
   END_TEST;
 }
@@ -933,28 +937,28 @@ int UtcDaliToolkitScrollBarSetIndicatorShowDurationN(void)
 
   // Create a scroll bar
   ScrollBar scrollBar = ScrollBar::New();
-  DALI_TEST_CHECK( scrollBar );
+  DALI_TEST_CHECK(scrollBar);
 
-  Stage::GetCurrent().Add( scrollBar );
+  application.GetScene().Add(scrollBar);
 
   Actor indicator = scrollBar.GetScrollIndicator();
-  DALI_TEST_CHECK( indicator );
+  DALI_TEST_CHECK(indicator);
 
   // Get the default duration to show the indicator
   float duration = scrollBar.GetIndicatorShowDuration();
 
   // Check that the default duration is greater than 0
-  DALI_TEST_CHECK( duration > 0.0f );
+  DALI_TEST_CHECK(duration > 0.0f);
 
   // Make the indicator invisible
-  indicator.SetProperty( Actor::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 >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY), 0.0f, TEST_LOCATION);
 
   // Show the indicator
   scrollBar.ShowIndicator();
@@ -967,21 +971,21 @@ int UtcDaliToolkitScrollBarSetIndicatorShowDurationN(void)
   application.Render();
 
   // Check that the indicator is now visible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::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 );
+  DALI_TEST_EQUALS(scrollBar.GetIndicatorShowDuration(), -0.25f, TEST_LOCATION);
 
   // Make the indicator invisible
-  indicator.SetProperty( Actor::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 >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY), 0.0f, TEST_LOCATION);
 
   // Show the indicator
   scrollBar.ShowIndicator();
@@ -991,7 +995,7 @@ int UtcDaliToolkitScrollBarSetIndicatorShowDurationN(void)
   application.Render();
 
   // Check that the indicator becomes instantly visible in the next frame
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY), 1.0f, TEST_LOCATION);
 
   END_TEST;
 }
@@ -1002,19 +1006,19 @@ int UtcDaliToolkitScrollBarGetIndicatorShowDurationP(void)
 
   // Create a scroll bar
   ScrollBar scrollBar = ScrollBar::New();
-  DALI_TEST_CHECK( scrollBar );
+  DALI_TEST_CHECK(scrollBar);
 
   // Set the duration to show the indicator to be 0.35 second
   scrollBar.SetIndicatorShowDuration(0.35f);
 
   // Check that the duration to show the indicator is 0.35 second
-  DALI_TEST_EQUALS( scrollBar.GetIndicatorShowDuration(), 0.35f, TEST_LOCATION );
+  DALI_TEST_EQUALS(scrollBar.GetIndicatorShowDuration(), 0.35f, TEST_LOCATION);
 
   // Set the duration to show the indicator to be 0.75 second
   scrollBar.SetIndicatorShowDuration(0.75f);
 
   // Check that the duration to show the indicator is 0.75 second
-  DALI_TEST_EQUALS( scrollBar.GetIndicatorShowDuration(), 0.75f, TEST_LOCATION );
+  DALI_TEST_EQUALS(scrollBar.GetIndicatorShowDuration(), 0.75f, TEST_LOCATION);
 
   END_TEST;
 }
@@ -1025,26 +1029,26 @@ int UtcDaliToolkitScrollBarSetIndicatorHideDurationP(void)
 
   // Create a scroll bar
   ScrollBar scrollBar = ScrollBar::New();
-  DALI_TEST_CHECK( scrollBar );
+  DALI_TEST_CHECK(scrollBar);
 
-  Stage::GetCurrent().Add( scrollBar );
+  application.GetScene().Add(scrollBar);
 
   Actor indicator = scrollBar.GetScrollIndicator();
-  DALI_TEST_CHECK( indicator );
+  DALI_TEST_CHECK(indicator);
 
   // Set the duration to hide the indicator to be 0.15 second
   scrollBar.SetIndicatorHideDuration(0.15f);
-  DALI_TEST_EQUALS( scrollBar.GetIndicatorHideDuration(), 0.15f, TEST_LOCATION );
+  DALI_TEST_EQUALS(scrollBar.GetIndicatorHideDuration(), 0.15f, TEST_LOCATION);
 
   // Make the indicator visible
-  indicator.SetProperty( Actor::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 >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY), 1.0f, TEST_LOCATION);
 
   // Hide the indicator
   scrollBar.HideIndicator();
@@ -1057,21 +1061,21 @@ int UtcDaliToolkitScrollBarSetIndicatorHideDurationP(void)
   application.Render();
 
   // Check that the indicator is now invisible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::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 );
+  DALI_TEST_EQUALS(scrollBar.GetIndicatorHideDuration(), 0.65f, TEST_LOCATION);
 
   // Make the indicator visible
-  indicator.SetProperty( Actor::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 >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY), 1.0f, TEST_LOCATION);
 
   // Hide the indicator
   scrollBar.HideIndicator();
@@ -1084,7 +1088,7 @@ int UtcDaliToolkitScrollBarSetIndicatorHideDurationP(void)
   application.Render();
 
   // Check that the indicator is not fully invisible yet
-  DALI_TEST_CHECK( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ) != 0.0f );
+  DALI_TEST_CHECK(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY) != 0.0f);
 
   // Wait for another 0.5 second
   Wait(application, 500);
@@ -1094,7 +1098,7 @@ int UtcDaliToolkitScrollBarSetIndicatorHideDurationP(void)
   application.Render();
 
   // Check that the indicator is now fully invisible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY), 0.0f, TEST_LOCATION);
 
   END_TEST;
 }
@@ -1105,28 +1109,28 @@ int UtcDaliToolkitScrollBarSetIndicatorHideDurationN(void)
 
   // Create a scroll bar
   ScrollBar scrollBar = ScrollBar::New();
-  DALI_TEST_CHECK( scrollBar );
+  DALI_TEST_CHECK(scrollBar);
 
-  Stage::GetCurrent().Add( scrollBar );
+  application.GetScene().Add(scrollBar);
 
   Actor indicator = scrollBar.GetScrollIndicator();
-  DALI_TEST_CHECK( indicator );
+  DALI_TEST_CHECK(indicator);
 
   // Get the default duration to hide the indicator
   float duration = scrollBar.GetIndicatorHideDuration();
 
   // Check that the default duration is greater than 0
-  DALI_TEST_CHECK( duration > 0.0f );
+  DALI_TEST_CHECK(duration > 0.0f);
 
   // Make the indicator visible
-  indicator.SetProperty( Actor::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 >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY), 1.0f, TEST_LOCATION);
 
   // Hide the indicator
   scrollBar.HideIndicator();
@@ -1139,21 +1143,21 @@ int UtcDaliToolkitScrollBarSetIndicatorHideDurationN(void)
   application.Render();
 
   // Check that the indicator is now invisible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::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 );
+  DALI_TEST_EQUALS(scrollBar.GetIndicatorHideDuration(), -0.25f, TEST_LOCATION);
 
   // Make the indicator visible
-  indicator.SetProperty( Actor::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 >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY), 1.0f, TEST_LOCATION);
 
   // Hide the indicator
   scrollBar.HideIndicator();
@@ -1163,7 +1167,7 @@ int UtcDaliToolkitScrollBarSetIndicatorHideDurationN(void)
   application.Render();
 
   // Check that the indicator becomes instantly invisible in the next frame
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY), 0.0f, TEST_LOCATION);
 
   END_TEST;
 }
@@ -1174,19 +1178,19 @@ int UtcDaliToolkitScrollBarGetIndicatorHideDurationP(void)
 
   // Create a scroll bar
   ScrollBar scrollBar = ScrollBar::New();
-  DALI_TEST_CHECK( scrollBar );
+  DALI_TEST_CHECK(scrollBar);
 
   // Set the duration to hide the indicator to be 0.15 second
   scrollBar.SetIndicatorHideDuration(0.15f);
 
   // Check that the duration to hide the indicator is 0.15 second
-  DALI_TEST_EQUALS( scrollBar.GetIndicatorHideDuration(), 0.15f, TEST_LOCATION );
+  DALI_TEST_EQUALS(scrollBar.GetIndicatorHideDuration(), 0.15f, TEST_LOCATION);
 
   // Set the duration to hide the indicator to be 0.65 second
   scrollBar.SetIndicatorHideDuration(0.65f);
 
   // Check that the duration to hide the indicator is 0.65 second
-  DALI_TEST_EQUALS( scrollBar.GetIndicatorHideDuration(), 0.65f, TEST_LOCATION );
+  DALI_TEST_EQUALS(scrollBar.GetIndicatorHideDuration(), 0.65f, TEST_LOCATION);
 
   END_TEST;
 }
@@ -1197,28 +1201,28 @@ int UtcDaliToolkitScrollBarShowIndicatorP(void)
 
   // Create a scroll bar
   ScrollBar scrollBar = ScrollBar::New();
-  DALI_TEST_CHECK( scrollBar );
+  DALI_TEST_CHECK(scrollBar);
 
-  Stage::GetCurrent().Add( scrollBar );
+  application.GetScene().Add(scrollBar);
 
   Actor indicator = scrollBar.GetScrollIndicator();
-  DALI_TEST_CHECK( indicator );
+  DALI_TEST_CHECK(indicator);
 
   // Get the default duration to show the indicator
   float duration = scrollBar.GetIndicatorShowDuration();
 
   // Check that the default duration is greater than 0
-  DALI_TEST_CHECK( duration > 0.0f );
+  DALI_TEST_CHECK(duration > 0.0f);
 
   // Make the indicator invisible
-  indicator.SetProperty( Actor::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 >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY), 0.0f, TEST_LOCATION);
 
   // Show the indicator
   scrollBar.ShowIndicator();
@@ -1231,7 +1235,7 @@ int UtcDaliToolkitScrollBarShowIndicatorP(void)
   application.Render();
 
   // Check that the indicator is now visible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY), 1.0f, TEST_LOCATION);
 
   END_TEST;
 }
@@ -1242,28 +1246,28 @@ int UtcDaliToolkitScrollBarShowIndicatorN(void)
 
   // Create a scroll bar
   ScrollBar scrollBar = ScrollBar::New();
-  DALI_TEST_CHECK( scrollBar );
+  DALI_TEST_CHECK(scrollBar);
 
-  Stage::GetCurrent().Add( scrollBar );
+  application.GetScene().Add(scrollBar);
 
   Actor indicator = scrollBar.GetScrollIndicator();
-  DALI_TEST_CHECK( indicator );
+  DALI_TEST_CHECK(indicator);
 
   // Make the indicator initially visible
-  indicator.SetProperty( Actor::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 >( Actor::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();
 
   // Check that the default duration is greater than 0
-  DALI_TEST_CHECK( duration > 0.0f );
+  DALI_TEST_CHECK(duration > 0.0f);
 
   // Show the indicator
   scrollBar.ShowIndicator();
@@ -1273,7 +1277,7 @@ int UtcDaliToolkitScrollBarShowIndicatorN(void)
   application.Render();
 
   // Check that the indicator is still visible in the very next frame
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY), 1.0f, TEST_LOCATION);
 
   END_TEST;
 }
@@ -1284,28 +1288,28 @@ int UtcDaliToolkitScrollBarHideIndicatorP(void)
 
   // Create a scroll bar
   ScrollBar scrollBar = ScrollBar::New();
-  DALI_TEST_CHECK( scrollBar );
+  DALI_TEST_CHECK(scrollBar);
 
-  Stage::GetCurrent().Add( scrollBar );
+  application.GetScene().Add(scrollBar);
 
   Actor indicator = scrollBar.GetScrollIndicator();
-  DALI_TEST_CHECK( indicator );
+  DALI_TEST_CHECK(indicator);
 
   // Get the default duration to hide the indicator
   float duration = scrollBar.GetIndicatorHideDuration();
 
   // Check that the default duration is greater than 0
-  DALI_TEST_CHECK( duration > 0.0f );
+  DALI_TEST_CHECK(duration > 0.0f);
 
   // Make the indicator visible
-  indicator.SetProperty( Actor::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 >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY), 1.0f, TEST_LOCATION);
 
   // Hide the indicator
   scrollBar.HideIndicator();
@@ -1318,7 +1322,7 @@ int UtcDaliToolkitScrollBarHideIndicatorP(void)
   application.Render();
 
   // Check that the indicator is now invisible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY), 0.0f, TEST_LOCATION);
 
   END_TEST;
 }
@@ -1329,28 +1333,28 @@ int UtcDaliToolkitScrollBarHideIndicatorN(void)
 
   // Create a scroll bar
   ScrollBar scrollBar = ScrollBar::New();
-  DALI_TEST_CHECK( scrollBar );
+  DALI_TEST_CHECK(scrollBar);
 
-  Stage::GetCurrent().Add( scrollBar );
+  application.GetScene().Add(scrollBar);
 
   Actor indicator = scrollBar.GetScrollIndicator();
-  DALI_TEST_CHECK( indicator );
+  DALI_TEST_CHECK(indicator);
 
   // Make the indicator initially invisible
-  indicator.SetProperty( Actor::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 >( Actor::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();
 
   // Check that the default duration is greater than 0
-  DALI_TEST_CHECK( duration > 0.0f );
+  DALI_TEST_CHECK(duration > 0.0f);
 
   // Hide the indicator
   scrollBar.HideIndicator();
@@ -1360,7 +1364,7 @@ int UtcDaliToolkitScrollBarHideIndicatorN(void)
   application.Render();
 
   // Check that the indicator is still invisible in the very next frame
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY), 0.0f, TEST_LOCATION);
 
   END_TEST;
 }
@@ -1371,32 +1375,32 @@ int UtcDaliToolkitScrollBarActionShowIndicator(void)
 
   // Create a scroll bar
   ScrollBar scrollBar = ScrollBar::New();
-  DALI_TEST_CHECK( scrollBar );
+  DALI_TEST_CHECK(scrollBar);
 
-  Stage::GetCurrent().Add( scrollBar );
+  application.GetScene().Add(scrollBar);
 
   Actor indicator = scrollBar.GetScrollIndicator();
-  DALI_TEST_CHECK( indicator );
+  DALI_TEST_CHECK(indicator);
 
   // Get the default duration to hide the indicator
-  float duration = scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_SHOW_DURATION );
+  float duration = scrollBar.GetProperty<float>(ScrollBar::Property::INDICATOR_SHOW_DURATION);
 
   // Check that the default duration is greater than 0
-  DALI_TEST_CHECK( duration > 0.0f );
+  DALI_TEST_CHECK(duration > 0.0f);
 
   // Make the indicator invisible
-  indicator.SetProperty( Actor::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 >( Actor::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;
-  scrollBar.DoAction( "ShowIndicator", emptyMap );
+  scrollBar.DoAction("ShowIndicator", emptyMap);
 
   // Wait for the specified duration
   Wait(application, duration * 1000);
@@ -1406,7 +1410,7 @@ int UtcDaliToolkitScrollBarActionShowIndicator(void)
   application.Render();
 
   // Check that the indicator is now visible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY), 1.0f, TEST_LOCATION);
 
   END_TEST;
 }
@@ -1417,32 +1421,32 @@ int UtcDaliToolkitScrollBarActionHideIndicator(void)
 
   // Create a scroll bar
   ScrollBar scrollBar = ScrollBar::New();
-  DALI_TEST_CHECK( scrollBar );
+  DALI_TEST_CHECK(scrollBar);
 
-  Stage::GetCurrent().Add( scrollBar );
+  application.GetScene().Add(scrollBar);
 
   Actor indicator = scrollBar.GetScrollIndicator();
-  DALI_TEST_CHECK( indicator );
+  DALI_TEST_CHECK(indicator);
 
   // Get the default duration to hide the indicator
-  float duration = scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_HIDE_DURATION );
+  float duration = scrollBar.GetProperty<float>(ScrollBar::Property::INDICATOR_HIDE_DURATION);
 
   // Check that the default duration is greater than 0
-  DALI_TEST_CHECK( duration > 0.0f );
+  DALI_TEST_CHECK(duration > 0.0f);
 
   // Make the indicator visible
-  indicator.SetProperty( Actor::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 >( Actor::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;
-  scrollBar.DoAction( "HideIndicator", emptyMap );
+  scrollBar.DoAction("HideIndicator", emptyMap);
 
   // Wait for the specified duration
   Wait(application, duration * 1000);
@@ -1452,7 +1456,7 @@ int UtcDaliToolkitScrollBarActionHideIndicator(void)
   application.Render();
 
   // Check that the indicator is now invisible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY), 0.0f, TEST_LOCATION);
 
   END_TEST;
 }
@@ -1463,32 +1467,32 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicator(void)
 
   // Create a scroll bar
   ScrollBar scrollBar = ScrollBar::New();
-  DALI_TEST_CHECK( scrollBar );
+  DALI_TEST_CHECK(scrollBar);
 
-  Stage::GetCurrent().Add( scrollBar );
+  application.GetScene().Add(scrollBar);
 
   Actor indicator = scrollBar.GetScrollIndicator();
-  DALI_TEST_CHECK( indicator );
+  DALI_TEST_CHECK(indicator);
 
   // Get the default duration to hide the indicator
-  float duration = scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_SHOW_DURATION );
+  float duration = scrollBar.GetProperty<float>(ScrollBar::Property::INDICATOR_SHOW_DURATION);
 
   // Check that the default duration is greater than 0
-  DALI_TEST_CHECK( duration > 0.0f );
+  DALI_TEST_CHECK(duration > 0.0f);
 
   // Make the indicator invisible
-  indicator.SetProperty( Actor::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 >( Actor::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;
-  scrollBar.DoAction( "ShowTransientIndicator", emptyMap );
+  scrollBar.DoAction("ShowTransientIndicator", emptyMap);
 
   // Wait for the specified duration
   Wait(application, duration * 1000);
@@ -1498,15 +1502,15 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicator(void)
   application.Render();
 
   // Check that the indicator is now visible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::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<float>( ScrollBar::Property::INDICATOR_HIDE_DURATION );
-  float transientDuration = scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_TRANSIENT_DURATION );
+  float hideDuration         = scrollBar.GetProperty<float>(ScrollBar::Property::INDICATOR_HIDE_DURATION);
+  float transientDuration    = scrollBar.GetProperty<float>(ScrollBar::Property::INDICATOR_TRANSIENT_DURATION);
   float totalVisibleDuration = hideDuration + transientDuration;
 
   // Check that the default duration is greater than 0
-  DALI_TEST_CHECK( totalVisibleDuration > 0.0f );
+  DALI_TEST_CHECK(totalVisibleDuration > 0.0f);
 
   // Wait for the specified duration
   Wait(application, totalVisibleDuration * 1000);
@@ -1516,7 +1520,7 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicator(void)
   application.Render();
 
   // Check that the indicator is now invisible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY), 0.0f, TEST_LOCATION);
 
   END_TEST;
 }
@@ -1527,20 +1531,20 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicatorImmediate(void)
 
   // Create a scroll bar
   ScrollBar scrollBar = ScrollBar::New();
-  DALI_TEST_CHECK( scrollBar );
+  DALI_TEST_CHECK(scrollBar);
 
-  Stage::GetCurrent().Add( scrollBar );
+  application.GetScene().Add(scrollBar);
 
   Actor indicator = scrollBar.GetScrollIndicator();
-  DALI_TEST_CHECK( indicator );
+  DALI_TEST_CHECK(indicator);
 
   // Make the indicator invisible
-  indicator.SetProperty( Actor::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 );
-  float duration = scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_SHOW_DURATION );
-  DALI_TEST_EQUALS( duration, 0.0f, TEST_LOCATION );
+  scrollBar.SetProperty(ScrollBar::Property::INDICATOR_SHOW_DURATION, 0.0f);
+  float duration = scrollBar.GetProperty<float>(ScrollBar::Property::INDICATOR_SHOW_DURATION);
+  DALI_TEST_EQUALS(duration, 0.0f, TEST_LOCATION);
 
   // Render and notify
   application.SendNotification();
@@ -1548,7 +1552,7 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicatorImmediate(void)
 
   // Do the "ShowIndicator" action
   Property::Map emptyMap;
-  scrollBar.DoAction( "ShowTransientIndicator", emptyMap );
+  scrollBar.DoAction("ShowTransientIndicator", emptyMap);
 
   // Wait for the specified duration
   Wait(application);
@@ -1558,15 +1562,15 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicatorImmediate(void)
   application.Render();
 
   // Check that the indicator is now visible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::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<float>( ScrollBar::Property::INDICATOR_HIDE_DURATION );
-  float transientDuration = scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_TRANSIENT_DURATION );
+  float hideDuration         = scrollBar.GetProperty<float>(ScrollBar::Property::INDICATOR_HIDE_DURATION);
+  float transientDuration    = scrollBar.GetProperty<float>(ScrollBar::Property::INDICATOR_TRANSIENT_DURATION);
   float totalVisibleDuration = hideDuration + transientDuration;
 
   // Check that the default duration is greater than 0
-  DALI_TEST_CHECK( totalVisibleDuration > 0.0f );
+  DALI_TEST_CHECK(totalVisibleDuration > 0.0f);
 
   // Wait for the specified duration
   Wait(application, totalVisibleDuration * 1000);
@@ -1576,7 +1580,7 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicatorImmediate(void)
   application.Render();
 
   // Check that the indicator is now invisible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY), 0.0f, TEST_LOCATION);
 
   END_TEST;
 }
@@ -1587,28 +1591,28 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicatorDuringHide(void)
 
   // Create a scroll bar
   ScrollBar scrollBar = ScrollBar::New();
-  DALI_TEST_CHECK( scrollBar );
+  DALI_TEST_CHECK(scrollBar);
 
-  Stage::GetCurrent().Add( scrollBar );
+  application.GetScene().Add(scrollBar);
 
   Actor indicator = scrollBar.GetScrollIndicator();
-  DALI_TEST_CHECK( indicator );
+  DALI_TEST_CHECK(indicator);
 
   // Get the default duration to hide the indicator
   float duration = scrollBar.GetIndicatorHideDuration();
 
   // Check that the default duration is greater than 0
-  DALI_TEST_CHECK( duration > 0.0f );
+  DALI_TEST_CHECK(duration > 0.0f);
 
   // Make the indicator visible
-  indicator.SetProperty( Actor::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 >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY), 1.0f, TEST_LOCATION);
 
   // Hide the indicator
   scrollBar.HideIndicator();
@@ -1621,19 +1625,19 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicatorDuringHide(void)
   application.Render();
 
   // Check that the indicator is now partially hidden
-  DALI_TEST_CHECK( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ) < 1.0f );
+  DALI_TEST_CHECK(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY) < 1.0f);
 
   // Now interrupt the Hide with a DoAction( "ShowTransientIndicator" )
 
   // Get the default duration to hide the indicator
-  duration = scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_SHOW_DURATION );
+  duration = scrollBar.GetProperty<float>(ScrollBar::Property::INDICATOR_SHOW_DURATION);
 
   // Check that the default duration is greater than 0
-  DALI_TEST_CHECK( duration > 0.0f );
+  DALI_TEST_CHECK(duration > 0.0f);
 
   // Do the "ShowIndicator" action
   Property::Map emptyMap;
-  scrollBar.DoAction( "ShowTransientIndicator", emptyMap );
+  scrollBar.DoAction("ShowTransientIndicator", emptyMap);
 
   // Wait for the specified duration
   Wait(application, duration * 1000);
@@ -1643,15 +1647,15 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicatorDuringHide(void)
   application.Render();
 
   // Check that the indicator is now visible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::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<float>( ScrollBar::Property::INDICATOR_HIDE_DURATION );
-  float transientDuration = scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_TRANSIENT_DURATION );
+  float hideDuration         = scrollBar.GetProperty<float>(ScrollBar::Property::INDICATOR_HIDE_DURATION);
+  float transientDuration    = scrollBar.GetProperty<float>(ScrollBar::Property::INDICATOR_TRANSIENT_DURATION);
   float totalVisibleDuration = hideDuration + transientDuration;
 
   // Check that the default duration is greater than 0
-  DALI_TEST_CHECK( totalVisibleDuration > 0.0f );
+  DALI_TEST_CHECK(totalVisibleDuration > 0.0f);
 
   // Wait for the specified duration
   Wait(application, totalVisibleDuration * 1000);
@@ -1661,7 +1665,7 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicatorDuringHide(void)
   application.Render();
 
   // Check that the indicator is now invisible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS(indicator.GetCurrentProperty<float>(Actor::Property::OPACITY), 0.0f, TEST_LOCATION);
 
   END_TEST;
 }
@@ -1671,24 +1675,24 @@ int UtcDaliToolkitScrollBarPanFinishedSignalP(void)
   ToolkitTestApplication application;
 
   // Create a vertical scroll bar
-  ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical);
-  DALI_TEST_CHECK( scrollBar );
+  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.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) );
+  scrollBar.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
+  scrollBar.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
+  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;
-  bool panFinished = false;
-  scrollBar.PanFinishedSignal().Connect( &OnPanFinished );
-  scrollBar.ConnectSignal( &connectionTracker, "panFinished", CallbackFunctor(&panFinished));
+  bool              panFinished = false;
+  scrollBar.PanFinishedSignal().Connect(&OnPanFinished);
+  scrollBar.ConnectSignal(&connectionTracker, "panFinished", CallbackFunctor(&panFinished));
 
   // Render and notify
   application.SendNotification();
@@ -1696,18 +1700,18 @@ 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 );
-  Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "sourcePositionMin",   0.0f );
-  Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "sourcePositionMax",   100.0f );
-  Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "sourceContentSize",   500.0f );
+  Property::Index propertyScrollPosition    = sourceActor.RegisterProperty("sourcePosition", 0.0f);
+  Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty("sourcePositionMin", 0.0f);
+  Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty("sourcePositionMax", 100.0f);
+  Property::Index propertyScrollContentSize = sourceActor.RegisterProperty("sourceContentSize", 500.0f);
 
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePosition" ), propertyScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMin" ), propertyMinScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMax" ), propertyMaxScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourceContentSize" ), propertyScrollContentSize, TEST_LOCATION );
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourcePosition"), propertyScrollPosition, TEST_LOCATION);
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourcePositionMin"), propertyMinScrollPosition, TEST_LOCATION);
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourcePositionMax"), propertyMaxScrollPosition, TEST_LOCATION);
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourceContentSize"), propertyScrollContentSize, TEST_LOCATION);
 
   // Set the source of the scroll position properties.
   scrollBar.SetScrollPropertySource(sourceActor, propertyScrollPosition, propertyMinScrollPosition, propertyMaxScrollPosition, propertyScrollContentSize);
@@ -1718,8 +1722,8 @@ int UtcDaliToolkitScrollBarPanFinishedSignalP(void)
 
   // Perform a swipe gesture on the indicator
   PerformGestureSwipe(application, Vector2(1.0f, 1.0f), Vector2(Vector2::YAXIS * 1.0f), 1, 500);
-  DALI_TEST_EQUALS( gOnPanFinishedCalled, true, TEST_LOCATION );
-  DALI_TEST_EQUALS( panFinished, true, TEST_LOCATION );
+  DALI_TEST_EQUALS(gOnPanFinishedCalled, true, TEST_LOCATION);
+  DALI_TEST_EQUALS(panFinished, true, TEST_LOCATION);
 
   END_TEST;
 }
@@ -1729,24 +1733,24 @@ int UtcDaliToolkitScrollBarPanFinishedSignalN(void)
   ToolkitTestApplication application;
 
   // Create a vertical scroll bar
-  ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical);
-  DALI_TEST_CHECK( scrollBar );
+  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.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) );
+  scrollBar.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
+  scrollBar.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
+  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;
-  bool panFinished = false;
-  scrollBar.PanFinishedSignal().Connect( &OnPanFinished );
-  scrollBar.ConnectSignal( &connectionTracker, "panFinished", CallbackFunctor(&panFinished));
+  bool              panFinished = false;
+  scrollBar.PanFinishedSignal().Connect(&OnPanFinished);
+  scrollBar.ConnectSignal(&connectionTracker, "panFinished", CallbackFunctor(&panFinished));
 
   // Render and notify
   application.SendNotification();
@@ -1754,22 +1758,22 @@ int UtcDaliToolkitScrollBarPanFinishedSignalN(void)
 
   // Perform a vertical swipe gesture on the indicator when there is no source object set on the scroll bar
   PerformGestureSwipe(application, Vector2(1.0f, 1.0f), Vector2(Vector2::YAXIS * 1.0f), 20, 500);
-  DALI_TEST_EQUALS( gOnPanFinishedCalled, false, TEST_LOCATION );
+  DALI_TEST_EQUALS(gOnPanFinishedCalled, false, TEST_LOCATION);
 
   // 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 );
-  Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "sourcePositionMin",   0.0f );
-  Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "sourcePositionMax",   100.0f );
-  Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "sourceContentSize",   500.0f );
+  Property::Index propertyScrollPosition    = sourceActor.RegisterProperty("sourcePosition", 0.0f);
+  Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty("sourcePositionMin", 0.0f);
+  Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty("sourcePositionMax", 100.0f);
+  Property::Index propertyScrollContentSize = sourceActor.RegisterProperty("sourceContentSize", 500.0f);
 
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePosition" ), propertyScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMin" ), propertyMinScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMax" ), propertyMaxScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourceContentSize" ), propertyScrollContentSize, TEST_LOCATION );
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourcePosition"), propertyScrollPosition, TEST_LOCATION);
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourcePositionMin"), propertyMinScrollPosition, TEST_LOCATION);
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourcePositionMax"), propertyMaxScrollPosition, TEST_LOCATION);
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourceContentSize"), propertyScrollContentSize, TEST_LOCATION);
 
   // Set the source of the scroll position properties.
   scrollBar.SetScrollPropertySource(sourceActor, propertyScrollPosition, propertyMinScrollPosition, propertyMaxScrollPosition, propertyScrollContentSize);
@@ -1780,13 +1784,13 @@ int UtcDaliToolkitScrollBarPanFinishedSignalN(void)
 
   // Perform a swipe gesture on the scroll bar but not on the indicator
   PerformGestureSwipe(application, Vector2(1.0f, 780.0f), Vector2(Vector2::YAXIS * -1.0f), 20, 2000);
-  DALI_TEST_EQUALS( gOnPanFinishedCalled, false, TEST_LOCATION );
-  DALI_TEST_EQUALS( panFinished, false, TEST_LOCATION );
+  DALI_TEST_EQUALS(gOnPanFinishedCalled, false, TEST_LOCATION);
+  DALI_TEST_EQUALS(panFinished, false, TEST_LOCATION);
 
   // Perform a swipe gesture on the indicator
   PerformGestureSwipe(application, Vector2(1.0f, 1.0f), Vector2(Vector2::YAXIS * 1.0f), 20, 4000);
-  DALI_TEST_EQUALS( gOnPanFinishedCalled, true, TEST_LOCATION );
-  DALI_TEST_EQUALS( panFinished, true, TEST_LOCATION );
+  DALI_TEST_EQUALS(gOnPanFinishedCalled, true, TEST_LOCATION);
+  DALI_TEST_EQUALS(panFinished, true, TEST_LOCATION);
 
   END_TEST;
 }
@@ -1796,20 +1800,20 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalP(void)
   ToolkitTestApplication application;
 
   // Create a vertical scroll bar
-  ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical);
-  DALI_TEST_CHECK( scrollBar );
+  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.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) );
+  scrollBar.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
+  scrollBar.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
+  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
   bool intervalReached = false;
-  scrollBar.ScrollPositionIntervalReachedSignal().Connect( &OnScrollPositionIntervalReached );
-  scrollBar.ConnectSignal( &connectionTracker, "scrollPositionIntervalReached", CallbackFunctor(&intervalReached));
+  scrollBar.ScrollPositionIntervalReachedSignal().Connect(&OnScrollPositionIntervalReached);
+  scrollBar.ConnectSignal(&connectionTracker, "scrollPositionIntervalReached", CallbackFunctor(&intervalReached));
 
   // Render and notify
   application.SendNotification();
@@ -1817,18 +1821,18 @@ 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 );
-  Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "sourcePositionMin",   0.0f );
-  Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "sourcePositionMax",   800.0f );
-  Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "sourceContentSize",   2000.0f );
+  Property::Index propertyScrollPosition    = sourceActor.RegisterProperty("sourcePosition", 0.0f);
+  Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty("sourcePositionMin", 0.0f);
+  Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty("sourcePositionMax", 800.0f);
+  Property::Index propertyScrollContentSize = sourceActor.RegisterProperty("sourceContentSize", 2000.0f);
 
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePosition" ), propertyScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMin" ), propertyMinScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMax" ), propertyMaxScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourceContentSize" ), propertyScrollContentSize, TEST_LOCATION );
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourcePosition"), propertyScrollPosition, TEST_LOCATION);
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourcePositionMin"), propertyMinScrollPosition, TEST_LOCATION);
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourcePositionMax"), propertyMaxScrollPosition, TEST_LOCATION);
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourceContentSize"), propertyScrollContentSize, TEST_LOCATION);
 
   // Set the source of the scroll position properties.
   scrollBar.SetScrollPropertySource(sourceActor, propertyScrollPosition, propertyMinScrollPosition, propertyMaxScrollPosition, propertyScrollContentSize);
@@ -1839,9 +1843,9 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalP(void)
 
   // Set the values to get notified when the scroll positions of the source actor goes above or below these values
   Dali::Vector<float> positionIntervals;
-  for( size_t i = 0; i != 10; ++i )
+  for(size_t i = 0; i != 10; ++i)
   {
-    positionIntervals.PushBack( -80.0f * i ); // should get notified for each 80 pixels
+    positionIntervals.PushBack(-80.0f * i); // should get notified for each 80 pixels
   }
   scrollBar.SetScrollPositionIntervals(positionIntervals);
 
@@ -1854,19 +1858,19 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalP(void)
 
   // Animate the scroll position to cross the specified value
   Animation animation = Animation::New(0.1f);
-  animation.AnimateTo( Property( sourceActor, propertyScrollPosition ), -85.0f );
+  animation.AnimateTo(Property(sourceActor, propertyScrollPosition), -85.0f);
   animation.Play();
 
   // Wait for 0.1 second
   Wait(application, 100);
 
   // Check that the signal callback is called
-  DALI_TEST_EQUALS( gOnScrollPositionIntervalReachedSignalCalled, true, TEST_LOCATION );
-  DALI_TEST_EQUALS( intervalReached, true, TEST_LOCATION );
+  DALI_TEST_EQUALS(gOnScrollPositionIntervalReachedSignalCalled, true, TEST_LOCATION);
+  DALI_TEST_EQUALS(intervalReached, true, TEST_LOCATION);
 
   // Reset the flag
   gOnScrollPositionIntervalReachedSignalCalled = false;
-  intervalReached = false;
+  intervalReached                              = false;
 
   // Rest and clear the animation
   animation.Clear();
@@ -1874,19 +1878,19 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalP(void)
 
   // Animate the scroll position to cross another specified value
   animation = Animation::New(0.1f);
-  animation.AnimateTo( Property( sourceActor, propertyScrollPosition ), -170.0f );
+  animation.AnimateTo(Property(sourceActor, propertyScrollPosition), -170.0f);
   animation.Play();
 
   // Wait for 0.1 second
   Wait(application, 100);
 
   // Check that the signal callback is called
-  DALI_TEST_EQUALS( gOnScrollPositionIntervalReachedSignalCalled, true, TEST_LOCATION );
-  DALI_TEST_EQUALS( intervalReached, true, TEST_LOCATION );
+  DALI_TEST_EQUALS(gOnScrollPositionIntervalReachedSignalCalled, true, TEST_LOCATION);
+  DALI_TEST_EQUALS(intervalReached, true, TEST_LOCATION);
 
   // Reset the flag
   gOnScrollPositionIntervalReachedSignalCalled = false;
-  intervalReached = false;
+  intervalReached                              = false;
 
   // Rest and clear the animation
   animation.Clear();
@@ -1894,15 +1898,15 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalP(void)
 
   // Animate the scroll position back to the previous value
   animation = Animation::New(0.1f);
-  animation.AnimateTo( Property( sourceActor, propertyScrollPosition ), -85.0f );
+  animation.AnimateTo(Property(sourceActor, propertyScrollPosition), -85.0f);
   animation.Play();
 
   // Wait for 0.1 second
   Wait(application, 100);
 
   // Check that the signal callback is called
-  DALI_TEST_EQUALS( gOnScrollPositionIntervalReachedSignalCalled, true, TEST_LOCATION );
-  DALI_TEST_EQUALS( intervalReached, true, TEST_LOCATION );
+  DALI_TEST_EQUALS(gOnScrollPositionIntervalReachedSignalCalled, true, TEST_LOCATION);
+  DALI_TEST_EQUALS(intervalReached, true, TEST_LOCATION);
 
   END_TEST;
 }
@@ -1912,17 +1916,17 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalN(void)
   ToolkitTestApplication application;
 
   // Create a vertical scroll bar
-  ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical);
-  DALI_TEST_CHECK( scrollBar );
+  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.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) );
+  scrollBar.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
+  scrollBar.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
+  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 );
+  scrollBar.ScrollPositionIntervalReachedSignal().Connect(&OnScrollPositionIntervalReached);
 
   // Render and notify
   application.SendNotification();
@@ -1930,18 +1934,18 @@ 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 );
-  Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "sourcePositionMin",   0.0f );
-  Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "sourcePositionMax",   800.0f );
-  Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "sourceContentSize",   2000.0f );
+  Property::Index propertyScrollPosition    = sourceActor.RegisterProperty("sourcePosition", 0.0f);
+  Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty("sourcePositionMin", 0.0f);
+  Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty("sourcePositionMax", 800.0f);
+  Property::Index propertyScrollContentSize = sourceActor.RegisterProperty("sourceContentSize", 2000.0f);
 
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePosition" ), propertyScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMin" ), propertyMinScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourcePositionMax" ), propertyMaxScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "sourceContentSize" ), propertyScrollContentSize, TEST_LOCATION );
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourcePosition"), propertyScrollPosition, TEST_LOCATION);
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourcePositionMin"), propertyMinScrollPosition, TEST_LOCATION);
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourcePositionMax"), propertyMaxScrollPosition, TEST_LOCATION);
+  DALI_TEST_EQUALS(sourceActor.GetPropertyIndex("sourceContentSize"), propertyScrollContentSize, TEST_LOCATION);
 
   // Set the source of the scroll position properties.
   scrollBar.SetScrollPropertySource(sourceActor, propertyScrollPosition, propertyMinScrollPosition, propertyMaxScrollPosition, propertyScrollContentSize);
@@ -1952,9 +1956,9 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalN(void)
 
   // Set the values to get notified when the scroll positions of the source actor goes above or below these values
   Dali::Vector<float> positionIntervals;
-  for( size_t i = 0; i != 10; ++i )
+  for(size_t i = 0; i != 10; ++i)
   {
-    positionIntervals.PushBack( -80.0f * i ); // should get notified for each 80 pixels
+    positionIntervals.PushBack(-80.0f * i); // should get notified for each 80 pixels
   }
   scrollBar.SetScrollPositionIntervals(positionIntervals);
 
@@ -1967,14 +1971,14 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalN(void)
 
   // Animate the scroll position not to cross the specified value
   Animation animation = Animation::New(0.1f);
-  animation.AnimateTo( Property( sourceActor, propertyScrollPosition ), -70.0f );
+  animation.AnimateTo(Property(sourceActor, propertyScrollPosition), -70.0f);
   animation.Play();
 
   // Wait for 0.1 second
   Wait(application, 100);
 
   // Check that the signal callback is not called
-  DALI_TEST_EQUALS( gOnScrollPositionIntervalReachedSignalCalled, false, TEST_LOCATION );
+  DALI_TEST_EQUALS(gOnScrollPositionIntervalReachedSignalCalled, false, TEST_LOCATION);
 
   // Rest and clear the animation
   animation.Clear();
@@ -1982,14 +1986,14 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalN(void)
 
   // Animate the scroll position to cross another specified value
   animation = Animation::New(0.1f);
-  animation.AnimateTo( Property( sourceActor, propertyScrollPosition ), -85.0f );
+  animation.AnimateTo(Property(sourceActor, propertyScrollPosition), -85.0f);
   animation.Play();
 
   // Wait for 0.1 second
   Wait(application, 100);
 
   // Check that the signal callback is called
-  DALI_TEST_EQUALS( gOnScrollPositionIntervalReachedSignalCalled, true, TEST_LOCATION );
+  DALI_TEST_EQUALS(gOnScrollPositionIntervalReachedSignalCalled, true, TEST_LOCATION);
 
   END_TEST;
 }