Fixed getting SCROLL_POSITION_INTERVALS Property bug in ScrollBar
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-ScrollBar.cpp
index a56ca7c..f3a377c 100644 (file)
 
 #include <iostream>
 #include <stdlib.h>
+#include <string>
 #include <dali-toolkit-test-suite-utils.h>
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali/integration-api/events/pan-gesture-event.h>
+#include <dali-toolkit/devel-api/controls/scroll-bar/scroll-bar-devel.h>
 
 using namespace Dali;
 using namespace Toolkit;
@@ -117,6 +119,20 @@ static void OnPanFinished()
   gOnPanFinishedCalled = true;
 }
 
+struct CallbackFunctor
+{
+  CallbackFunctor(bool* callbackFlag)
+  : mCallbackFlag( callbackFlag )
+  {
+  }
+
+  void operator()()
+  {
+    *mCallbackFlag = true;
+  }
+  bool* mCallbackFlag;
+};
+
 /**
  * Invoked when the current scroll position of the scrollable content goes above or below the values
  * specified by SCROLL_POSITION_INTERVALS property.
@@ -212,9 +228,47 @@ int UtcDaliToolkitScrollBarNewP(void)
   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 );
+
   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 );
+
+  END_TEST;
+}
+
+int UtcDaliToolkitScrollBarCreateP(void)
+{
+  ToolkitTestApplication application;
+
+  TypeRegistry typeRegistry = TypeRegistry::Get();
+  DALI_TEST_CHECK( typeRegistry );
+
+  TypeInfo typeInfo = typeRegistry.GetTypeInfo( "ScrollBar" );
+  DALI_TEST_CHECK( typeInfo );
+
+  BaseHandle handle = typeInfo.CreateInstance();
+  DALI_TEST_CHECK( handle );
+
+  ScrollBar scrollBar = ScrollBar::DownCast( handle );
+  DALI_TEST_CHECK( scrollBar );
+
+  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 );
+
+  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 );
 
   END_TEST;
 }
@@ -265,15 +319,15 @@ int UtcDaliToolkitScrollBarSetScrollPropertySourceP(void)
   Stage::GetCurrent().Add( sourceActor );
 
   // Register the scroll properties
-  Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "source-position", 0.0f );
-  Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "source-position-min", 0.0f );
-  Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "source-position-max", 100.0f );
-  Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "source-content-size", 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( "source-position" ), propertyScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-min" ), propertyMinScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-max" ), propertyMaxScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-content-size" ), 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);
@@ -343,15 +397,15 @@ int UtcDaliToolkitScrollBarSetScrollPropertySourceP(void)
   Stage::GetCurrent().Add( newSourceActor );
 
   // Register the scroll properties
-  Property::Index newPropertyScrollPosition = newSourceActor.RegisterProperty( "source-position", 0.0f );
-  Property::Index newPropertyMinScrollPosition = newSourceActor.RegisterProperty( "source-position-min", 0.0f );
-  Property::Index newPropertyMaxScrollPosition = newSourceActor.RegisterProperty( "source-position-max", 200.0f );
-  Property::Index newPropertyScrollContentSize = newSourceActor.RegisterProperty( "source-content-size", 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( "source-position" ), newPropertyScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( newSourceActor.GetPropertyIndex( "source-position-min" ), newPropertyMinScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( newSourceActor.GetPropertyIndex( "source-position-max" ), newPropertyMaxScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( newSourceActor.GetPropertyIndex( "source-content-size" ), 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);
@@ -417,6 +471,11 @@ int UtcDaliToolkitScrollBarSetScrollIndicatorP(void)
   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() ) );
   END_TEST;
 }
 
@@ -513,15 +572,15 @@ int UtcDaliToolkitScrollBarSetScrollPositionIntervalsP(void)
   Stage::GetCurrent().Add( sourceActor );
 
   // Register the scroll properties
-  Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "source-position", 0.0f );
-  Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "source-position-min", 0.0f );
-  Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "source-position-max", 800.0f );
-  Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "source-content-size", 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( "source-position" ), propertyScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-min" ), propertyMinScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-max" ), propertyMaxScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-content-size" ), 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);
@@ -639,6 +698,20 @@ int UtcDaliToolkitScrollBarGetScrollPositionIntervalsP(void)
   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 );
+
   END_TEST;
 }
 
@@ -675,15 +748,15 @@ int UtcDaliToolkitScrollBarSetIndicatorHeightPolicyP(void)
   Stage::GetCurrent().Add( sourceActor );
 
   // Register the scroll properties
-  Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "source-position", 0.0f );
-  Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "source-position-min", 0.0f );
-  Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "source-position-max", 100.0f );
-  Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "source-content-size", 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( "source-position" ), propertyScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-min" ), propertyMinScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-max" ), propertyMaxScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-content-size" ), 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);
@@ -704,6 +777,9 @@ int UtcDaliToolkitScrollBarSetIndicatorHeightPolicyP(void)
   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 );
+
   // Render and notify
   application.SendNotification();
   application.Render();
@@ -714,6 +790,8 @@ int UtcDaliToolkitScrollBarSetIndicatorHeightPolicyP(void)
 
   // Set the indicator height to be variable
   scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Variable);
+  value = scrollBar.GetProperty(ScrollBar::Property::INDICATOR_HEIGHT_POLICY);
+  DALI_TEST_EQUALS(value.Get<std::string>(), "Variable", TEST_LOCATION );
 
   // Render and notify
   application.SendNotification();
@@ -1325,6 +1403,307 @@ int UtcDaliToolkitScrollBarHideIndicatorN(void)
   END_TEST;
 }
 
+int UtcDaliToolkitScrollBarActionShowIndicator(void)
+{
+  ToolkitTestApplication application;
+
+  // Create a scroll bar
+  ScrollBar scrollBar = ScrollBar::New();
+  DALI_TEST_CHECK( scrollBar );
+
+  Stage::GetCurrent().Add( scrollBar );
+
+  Actor indicator = scrollBar.GetScrollIndicator();
+  DALI_TEST_CHECK( indicator );
+
+  // Get the default duration to hide the indicator
+  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 );
+
+  // Make the indicator invisible
+  indicator.SetOpacity(0.0f);
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Check that the indicator is invisible
+  DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 0.0f, TEST_LOCATION );
+
+  // Do the "ShowIndicator" action
+  Property::Map emptyMap;
+  scrollBar.DoAction( "ShowIndicator", emptyMap );
+
+  // Wait for the specified duration
+  Wait(application, duration * 1000);
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Check that the indicator is now visible
+  DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 1.0f, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliToolkitScrollBarActionHideIndicator(void)
+{
+  ToolkitTestApplication application;
+
+  // Create a scroll bar
+  ScrollBar scrollBar = ScrollBar::New();
+  DALI_TEST_CHECK( scrollBar );
+
+  Stage::GetCurrent().Add( scrollBar );
+
+  Actor indicator = scrollBar.GetScrollIndicator();
+  DALI_TEST_CHECK( indicator );
+
+  // Get the default duration to hide the indicator
+  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 );
+
+  // Make the indicator visible
+  indicator.SetOpacity(1.0f);
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Check that the indicator is visible
+  DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 1.0f, TEST_LOCATION );
+
+  // Do the "HideIndicator" action
+  Property::Map emptyMap;
+  scrollBar.DoAction( "HideIndicator", emptyMap );
+
+  // Wait for the specified duration
+  Wait(application, duration * 1000);
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Check that the indicator is now invisible
+  DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 0.0f, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliToolkitScrollBarActionShowTransientIndicator(void)
+{
+  ToolkitTestApplication application;
+
+  // Create a scroll bar
+  ScrollBar scrollBar = ScrollBar::New();
+  DALI_TEST_CHECK( scrollBar );
+
+  Stage::GetCurrent().Add( scrollBar );
+
+  Actor indicator = scrollBar.GetScrollIndicator();
+  DALI_TEST_CHECK( indicator );
+
+  // Get the default duration to hide the indicator
+  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 );
+
+  // Make the indicator invisible
+  indicator.SetOpacity(0.0f);
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Check that the indicator is invisible
+  DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 0.0f, TEST_LOCATION );
+
+  // Do the "ShowIndicator" action
+  Property::Map emptyMap;
+  scrollBar.DoAction( "ShowTransientIndicator", emptyMap );
+
+  // Wait for the specified duration
+  Wait(application, duration * 1000);
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Check that the indicator is now visible
+  DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 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>( DevelScrollBar::Property::INDICATOR_TRANSIENT_DURATION );
+  float totalVisibleDuration = hideDuration + transientDuration;
+
+  // Check that the default duration is greater than 0
+  DALI_TEST_CHECK( totalVisibleDuration > 0.0f );
+
+  // Wait for the specified duration
+  Wait(application, totalVisibleDuration * 1000);
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Check that the indicator is now invisible
+  DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 0.0f, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliToolkitScrollBarActionShowTransientIndicatorImmediate(void)
+{
+  ToolkitTestApplication application;
+
+  // Create a scroll bar
+  ScrollBar scrollBar = ScrollBar::New();
+  DALI_TEST_CHECK( scrollBar );
+
+  Stage::GetCurrent().Add( scrollBar );
+
+  Actor indicator = scrollBar.GetScrollIndicator();
+  DALI_TEST_CHECK( indicator );
+
+  // Make the indicator invisible
+  indicator.SetOpacity(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 );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Do the "ShowIndicator" action
+  Property::Map emptyMap;
+  scrollBar.DoAction( "ShowTransientIndicator", emptyMap );
+
+  // Wait for the specified duration
+  Wait(application);
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Check that the indicator is now visible
+  DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 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>( DevelScrollBar::Property::INDICATOR_TRANSIENT_DURATION );
+  float totalVisibleDuration = hideDuration + transientDuration;
+
+  // Check that the default duration is greater than 0
+  DALI_TEST_CHECK( totalVisibleDuration > 0.0f );
+
+  // Wait for the specified duration
+  Wait(application, totalVisibleDuration * 1000);
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Check that the indicator is now invisible
+  DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 0.0f, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliToolkitScrollBarActionShowTransientIndicatorDuringHide(void)
+{
+  ToolkitTestApplication application;
+
+  // Create a scroll bar
+  ScrollBar scrollBar = ScrollBar::New();
+  DALI_TEST_CHECK( scrollBar );
+
+  Stage::GetCurrent().Add( scrollBar );
+
+  Actor indicator = scrollBar.GetScrollIndicator();
+  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 );
+
+  // Make the indicator visible
+  indicator.SetOpacity(1.0f);
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Check that the indicator is visible
+  DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 1.0f, TEST_LOCATION );
+
+  // Hide the indicator
+  scrollBar.HideIndicator();
+
+  // Wait for half the specified duration
+  Wait(application, duration * 0.5f * 1000);
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Check that the indicator is now partially hidden
+  DALI_TEST_CHECK( indicator.GetCurrentOpacity() < 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 );
+
+  // Check that the default duration is greater than 0
+  DALI_TEST_CHECK( duration > 0.0f );
+
+  // Do the "ShowIndicator" action
+  Property::Map emptyMap;
+  scrollBar.DoAction( "ShowTransientIndicator", emptyMap );
+
+  // Wait for the specified duration
+  Wait(application, duration * 1000);
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Check that the indicator is now visible
+  DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 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>( DevelScrollBar::Property::INDICATOR_TRANSIENT_DURATION );
+  float totalVisibleDuration = hideDuration + transientDuration;
+
+  // Check that the default duration is greater than 0
+  DALI_TEST_CHECK( totalVisibleDuration > 0.0f );
+
+  // Wait for the specified duration
+  Wait(application, totalVisibleDuration * 1000);
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Check that the indicator is now invisible
+  DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 0.0f, TEST_LOCATION );
+
+  END_TEST;
+}
+
 int UtcDaliToolkitScrollBarPanFinishedSignalP(void)
 {
   ToolkitTestApplication application;
@@ -1344,7 +1723,10 @@ int UtcDaliToolkitScrollBarPanFinishedSignalP(void)
   Stage::GetCurrent().Add( scrollBar );
 
   // Connect the pan finished signal
+  ConnectionTracker connectionTracker;
+  bool panFinished = false;
   scrollBar.PanFinishedSignal().Connect( &OnPanFinished );
+  scrollBar.ConnectSignal( &connectionTracker, "panFinished", CallbackFunctor(&panFinished));
 
   // Render and notify
   application.SendNotification();
@@ -1355,15 +1737,15 @@ int UtcDaliToolkitScrollBarPanFinishedSignalP(void)
   Stage::GetCurrent().Add( sourceActor );
 
   // Register the scroll properties
-  Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "source-position", 0.0f );
-  Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "source-position-min", 0.0f );
-  Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "source-position-max", 100.0f );
-  Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "source-content-size", 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( "source-position" ), propertyScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-min" ), propertyMinScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-max" ), propertyMaxScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-content-size" ), 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);
@@ -1375,6 +1757,7 @@ int UtcDaliToolkitScrollBarPanFinishedSignalP(void)
   // Perform a swipe gesture on the indicator
   PerformGestureSwipe(application, Vector2(1.0f, 1.0f), Vector2(Vector2::YAXIS * 1.0f), 20);
   DALI_TEST_EQUALS( gOnPanFinishedCalled, true, TEST_LOCATION );
+  DALI_TEST_EQUALS( panFinished, true, TEST_LOCATION );
 
   END_TEST;
 }
@@ -1398,7 +1781,10 @@ int UtcDaliToolkitScrollBarPanFinishedSignalN(void)
   Stage::GetCurrent().Add( scrollBar );
 
   // Connect the pan finished signal
+  ConnectionTracker connectionTracker;
+  bool panFinished = false;
   scrollBar.PanFinishedSignal().Connect( &OnPanFinished );
+  scrollBar.ConnectSignal( &connectionTracker, "panFinished", CallbackFunctor(&panFinished));
 
   // Render and notify
   application.SendNotification();
@@ -1413,15 +1799,15 @@ int UtcDaliToolkitScrollBarPanFinishedSignalN(void)
   Stage::GetCurrent().Add( sourceActor );
 
   // Register the scroll properties
-  Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "source-position", 0.0f );
-  Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "source-position-min", 0.0f );
-  Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "source-position-max", 100.0f );
-  Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "source-content-size", 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( "source-position" ), propertyScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-min" ), propertyMinScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-max" ), propertyMaxScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-content-size" ), 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);
@@ -1433,10 +1819,12 @@ 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);
   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);
   DALI_TEST_EQUALS( gOnPanFinishedCalled, true, TEST_LOCATION );
+  DALI_TEST_EQUALS( panFinished, true, TEST_LOCATION );
 
   END_TEST;
 }
@@ -1454,9 +1842,12 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalP(void)
   scrollBar.SetSize(20.0f, 800.0f, 0.0f);
 
   Stage::GetCurrent().Add( scrollBar );
+  ConnectionTracker connectionTracker;
 
   // Connect to the ScrollPositionIntervalReached signal
+  bool intervalReached = false;
   scrollBar.ScrollPositionIntervalReachedSignal().Connect( &OnScrollPositionIntervalReached );
+  scrollBar.ConnectSignal( &connectionTracker, "scrollPositionIntervalReached", CallbackFunctor(&intervalReached));
 
   // Render and notify
   application.SendNotification();
@@ -1467,15 +1858,15 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalP(void)
   Stage::GetCurrent().Add( sourceActor );
 
   // Register the scroll properties
-  Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "source-position", 0.0f );
-  Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "source-position-min", 0.0f );
-  Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "source-position-max", 800.0f );
-  Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "source-content-size", 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( "source-position" ), propertyScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-min" ), propertyMinScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-max" ), propertyMaxScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-content-size" ), 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);
@@ -1509,9 +1900,11 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalP(void)
 
   // Check that the signal callback is called
   DALI_TEST_EQUALS( gOnScrollPositionIntervalReachedSignalCalled, true, TEST_LOCATION );
+  DALI_TEST_EQUALS( intervalReached, true, TEST_LOCATION );
 
   // Reset the flag
   gOnScrollPositionIntervalReachedSignalCalled = false;
+  intervalReached = false;
 
   // Rest and clear the animation
   animation.Clear();
@@ -1527,9 +1920,11 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalP(void)
 
   // Check that the signal callback is called
   DALI_TEST_EQUALS( gOnScrollPositionIntervalReachedSignalCalled, true, TEST_LOCATION );
+  DALI_TEST_EQUALS( intervalReached, true, TEST_LOCATION );
 
   // Reset the flag
   gOnScrollPositionIntervalReachedSignalCalled = false;
+  intervalReached = false;
 
   // Rest and clear the animation
   animation.Clear();
@@ -1545,6 +1940,7 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalP(void)
 
   // Check that the signal callback is called
   DALI_TEST_EQUALS( gOnScrollPositionIntervalReachedSignalCalled, true, TEST_LOCATION );
+  DALI_TEST_EQUALS( intervalReached, true, TEST_LOCATION );
 
   END_TEST;
 }
@@ -1575,15 +1971,15 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalN(void)
   Stage::GetCurrent().Add( sourceActor );
 
   // Register the scroll properties
-  Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "source-position", 0.0f );
-  Property::Index propertyMinScrollPosition = sourceActor.RegisterProperty( "source-position-min", 0.0f );
-  Property::Index propertyMaxScrollPosition = sourceActor.RegisterProperty( "source-position-max", 800.0f );
-  Property::Index propertyScrollContentSize = sourceActor.RegisterProperty( "source-content-size", 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( "source-position" ), propertyScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-min" ), propertyMinScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-position-max" ), propertyMaxScrollPosition, TEST_LOCATION );
-  DALI_TEST_EQUALS( sourceActor.GetPropertyIndex( "source-content-size" ), 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);
@@ -1635,5 +2031,3 @@ int UtcDaliToolkitScrollBarScrollPositionIntervalReachedSignalN(void)
 
   END_TEST;
 }
-
-